[jira] [Assigned] (AVRO-2350) Use Switch Statement for Strings in LogicalTypes

2019-03-11 Thread David Mollitor (JIRA)


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

David Mollitor reassigned AVRO-2350:


Assignee: David Mollitor

> Use Switch Statement for Strings in LogicalTypes
> 
>
> Key: AVRO-2350
> URL: https://issues.apache.org/jira/browse/AVRO-2350
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.9.0
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>
> https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java#L59-L101
> {quote}
> The switch statement compares the String object in its expression with the 
> expressions associated with each case label as if it were using the 
> String.equals method; consequently, the comparison of String objects in 
> switch statements is case sensitive. The Java compiler generates generally 
> more efficient bytecode from switch statements that use String objects than 
> from chained if-then-else statements.
> https://docs.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html
> {quote}



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


[jira] [Created] (AVRO-2350) Use Switch Statement for Strings in LogicalTypes

2019-03-11 Thread David Mollitor (JIRA)
David Mollitor created AVRO-2350:


 Summary: Use Switch Statement for Strings in LogicalTypes
 Key: AVRO-2350
 URL: https://issues.apache.org/jira/browse/AVRO-2350
 Project: Apache Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.9.0
Reporter: David Mollitor


https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java#L59-L101

{quote}
The switch statement compares the String object in its expression with the 
expressions associated with each case label as if it were using the 
String.equals method; consequently, the comparison of String objects in switch 
statements is case sensitive. The Java compiler generates generally more 
efficient bytecode from switch statements that use String objects than from 
chained if-then-else statements.

https://docs.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html
{quote}



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


[jira] [Updated] (AVRO-2349) Review Usage of Arrays.asList

2019-03-11 Thread David Mollitor (JIRA)


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

David Mollitor updated AVRO-2349:
-
Priority: Minor  (was: Trivial)

> Review Usage of Arrays.asList
> -
>
> Key: AVRO-2349
> URL: https://issues.apache.org/jira/browse/AVRO-2349
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.9.0
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>
> The method {{Arrays.asList}} is used in several different places in the 
> project and is used differently each place.  I have reviewed all uses of it 
> and made it consistent and removed it in a couple of places that would be 
> better implemented with a different approach.



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


[jira] [Created] (AVRO-2349) Review Usage of Arrays.asList

2019-03-11 Thread David Mollitor (JIRA)
David Mollitor created AVRO-2349:


 Summary: Review Usage of Arrays.asList
 Key: AVRO-2349
 URL: https://issues.apache.org/jira/browse/AVRO-2349
 Project: Apache Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.9.0
Reporter: David Mollitor
Assignee: David Mollitor


The method {{Arrays.asList}} is used in several different places in the project 
and is used differently each place.  I have reviewed all uses of it and made it 
consistent and removed it in a couple of places that would be better 
implemented with a different approach.



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


[jira] [Created] (AVRO-2348) Remove use of Deprecated createJsonParser

2019-03-11 Thread David Mollitor (JIRA)
David Mollitor created AVRO-2348:


 Summary: Remove use of Deprecated createJsonParser
 Key: AVRO-2348
 URL: https://issues.apache.org/jira/browse/AVRO-2348
 Project: Apache Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.9.0
Reporter: David Mollitor


{code}
@Deprecated
public JsonParser createJsonParser(byte[] data)
throws IOException,
   JsonParseException
Deprecated. Since 2.2, use createParser(byte[]) instead.
{code}

https://fasterxml.github.io/jackson-core/javadoc/2.5/com/fasterxml/jackson/core/JsonFactory.html#createJsonParser(byte[])



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


[jira] [Assigned] (AVRO-2348) Remove use of Deprecated createJsonParser

2019-03-11 Thread David Mollitor (JIRA)


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

David Mollitor reassigned AVRO-2348:


Assignee: David Mollitor

> Remove use of Deprecated createJsonParser
> -
>
> Key: AVRO-2348
> URL: https://issues.apache.org/jira/browse/AVRO-2348
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.9.0
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>
> {code}
> @Deprecated
> public JsonParser createJsonParser(byte[] data)
> throws IOException,
>JsonParseException
> Deprecated. Since 2.2, use createParser(byte[]) instead.
> {code}
> https://fasterxml.github.io/jackson-core/javadoc/2.5/com/fasterxml/jackson/core/JsonFactory.html#createJsonParser(byte[])



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


[jira] [Commented] (AVRO-2347) Use Java8 Map API for SpecificData

2019-03-11 Thread Hudson (JIRA)


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

Hudson commented on AVRO-2347:
--

SUCCESS: Integrated in Jenkins build AvroJava #618 (See 
[https://builds.apache.org/job/AvroJava/618/])
AVRO-2347: Use Java8 Map API for SpecificData (dan: 
[https://github.com/apache/avro/commit/6d0698705299e67e2f463216b95bf962ab6f11a2])
* (edit) lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java


> Use Java8 Map API for SpecificData
> --
>
> Key: AVRO-2347
> URL: https://issues.apache.org/jira/browse/AVRO-2347
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.9.0
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>




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


[jira] [Commented] (AVRO-2340) Use JDK compareTo and hashcode Methods

2019-03-11 Thread Hudson (JIRA)


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

Hudson commented on AVRO-2340:
--

SUCCESS: Integrated in Jenkins build AvroJava #618 (See 
[https://builds.apache.org/job/AvroJava/618/])
AVRO-2340: Use JDK compareTo and hashcode Methods (dan: 
[https://github.com/apache/avro/commit/ef8349ffd6da5c6f4693ac46548c96e22eeb7cd7])
* (edit) lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
* (edit) lang/java/avro/src/main/java/org/apache/avro/io/BinaryData.java
* (edit) lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java


> Use JDK compareTo and hashcode Methods
> --
>
> Key: AVRO-2340
> URL: https://issues.apache.org/jira/browse/AVRO-2340
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>
> There are a few different ways that {{hashCode()}} and {{compare}} are 
> implemented.  Just use the JDK methods.
> I set a breakpoint and ran the 'perf' program, but it did not hit, so these 
> methods are not on the critical paths.  Best to do this work in a consistent 
> behavior.



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


[jira] [Commented] (AVRO-2341) Simplify ByteArrayByteSource Min Buffer Size

2019-03-11 Thread Hudson (JIRA)


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

Hudson commented on AVRO-2341:
--

SUCCESS: Integrated in Jenkins build AvroJava #618 (See 
[https://builds.apache.org/job/AvroJava/618/])
AVRO-2341: Simplify ByteArrayByteSource Min Buffer Size (dan: 
[https://github.com/apache/avro/commit/8c3c590d7bfa6d486f5741c5e2f5214a1f2436c1])
* (edit) lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java


> Simplify ByteArrayByteSource Min Buffer Size
> 
>
> Key: AVRO-2341
> URL: https://issues.apache.org/jira/browse/AVRO-2341
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Trivial
>




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


Jenkins build is back to normal : AvroJava #618

2019-03-11 Thread Apache Jenkins Server
See 



[jira] [Commented] (AVRO-2347) Use Java8 Map API for SpecificData

2019-03-11 Thread ASF subversion and git services (JIRA)


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

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

Commit 6d0698705299e67e2f463216b95bf962ab6f11a2 in avro's branch 
refs/heads/master from Beluga Behr
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=6d06987 ]

AVRO-2347: Use Java8 Map API for SpecificData


> Use Java8 Map API for SpecificData
> --
>
> Key: AVRO-2347
> URL: https://issues.apache.org/jira/browse/AVRO-2347
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.9.0
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>




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


[jira] [Commented] (AVRO-2341) Simplify ByteArrayByteSource Min Buffer Size

2019-03-11 Thread ASF subversion and git services (JIRA)


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

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

Commit 8c3c590d7bfa6d486f5741c5e2f5214a1f2436c1 in avro's branch 
refs/heads/master from Beluga Behr
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=8c3c590 ]

AVRO-2341: Simplify ByteArrayByteSource Min Buffer Size


> Simplify ByteArrayByteSource Min Buffer Size
> 
>
> Key: AVRO-2341
> URL: https://issues.apache.org/jira/browse/AVRO-2341
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Trivial
>




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


[jira] [Commented] (AVRO-2340) Use JDK compareTo and hashcode Methods

2019-03-11 Thread ASF subversion and git services (JIRA)


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

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

Commit ef8349ffd6da5c6f4693ac46548c96e22eeb7cd7 in avro's branch 
refs/heads/master from Beluga Behr
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=ef8349f ]

AVRO-2340: Use JDK compareTo and hashcode Methods


> Use JDK compareTo and hashcode Methods
> --
>
> Key: AVRO-2340
> URL: https://issues.apache.org/jira/browse/AVRO-2340
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>
> There are a few different ways that {{hashCode()}} and {{compare}} are 
> implemented.  Just use the JDK methods.
> I set a breakpoint and ran the 'perf' program, but it did not hit, so these 
> methods are not on the critical paths.  Best to do this work in a consistent 
> behavior.



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


[jira] [Assigned] (AVRO-2347) Use Java8 Map API for SpecificData

2019-03-11 Thread David Mollitor (JIRA)


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

David Mollitor reassigned AVRO-2347:


Assignee: David Mollitor

> Use Java8 Map API for SpecificData
> --
>
> Key: AVRO-2347
> URL: https://issues.apache.org/jira/browse/AVRO-2347
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.9.0
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Minor
>




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


[jira] [Created] (AVRO-2347) Use Java8 Map API for SpecificData

2019-03-11 Thread David Mollitor (JIRA)
David Mollitor created AVRO-2347:


 Summary: Use Java8 Map API for SpecificData
 Key: AVRO-2347
 URL: https://issues.apache.org/jira/browse/AVRO-2347
 Project: Apache Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.9.0
Reporter: David Mollitor






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


[jira] [Commented] (AVRO-2346) Introduce JMH Performance Testing Framework

2019-03-11 Thread David Mollitor (JIRA)


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

David Mollitor commented on AVRO-2346:
--

https://github.com/apache/avro/pull/476

> Introduce JMH Performance Testing Framework
> ---
>
> Key: AVRO-2346
> URL: https://issues.apache.org/jira/browse/AVRO-2346
> Project: Apache Avro
>  Issue Type: New Feature
>  Components: java
>Affects Versions: 1.9.0
>Reporter: David Mollitor
>Assignee: David Mollitor
>Priority: Major
>
> There exists already a {{org.apache.avro.io.Perf.java}} testing framework.  
> Very well done.
> However, I would like to introduce a new module to the Avro Java project that 
> leverages the OpenJDK JMH performance testing framework.  The framework will 
> allow the testing performance harness to keep up with the latest in 
> performance testing.
> https://openjdk.java.net/projects/code-tools/jmh/
> I expect that this testing framework will require a few revisions to get it 
> "right," meaning producing actionable information.  This will require a hard 
> look by some domain experts.



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


[jira] [Created] (AVRO-2346) Introduce JMH Performance Testing Framework

2019-03-11 Thread David Mollitor (JIRA)
David Mollitor created AVRO-2346:


 Summary: Introduce JMH Performance Testing Framework
 Key: AVRO-2346
 URL: https://issues.apache.org/jira/browse/AVRO-2346
 Project: Apache Avro
  Issue Type: New Feature
  Components: java
Affects Versions: 1.9.0
Reporter: David Mollitor
Assignee: David Mollitor


There exists already a {{org.apache.avro.io.Perf.java}} testing framework.  
Very well done.

However, I would like to introduce a new module to the Avro Java project that 
leverages the OpenJDK JMH performance testing framework.  The framework will 
allow the testing performance harness to keep up with the latest in performance 
testing.

https://openjdk.java.net/projects/code-tools/jmh/


I expect that this testing framework will require a few revisions to get it 
"right," meaning producing actionable information.  This will require a hard 
look by some domain experts.



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


[jira] [Created] (AVRO-2345) Export getSchema() to bypass using reflection

2019-03-11 Thread Ryo Okubo (JIRA)
Ryo Okubo created AVRO-2345:
---

 Summary: Export getSchema() to bypass using reflection
 Key: AVRO-2345
 URL: https://issues.apache.org/jira/browse/AVRO-2345
 Project: Apache Avro
  Issue Type: Improvement
  Components: java
Reporter: Ryo Okubo


I'd like to use {{getSchema(descriptor)}} directly to enable 1) to get schema 
from protobuf instance doesn't have {{getDescriptor()}} created from reflection 
and 2) to pass not protoc-java classes e.g. Scala classes generated by 
[ScalaPB|https://github.com/scalapb/ScalaPB] has {{javaDescriptor()}} instread 
of {{getDescriptor()}}.



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


[jira] [Created] (AVRO-2344) Handle google.protobuf.Timestamp as timestamp logical type in Avro

2019-03-11 Thread Ryo Okubo (JIRA)
Ryo Okubo created AVRO-2344:
---

 Summary: Handle google.protobuf.Timestamp as timestamp logical 
type in Avro 
 Key: AVRO-2344
 URL: https://issues.apache.org/jira/browse/AVRO-2344
 Project: Apache Avro
  Issue Type: Improvement
  Components: java
Reporter: Ryo Okubo


Current avro-protobuf converts google.protobuf.Timestamp to simply record but 
I'd like to get timestamp logical type. 

 

refs"
 * proto 
[https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto]
 * avro [https://avro.apache.org/docs/1.8.0/spec.html#Logical+Types]



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