[jira] [Commented] (AVRO-1891) Generated Java code fails with union containing logical type

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-1891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685896#comment-16685896
 ] 

ASF GitHub Bot commented on AVRO-1891:
--

kgalieva commented on issue #329: Improved conversions handling + pluggable 
conversions support [AVRO-1891, AVRO-2065]
URL: https://github.com/apache/avro/pull/329#issuecomment-438479297
 
 
   Hi @scatrin and @rstata! Thank you both for your great contributions! 
   I've tested this build on my schemas and noticed a small bug in master that 
has been merged to this PR as well. 
   The problem is that `customEncode` and `customDecode` methods are 
`protected`. 
https://github.com/apache/avro/blame/master/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm#L504
   
https://github.com/apache/avro/blame/master/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm#L518
   This means that record with record field located in different package won't 
compile. What do you think about making those methods `public`?  Thanks again, 
and  please correct me if I'm wrong here :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Generated Java code fails with union containing logical type
> 
>
> Key: AVRO-1891
> URL: https://issues.apache.org/jira/browse/AVRO-1891
> Project: Apache Avro
>  Issue Type: Bug
>  Components: java, logical types
>Affects Versions: 1.8.1
>Reporter: Ross Black
>Priority: Blocker
> Fix For: 1.8.3
>
> Attachments: AVRO-1891.patch, AVRO-1891.yshi.1.patch, 
> AVRO-1891.yshi.2.patch, AVRO-1891.yshi.3.patch, AVRO-1891.yshi.4.patch
>
>
> Example schema:
> {code}
> {
>   "type": "record",
>   "name": "RecordV1",
>   "namespace": "org.brasslock.event",
>   "fields": [
> { "name": "first", "type": ["null", {"type": "long", 
> "logicalType":"timestamp-millis"}]}
>   ]
> }
> {code}
> The avro compiler generates a field using the relevant joda class:
> {code}
> public org.joda.time.DateTime first
> {code}
> Running the following code to perform encoding:
> {code}
> final RecordV1 record = new 
> RecordV1(DateTime.parse("2016-07-29T10:15:30.00Z"));
> final DatumWriter datumWriter = new 
> SpecificDatumWriter<>(record.getSchema());
> final ByteArrayOutputStream stream = new ByteArrayOutputStream(8192);
> final BinaryEncoder encoder = 
> EncoderFactory.get().directBinaryEncoder(stream, null);
> datumWriter.write(record, encoder);
> encoder.flush();
> final byte[] bytes = stream.toByteArray();
> {code}
> fails with the exception stacktrace:
> {code}
>  org.apache.avro.AvroRuntimeException: Unknown datum type 
> org.joda.time.DateTime: 2016-07-29T10:15:30.000Z
> at org.apache.avro.generic.GenericData.getSchemaName(GenericData.java:741)
> at 
> org.apache.avro.specific.SpecificData.getSchemaName(SpecificData.java:293)
> at org.apache.avro.generic.GenericData.resolveUnion(GenericData.java:706)
> at 
> org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:192)
> at 
> org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:110)
> at 
> org.apache.avro.specific.SpecificDatumWriter.writeField(SpecificDatumWriter.java:87)
> at 
> org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:143)
> at 
> org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:105)
> at 
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
> at 
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:60)
> at 
> org.brasslock.avro.compiler.GeneratedRecordTest.shouldEncodeLogicalTypeInUnion(GeneratedRecordTest.java:82)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at 
> 

[jira] [Commented] (AVRO-1891) Generated Java code fails with union containing logical type

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-1891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685807#comment-16685807
 ] 

ASF GitHub Bot commented on AVRO-1891:
--

malcolmrobbins commented on issue #329: Improved conversions handling + 
pluggable conversions support [AVRO-1891, AVRO-2065]
URL: https://github.com/apache/avro/pull/329#issuecomment-438455726
 
 
   Any chance of getting a PATCH for the collective changes so the "impatient" 
can apply for themselves until it comes out in an official release? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Generated Java code fails with union containing logical type
> 
>
> Key: AVRO-1891
> URL: https://issues.apache.org/jira/browse/AVRO-1891
> Project: Apache Avro
>  Issue Type: Bug
>  Components: java, logical types
>Affects Versions: 1.8.1
>Reporter: Ross Black
>Priority: Blocker
> Fix For: 1.8.3
>
> Attachments: AVRO-1891.patch, AVRO-1891.yshi.1.patch, 
> AVRO-1891.yshi.2.patch, AVRO-1891.yshi.3.patch, AVRO-1891.yshi.4.patch
>
>
> Example schema:
> {code}
> {
>   "type": "record",
>   "name": "RecordV1",
>   "namespace": "org.brasslock.event",
>   "fields": [
> { "name": "first", "type": ["null", {"type": "long", 
> "logicalType":"timestamp-millis"}]}
>   ]
> }
> {code}
> The avro compiler generates a field using the relevant joda class:
> {code}
> public org.joda.time.DateTime first
> {code}
> Running the following code to perform encoding:
> {code}
> final RecordV1 record = new 
> RecordV1(DateTime.parse("2016-07-29T10:15:30.00Z"));
> final DatumWriter datumWriter = new 
> SpecificDatumWriter<>(record.getSchema());
> final ByteArrayOutputStream stream = new ByteArrayOutputStream(8192);
> final BinaryEncoder encoder = 
> EncoderFactory.get().directBinaryEncoder(stream, null);
> datumWriter.write(record, encoder);
> encoder.flush();
> final byte[] bytes = stream.toByteArray();
> {code}
> fails with the exception stacktrace:
> {code}
>  org.apache.avro.AvroRuntimeException: Unknown datum type 
> org.joda.time.DateTime: 2016-07-29T10:15:30.000Z
> at org.apache.avro.generic.GenericData.getSchemaName(GenericData.java:741)
> at 
> org.apache.avro.specific.SpecificData.getSchemaName(SpecificData.java:293)
> at org.apache.avro.generic.GenericData.resolveUnion(GenericData.java:706)
> at 
> org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:192)
> at 
> org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:110)
> at 
> org.apache.avro.specific.SpecificDatumWriter.writeField(SpecificDatumWriter.java:87)
> at 
> org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:143)
> at 
> org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:105)
> at 
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
> at 
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:60)
> at 
> org.brasslock.avro.compiler.GeneratedRecordTest.shouldEncodeLogicalTypeInUnion(GeneratedRecordTest.java:82)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at 

[jira] [Commented] (AVRO-1702) Add LogicalType support to c++ library

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685756#comment-16685756
 ] 

ASF GitHub Bot commented on AVRO-1702:
--

zhutoulala commented on issue #379: AVRO-1702: Added support for logical types 
in the C++ client.
URL: https://github.com/apache/avro/pull/379#issuecomment-438446178
 
 
   really nice to see this 3+ year JIRA to be completed, great work @aniket486 
@aprgoog 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add LogicalType support to c++ library
> --
>
> Key: AVRO-1702
> URL: https://issues.apache.org/jira/browse/AVRO-1702
> Project: Apache Avro
>  Issue Type: New Feature
>  Components: c++
>Reporter: peter liu
>Assignee: Aniket Mokashi
>Priority: Major
>
> I'd like to port the logicaltype support to c++ library



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-1702) Add LogicalType support to c++ library

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685581#comment-16685581
 ] 

ASF GitHub Bot commented on AVRO-1702:
--

aniket486 commented on issue #379: AVRO-1702: Added support for logical types 
in the C++ client.
URL: https://github.com/apache/avro/pull/379#issuecomment-438385034
 
 
   Thanks @thiru-apache. PTAL.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add LogicalType support to c++ library
> --
>
> Key: AVRO-1702
> URL: https://issues.apache.org/jira/browse/AVRO-1702
> Project: Apache Avro
>  Issue Type: New Feature
>  Components: c++
>Reporter: peter liu
>Assignee: Aniket Mokashi
>Priority: Major
>
> I'd like to port the logicaltype support to c++ library



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (AVRO-1702) Add LogicalType support to c++ library

2018-11-13 Thread Thiruvalluvan M. G. (JIRA)


 [ 
https://issues.apache.org/jira/browse/AVRO-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. reassigned AVRO-1702:
-

Assignee: Aniket Mokashi  (was: peter liu)

> Add LogicalType support to c++ library
> --
>
> Key: AVRO-1702
> URL: https://issues.apache.org/jira/browse/AVRO-1702
> Project: Apache Avro
>  Issue Type: New Feature
>  Components: c++
>Reporter: peter liu
>Assignee: Aniket Mokashi
>Priority: Major
>
> I'd like to port the logicaltype support to c++ library



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2239) Fix interop tests

2018-11-13 Thread Fokko Driesprong (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685235#comment-16685235
 ] 

Fokko Driesprong commented on AVRO-2239:


[~tjwp] Please do, I had to disable the tests for now: 
https://github.com/apache/avro/blob/master/share/test/interop/bin/test_rpc_interop.sh#L37-L38

> Fix interop tests
> -
>
> Key: AVRO-2239
> URL: https://issues.apache.org/jira/browse/AVRO-2239
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: interop
>Reporter: Fokko Driesprong
>Assignee: Tim Perkins
>Priority: Major
>
> Currently the interop tests are failing:
> /avro/lang/ruby/lib/avro/schema_validator.rb:127:in `validate_map': undefined 
> method `keys' for nil:NilClass (NoMethodError)
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:103:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:156:in `block in 
> validate_possible_types'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:154:in `map'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:154:in 
> `validate_possible_types'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:141:in 
> `validate_union'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:105:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:110:in `block in 
> validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:108:in `each'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:108:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:67:in `validate!'
>   from /avro/lang/ruby/lib/avro/schema.rb:97:in `validate'
>   from /avro/lang/ruby/lib/avro/io.rb:503:in `write_data'
>   from /avro/lang/ruby/lib/avro/io.rb:499:in `write'
>   from /avro/lang/ruby/lib/avro/ipc.rb:136:in `write_handshake_request'
>   from /avro/lang/ruby/lib/avro/ipc.rb:105:in `request'
>   from lang/ruby/test/tool.rb:69:in `send_message'
>   from lang/ruby/test/tool.rb:137:in `main'
>   from lang/ruby/test/tool.rb:143:in `'



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2239) Fix interop tests

2018-11-13 Thread Tim Perkins (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685193#comment-16685193
 ] 

Tim Perkins commented on AVRO-2239:
---

I can work on a fix for this.

> Fix interop tests
> -
>
> Key: AVRO-2239
> URL: https://issues.apache.org/jira/browse/AVRO-2239
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: interop
>Reporter: Fokko Driesprong
>Assignee: Tim Perkins
>Priority: Major
>
> Currently the interop tests are failing:
> /avro/lang/ruby/lib/avro/schema_validator.rb:127:in `validate_map': undefined 
> method `keys' for nil:NilClass (NoMethodError)
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:103:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:156:in `block in 
> validate_possible_types'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:154:in `map'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:154:in 
> `validate_possible_types'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:141:in 
> `validate_union'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:105:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:110:in `block in 
> validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:108:in `each'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:108:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:67:in `validate!'
>   from /avro/lang/ruby/lib/avro/schema.rb:97:in `validate'
>   from /avro/lang/ruby/lib/avro/io.rb:503:in `write_data'
>   from /avro/lang/ruby/lib/avro/io.rb:499:in `write'
>   from /avro/lang/ruby/lib/avro/ipc.rb:136:in `write_handshake_request'
>   from /avro/lang/ruby/lib/avro/ipc.rb:105:in `request'
>   from lang/ruby/test/tool.rb:69:in `send_message'
>   from lang/ruby/test/tool.rb:137:in `main'
>   from lang/ruby/test/tool.rb:143:in `'



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (AVRO-2239) Fix interop tests

2018-11-13 Thread Tim Perkins (JIRA)


 [ 
https://issues.apache.org/jira/browse/AVRO-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Perkins reassigned AVRO-2239:
-

Assignee: Tim Perkins

> Fix interop tests
> -
>
> Key: AVRO-2239
> URL: https://issues.apache.org/jira/browse/AVRO-2239
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: interop
>Reporter: Fokko Driesprong
>Assignee: Tim Perkins
>Priority: Major
>
> Currently the interop tests are failing:
> /avro/lang/ruby/lib/avro/schema_validator.rb:127:in `validate_map': undefined 
> method `keys' for nil:NilClass (NoMethodError)
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:103:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:156:in `block in 
> validate_possible_types'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:154:in `map'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:154:in 
> `validate_possible_types'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:141:in 
> `validate_union'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:105:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:110:in `block in 
> validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:108:in `each'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:108:in 
> `validate_recursive'
>   from /avro/lang/ruby/lib/avro/schema_validator.rb:67:in `validate!'
>   from /avro/lang/ruby/lib/avro/schema.rb:97:in `validate'
>   from /avro/lang/ruby/lib/avro/io.rb:503:in `write_data'
>   from /avro/lang/ruby/lib/avro/io.rb:499:in `write'
>   from /avro/lang/ruby/lib/avro/ipc.rb:136:in `write_handshake_request'
>   from /avro/lang/ruby/lib/avro/ipc.rb:105:in `request'
>   from lang/ruby/test/tool.rb:69:in `send_message'
>   from lang/ruby/test/tool.rb:137:in `main'
>   from lang/ruby/test/tool.rb:143:in `'



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2229) Ability to test using a Docker image

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685175#comment-16685175
 ] 

ASF GitHub Bot commented on AVRO-2229:
--

Fokko closed pull request #343: AVRO-2229. Test using a Docker image
URL: https://github.com/apache/avro/pull/343
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0..1d085cacc
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+**
diff --git a/build.sh b/build.sh
index 8810d6bfa..dc1277208 100755
--- a/build.sh
+++ b/build.sh
@@ -38,41 +38,35 @@ do
   case "$target" in
 
 test)
-  # run lang-specific tests
-  (cd lang/java; ./build.sh test)
-  # install java artifacts required by other builds and interop tests
-  mvn install -DskipTests
-  (cd lang/py; ./build.sh test)
-  (cd lang/py3; ./build.sh test)
-  (cd lang/c; ./build.sh test)
-  (cd lang/c++; ./build.sh test)
-  (cd lang/csharp; ./build.sh test)
-  (cd lang/js; ./build.sh test)
-  (cd lang/ruby; ./build.sh test)
-  (cd lang/php; ./build.sh test)
-  (cd lang/perl; ./build.sh test)
-
   # create interop test data
   mkdir -p build/interop/data
-  (cd lang/java/avro; mvn -P interop-data-generate generate-resources)
-  (cd lang/py; ant interop-data-generate)
-  (cd lang/c; ./build.sh interop-data-generate)
-  #(cd lang/c++; make interop-data-generate)
-  (cd lang/ruby; rake generate_interop)
-  (cd lang/php; ./build.sh interop-data-generate)
-
-  # run interop data tests
-  (cd lang/java; mvn test -P interop-data-test)
-  (cd lang/py; ant interop-data-test)
-  (cd lang/c; ./build.sh interop-data-test)
-  #(cd lang/c++; make interop-data-test)
-  (cd lang/ruby; rake interop)
-  (cd lang/php; ./build.sh test-interop)
+
+  # install java artifacts required by other builds and interop tests
+  mvn -B install -DskipTests
+
+  for buildstep in test interop-data-generate interop-data-test
+  do
+for lang in `pwd`/lang/*/
+do
+  headline "# Run ${buildstep} for $lang"
+
+  if [[ "$lang" = *"c++"* ]]; then
+# The current cpp tests are failing:
+# https://issues.apache.org/jira/projects/AVRO/issues/AVRO-2230
+(cd "$lang"; ./build.sh ${buildstep} || true)
+  else
+(cd "$lang"; ./build.sh ${buildstep})
+  fi
+done
+  done
 
   # java needs to package the jars for the interop rpc tests
   (cd lang/java; mvn package -DskipTests)
+
   # run interop rpc test
-  /bin/bash share/test/interop/bin/test_rpc_interop.sh
+  # Currently failing, need to be fixed:
+  # https://issues.apache.org/jira/browse/AVRO-2239
+  # /bin/bash share/test/interop/bin/test_rpc_interop.sh
 ;;
 
 dist)
@@ -238,7 +232,10 @@ UserSpecificDocker
 
 docker-test)
   docker build -t avro-test -f share/docker/Dockerfile .
-  docker run --rm -v ${PWD}:/avro/ avro-test
+  docker run --rm \
+  -v ${PWD}:/avro/ \
+  -v ${HOME}/.m2:/root/.m2 \
+  avro-test
   ;;
 
 *)
@@ -247,5 +244,3 @@ UserSpecificDocker
   esac
 
 done
-
-exit 0
diff --git a/lang/c++/build.sh b/lang/c++/build.sh
index 17fff4089..2a018d602 100755
--- a/lang/c++/build.sh
+++ b/lang/c++/build.sh
@@ -18,7 +18,7 @@
 set -e # exit on error
 
 function usage {
-  echo "Usage: $0 {test|dist|clean|install|doc}"
+  echo "Usage: $0 
{test|dist|clean|install|doc|interop-data-test|interop-data-generate}"
   exit 1
 }
 
@@ -103,6 +103,14 @@ case "$target" in
 rm -rf doc test.avro test6.df
 ;;
 
+  interop-data-generate)
+echo "Not (yet) implemented"
+;;
+
+  interop-data-test)
+echo "Not (yet) implemented"
+;;
+
   install)
 (cd build && cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release .. && 
make install)
 ;;
@@ -112,5 +120,3 @@ case "$target" in
 esac
 
 done
-
-exit 0
diff --git a/lang/c/build.sh b/lang/c/build.sh
index f76f03550..fcd0fe732 100755
--- a/lang/c/build.sh
+++ b/lang/c/build.sh
@@ -92,5 +92,3 @@ case "$1" in
 echo "Usage: $0 {interop-data-generate|interop-data-test|test|dist|clean}"
 exit 1
 esac
-
-exit 0
diff --git a/lang/csharp/build.sh b/lang/csharp/build.sh
index cb9f7fc89..b6f585c91 100755
--- a/lang/csharp/build.sh
+++ b/lang/csharp/build.sh
@@ -58,9 +58,15 @@ case "$1" in
 rm -f  TestResult.xml
 ;;
 
+  interop-data-generate)
+echo "Not (yet) implemented"
+;;
+
+  interop-data-test)
+echo "Not (yet) implemented"
+;;
+
   *)
 echo "Usage: $0 {test|clean|dist|perf}"
 exit 1
 esac
-
-exit 0
diff --git 

[jira] [Commented] (AVRO-2254) Unions with 2 records declared downward fail

2018-11-13 Thread Nandor Kollar (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685032#comment-16685032
 ] 

Nandor Kollar commented on AVRO-2254:
-

[~zolyfarkas] the fix looks good to me, I can merge the PR if you open one, and 
all test pass.

> Unions with 2 records declared downward fail
> 
>
> Key: AVRO-2254
> URL: https://issues.apache.org/jira/browse/AVRO-2254
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Zoltan Farkas
>Priority: Major
>
> The following IDL will fail complaining that 2 same type is declared twice in 
> the union:
> {code}
> @namespace("org.apache.avro.gen")
> protocol UnionFwd {
> record TestRecord {
>   union {SR1, SR2} unionField;
> }
> record SR1 {
>   string field;
> }
> record SR2 {
>   string field;
> }
> }
> {code}
> the fix for this can be pretty simple:
> https://github.com/zolyfarkas/avro/commit/56b215f73f34cc80d505875c90217916b271abb5



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (AVRO-2254) Unions with 2 records declared downward fail

2018-11-13 Thread Nandor Kollar (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685032#comment-16685032
 ] 

Nandor Kollar edited comment on AVRO-2254 at 11/13/18 10:54 AM:


[~zolyfarkas] the fix looks good to me, I can merge the PR if you open one, and 
every test passes.


was (Author: nkollar):
[~zolyfarkas] the fix looks good to me, I can merge the PR if you open one, and 
all test pass.

> Unions with 2 records declared downward fail
> 
>
> Key: AVRO-2254
> URL: https://issues.apache.org/jira/browse/AVRO-2254
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Zoltan Farkas
>Priority: Major
>
> The following IDL will fail complaining that 2 same type is declared twice in 
> the union:
> {code}
> @namespace("org.apache.avro.gen")
> protocol UnionFwd {
> record TestRecord {
>   union {SR1, SR2} unionField;
> }
> record SR1 {
>   string field;
> }
> record SR2 {
>   string field;
> }
> }
> {code}
> the fix for this can be pretty simple:
> https://github.com/zolyfarkas/avro/commit/56b215f73f34cc80d505875c90217916b271abb5



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2265) Remove Guava as a dependency

2018-11-13 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16684901#comment-16684901
 ] 

ASF subversion and git services commented on AVRO-2265:
---

Commit 71be8a456ffb250abb22f2a956ae0c6acd5104fa in avro's branch 
refs/heads/master from [~Fokko]
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=71be8a4 ]

AVRO-2265 Remove Guava as a test dependency (#377)



> Remove Guava as a dependency
> 
>
> Key: AVRO-2265
> URL: https://issues.apache.org/jira/browse/AVRO-2265
> Project: Apache Avro
>  Issue Type: Task
>  Components: java
>Affects Versions: 1.8.2
>Reporter: Fokko Driesprong
>Assignee: Fokko Driesprong
>Priority: Major
> Fix For: 1.9.0
>
>
> Get rid of Guava in the tests. Guava is a dependency that can easily clash 
> with different versions. Since it is used very little, it makes sense to get 
> rid of it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2238) Update Docker image from java to openjdk

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16684893#comment-16684893
 ] 

ASF GitHub Bot commented on AVRO-2238:
--

Fokko edited a comment on issue #378: [WIP] AVRO-2238 Update Dockerfile base 
image from java to openjdk
URL: https://github.com/apache/avro/pull/378#issuecomment-438183369
 
 
   Hi @thiru-apache 
   
   I don't think you're doing anything wrong. The thing is that the old base 
image, is really old.
   
   The new openjdk images is build on top of a newer version of Debian:
   ```
   MacBook-Pro-van-Fokko:avro fokkodriesprong$ docker run -t -i java:8-jdk bash
   root@9fd273407ac9:/# cat /etc/debian_version
   8.7
   
   MacBook-Pro-van-Fokko:avro fokkodriesprong$ docker run -t -i openjdk:8 bash
   root@ef91dc01b7bd:/# cat /etc/debian_version
   9.5
   ```
   Where:
   - Debian 9 (stretch) — current stable release
   - Debian 8 (jessie) — obsolete stable release
   
   With updating to Debian 9 we also get newer versions from Perl, Python, 
Javascript etc. So we need to check how much effort it is to fix this. Please 
note that this is still Work in Progress `[WIP]`, so it isn't ready to merge.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Update Docker image from java to openjdk
> 
>
> Key: AVRO-2238
> URL: https://issues.apache.org/jira/browse/AVRO-2238
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: docker
>Reporter: Fokko Driesprong
>Priority: Major
>
> Currently the docker image to run the tests is still using java which is 
> deprecated: https://hub.docker.com/_/java/
> Therefore we should move to openjdk (https://hub.docker.com/_/openjdk/). 
> Starting with version 8, and also adding 10 and 11 to it to make sure that 
> Avro is compatible with future version of Java.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2265) Remove Guava as a dependency

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16684900#comment-16684900
 ] 

ASF GitHub Bot commented on AVRO-2265:
--

Fokko closed pull request #377: AVRO-2265 Remove Guava as a test dependency
URL: https://github.com/apache/avro/pull/377
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lang/java/avro/pom.xml b/lang/java/avro/pom.xml
index 817bb3aa0..c9104fba9 100644
--- a/lang/java/avro/pom.xml
+++ b/lang/java/avro/pom.xml
@@ -179,18 +179,6 @@
   com.github.luben
   zstd-jni
 
-
-  com.google.guava
-  guava
-  ${guava.version}
-  test
-  
- 
-  com.google.code.findbugs
-  jsr305
-
-  
-
   
 
 
diff --git 
a/lang/java/avro/src/test/java/org/apache/avro/message/TestBinaryMessageEncoding.java
 
b/lang/java/avro/src/test/java/org/apache/avro/message/TestBinaryMessageEncoding.java
index 0c87189f1..4cb6c38d5 100644
--- 
a/lang/java/avro/src/test/java/org/apache/avro/message/TestBinaryMessageEncoding.java
+++ 
b/lang/java/avro/src/test/java/org/apache/avro/message/TestBinaryMessageEncoding.java
@@ -20,14 +20,8 @@
 package org.apache.avro.message;
 
 import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Ordering;
-import com.google.common.collect.Sets;
+import java.util.*;
+
 import org.apache.avro.AvroRuntimeException;
 import org.apache.avro.Schema;
 import org.apache.avro.SchemaBuilder;
@@ -38,33 +32,33 @@
 import org.junit.Test;
 
 public class TestBinaryMessageEncoding {
-  public static final Schema SCHEMA_V1 = SchemaBuilder.record("TestRecord")
+  private static final Schema SCHEMA_V1 = SchemaBuilder.record("TestRecord")
   .fields()
   .requiredInt("id")
   .optionalString("msg")
   .endRecord();
 
-  public static final GenericRecordBuilder V1_BUILDER =
+  private static final GenericRecordBuilder V1_BUILDER =
   new GenericRecordBuilder(SCHEMA_V1);
 
-  public static final List V1_RECORDS = Arrays.asList(
+  private static final List V1_RECORDS = Arrays.asList(
   V1_BUILDER.set("id", 1).set("msg", "m-1").build(),
   V1_BUILDER.set("id", 2).set("msg", "m-2").build(),
   V1_BUILDER.set("id", 4).set("msg", "m-4").build(),
   V1_BUILDER.set("id", 6).set("msg", "m-6").build()
   );
 
-  public static final Schema SCHEMA_V2 = SchemaBuilder.record("TestRecord")
+  private static final Schema SCHEMA_V2 = SchemaBuilder.record("TestRecord")
   .fields()
   .requiredLong("id")
   .name("message").aliases("msg").type().optional().stringType()
   .optionalDouble("data")
   .endRecord();
 
-  public static final GenericRecordBuilder V2_BUILDER =
+  private static final GenericRecordBuilder V2_BUILDER =
   new GenericRecordBuilder(SCHEMA_V2);
 
-  public static final List V2_RECORDS = Arrays.asList(
+  private static final List V2_RECORDS = Arrays.asList(
   V2_BUILDER.set("id", 3L).set("message", "m-3").set("data", 12.3).build(),
   V2_BUILDER.set("id", 5L).set("message", "m-5").set("data", 23.4).build(),
   V2_BUILDER.set("id", 7L).set("message", "m-7").set("data", 34.5).build(),
@@ -73,29 +67,25 @@
 
   @Test
   public void testByteBufferRoundTrip() throws Exception {
-MessageEncoder encoder = new BinaryMessageEncoder<>(
-GenericData.get(), SCHEMA_V2);
-MessageDecoder decoder = new BinaryMessageDecoder<>(
-GenericData.get(), SCHEMA_V2);
+MessageEncoder encoder = new 
BinaryMessageEncoder<>(GenericData.get(), SCHEMA_V2);
+MessageDecoder decoder = new 
BinaryMessageDecoder<>(GenericData.get(), SCHEMA_V2);
 
 Record copy = decoder.decode(encoder.encode(V2_RECORDS.get(0)));
 
-Assert.assertTrue("Copy should not be the same object",
-copy != V2_RECORDS.get(0));
-Assert.assertEquals("Record should be identical after round-trip",
-V2_RECORDS.get(0), copy);
+Assert.assertNotSame("Copy should not be the same object", copy, 
V2_RECORDS.get(0));
+Assert.assertEquals("Record should be identical after round-trip", 
V2_RECORDS.get(0), copy);
   }
 
   @Test
   public void testSchemaEvolution() throws Exception {
-List buffers = Lists.newArrayList();
-List records = Ordering.usingToString().sortedCopy(
-Iterables.concat(V1_RECORDS, V2_RECORDS));
+List buffers = new ArrayList<>();
+List records = new ArrayList<>();
+
+records.addAll(V1_RECORDS);
+records.addAll(V2_RECORDS);
 
-MessageEncoder v1Encoder = new BinaryMessageEncoder<>(
-GenericData.get(), 

[jira] [Resolved] (AVRO-2265) Remove Guava as a dependency

2018-11-13 Thread Fokko Driesprong (JIRA)


 [ 
https://issues.apache.org/jira/browse/AVRO-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fokko Driesprong resolved AVRO-2265.

Resolution: Fixed

> Remove Guava as a dependency
> 
>
> Key: AVRO-2265
> URL: https://issues.apache.org/jira/browse/AVRO-2265
> Project: Apache Avro
>  Issue Type: Task
>  Components: java
>Affects Versions: 1.8.2
>Reporter: Fokko Driesprong
>Assignee: Fokko Driesprong
>Priority: Major
> Fix For: 1.9.0
>
>
> Get rid of Guava in the tests. Guava is a dependency that can easily clash 
> with different versions. Since it is used very little, it makes sense to get 
> rid of it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2238) Update Docker image from java to openjdk

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16684891#comment-16684891
 ] 

ASF GitHub Bot commented on AVRO-2238:
--

Fokko commented on issue #378: [WIP] AVRO-2238 Update Dockerfile base image 
from java to openjdk
URL: https://github.com/apache/avro/pull/378#issuecomment-438183369
 
 
   Hi @thiru-apache 
   
   I don't think you're doing anything wrong. The thing is that the old base 
image, is really old.
   
   The new openjdk images is build on top of a newer version of Debian:
   ```
   MacBook-Pro-van-Fokko:avro fokkodriesprong$ docker run -t -i java:8-jdk bash
   root@9fd273407ac9:/# cat /etc/debian_version
   8.7
   
   MacBook-Pro-van-Fokko:avro fokkodriesprong$ docker run -t -i openjdk:8 bash
   root@ef91dc01b7bd:/# cat /etc/debian_version
   9.5
   ```
   Where:
   - Debian 9 (stretch) — current stable release
   - Debian 8 (jessie) — obsolete stable release
   
   With updating to Debian 9 we also get newer versions from Perl, Python, 
Javascript etc. So we need to check how much effort it is to fix this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Update Docker image from java to openjdk
> 
>
> Key: AVRO-2238
> URL: https://issues.apache.org/jira/browse/AVRO-2238
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: docker
>Reporter: Fokko Driesprong
>Priority: Major
>
> Currently the docker image to run the tests is still using java which is 
> deprecated: https://hub.docker.com/_/java/
> Therefore we should move to openjdk (https://hub.docker.com/_/openjdk/). 
> Starting with version 8, and also adding 10 and 11 to it to make sure that 
> Avro is compatible with future version of Java.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-1702) Add LogicalType support to c++ library

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16684889#comment-16684889
 ] 

ASF GitHub Bot commented on AVRO-1702:
--

thiru-apache commented on issue #379: AVRO-1702: Added support for logical 
types in the C++ client.
URL: https://github.com/apache/avro/pull/379#issuecomment-438182732
 
 
   Looks good. We do not yet require C++11 as a requirement. Hence raw literals 
are not supported. Here is the patch that fixes the problem: 
https://github.com/thiru-apache/avro/commit/978ccb8b1fde877d0f807bdf1ec102434cc78fd4.
 Please apply that change. Thank you.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add LogicalType support to c++ library
> --
>
> Key: AVRO-1702
> URL: https://issues.apache.org/jira/browse/AVRO-1702
> Project: Apache Avro
>  Issue Type: New Feature
>  Components: c++
>Reporter: peter liu
>Assignee: peter liu
>Priority: Major
>
> I'd like to port the logicaltype support to c++ library



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)