Skip to content

Commit

Permalink
Try branching 1.5 again.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/avro/branches/branch-1.5@1074760 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cutting committed Feb 26, 2011
2 parents 6120553 + 4d58a72 commit 1fb314a
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 5 deletions.
1 change: 1 addition & 0 deletions share/editors/README.txt
@@ -0,0 +1 @@
Syntax highlighting and config files for working with Avro files in various text editors.
84 changes: 84 additions & 0 deletions share/editors/avro-idl.vim
@@ -0,0 +1,84 @@
" Vim syntax file
" Language: Avro IDL
" Maintainer: Daniel Lundin <dln@eintr.org>
" Last Change: 20100924
" Copy to ~/.vim/syntax/
" Add to ~/.vimrc
" au BufRead,BufNewFile *.avdl setlocal filetype=avro-idl
"
" Licensed to the Apache Software Foundation (ASF) under one
" or more contributor license agreements. See the NOTICE file
" distributed with this work for additional information
" regarding copyright ownership. The ASF licenses this file
" to you under the Apache License, Version 2.0 (the
" "License"); you may not use this file except in compliance
" with the License. You may obtain a copy of the License at
"
" http://www.apache.org/licenses/LICENSE-2.0
"
" Unless required by applicable law or agreed to in writing,
" software distributed under the License is distributed on an
" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
" KIND, either express or implied. See the License for the
" specific language governing permissions and limitations
" under the License.
"

if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif

" Todo
syn keyword avroTodo TODO todo FIXME fixme XXX xxx contained

" Comments
syn region avroComment start="/\*" end="\*/" contains=avroTodo
syn match avroComment "//.\{-}\(?>\|$\)\@=" contains=avroTodo

" Identifiers
syn region avroIdentifier start="^\s*\(error\|protocol\|record\)" end="{" contains=avroIdentifierType
syn keyword avroIdentifierType error protocol record contained nextgroup=avroIdentifierName skipwhite
syn match avroIdentifierName "\w\w*" display contained skipwhite

syn region avroEscaped start=/`/ end=/`/

" Types
syn match avroNumber "-\=\<\d\+\>" contained
syn region avroString start=/"/ skip=/\\"/ end=/"/
syn region avroString start=/'/ skip=/\\'/ end=/'/
syn region avroArray start="<" end=">" contains=avroArrayType
syn match avroArrayType "\w\w*" display contained skipwhite

" Keywords
syn keyword avroKeyword java-class namespace order
syn keyword avroKeyword error throws
syn keyword avroBasicTypes boolean bytes double fixed float int long null string void
syn keyword avroStructure array enum map union

if version >= 508 || !exists("did_avro_idl_syn_inits")
if version < 508
let did_avro_idl_syn_inits = 1
command! -nargs=+ HiLink hi link <args>
else
command! -nargs=+ HiLink hi def link <args>
endif

HiLink avroTodo Todo
HiLink avroComment Comment
HiLink avroNumber Number
HiLink avroKeyword Define
HiLink avroIdentifierType Special
HiLink avroBasicTypes Type
HiLink avroArrayType Type
HiLink avroString String
HiLink avroStructure Structure
HiLink avroArray Structure
HiLink avroEscaped Default
HiLink avroIdentifierName Entity

delcommand HiLink
endif

let b:current_syntax = "avro-idl"
6 changes: 4 additions & 2 deletions share/rat-excludes.txt
Expand Up @@ -23,6 +23,7 @@ lang/c/config**
lang/c++/config**
lang/c/docs/**
lang/c/json/**
lang/c/src/avro-c.pc.in
lang/c/tests/**
lang/c/version.sh
lang/ruby/Manifest
Expand All @@ -31,5 +32,6 @@ lang/c/jansson/**
lang/c/src/queue.h
lang/c/src/st.h
lang/c/src/st.c
lang/java/src/java/org/apache/avro/ipc/stats/static/*.js
lang/java/src/java/org/apache/avro/ipc/stats/static/*.css
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/*.js
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/*.css
share/test/data/test.avro12
Binary file added share/test/data/test.avro12
Binary file not shown.
17 changes: 14 additions & 3 deletions share/test/interop/bin/test_rpc_interop.sh
Expand Up @@ -23,8 +23,8 @@ VERSION=`cat share/VERSION.txt`

#set -x # echo commands

java_client="java -jar lang/java/build/avro-tools-$VERSION.jar rpcsend"
java_server="java -jar lang/java/build/avro-tools-$VERSION.jar rpcreceive"
java_client="java -jar lang/java/tools/target/avro-tools-$VERSION.jar rpcsend"
java_server="java -jar lang/java/tools/target/avro-tools-$VERSION.jar rpcreceive"

py_client="python lang/py/build/src/avro/tool.py rpcsend"
py_server="python lang/py/build/src/avro/tool.py rpcreceive"
Expand Down Expand Up @@ -58,9 +58,20 @@ do
echo TEST: $c
for client in "${clients[@]}"
do
rm -rf $portfile
$server http://127.0.0.1:0/ $proto $msg -file $c/response.avro \
> $portfile &
sleep 1 # wait for server to start
count=0
while [ ! -s $portfile ]
do
sleep 1
if [ $count -ge 10 ]
then
echo $server did not start.
exit 1
fi
count=`expr $count + 1`
done
read ignore port < $portfile
$client http://127.0.0.1:$port $proto $msg -file $c/request.avro
wait
Expand Down
7 changes: 7 additions & 0 deletions share/test/schemas/simple.avpr
Expand Up @@ -18,6 +18,13 @@
{"name": "TestError", "type": "error", "fields": [
{"name": "message", "type": "string"}
]
},

{"name": "TestRecordWithUnion", "type": "record",
"fields": [
{"name": "kind", "type": ["null", "Kind"]},
{"name": "value", "type": ["null", "string"]}
]
}

],
Expand Down

0 comments on commit 1fb314a

Please sign in to comment.