[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #248: AVRO-2079: Add ability to generate Java8 native 
date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-426295060
 
 
   I have an account, my username's also pvorb over there, but I have no 
permissions to change the assignee of that ticket. You can assign me if you 
like.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
> Fix For: 1.9.0
>
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

nandorKollar closed pull request #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248
 
 
   

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/src/main/java/org/apache/avro/data/Java8TimeConversions.java 
b/lang/java/avro/src/main/java/org/apache/avro/data/Java8TimeConversions.java
new file mode 100644
index 0..b172bd887
--- /dev/null
+++ 
b/lang/java/avro/src/main/java/org/apache/avro/data/Java8TimeConversions.java
@@ -0,0 +1,158 @@
+/**
+ * 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.
+ */
+
+package org.apache.avro.data;
+
+import org.apache.avro.Conversion;
+import org.apache.avro.LogicalType;
+import org.apache.avro.Schema;
+
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.util.concurrent.TimeUnit;
+
+public class Java8TimeConversions {
+  public static class DateConversion extends Conversion {
+
+@Override
+public Class getConvertedType() {
+  return LocalDate.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "date";
+}
+
+@Override
+public LocalDate fromInt(Integer daysFromEpoch, Schema schema, LogicalType 
type) {
+  return LocalDate.ofEpochDay(daysFromEpoch);
+}
+
+@Override
+public Integer toInt(LocalDate date, Schema schema, LogicalType type) {
+  long epochDays = date.toEpochDay();
+
+  return Math.toIntExact(epochDays);
+}
+  }
+
+  public static class TimeMillisConversion extends Conversion {
+@Override
+public Class getConvertedType() {
+  return LocalTime.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "time-millis";
+}
+
+@Override
+public LocalTime fromInt(Integer millisFromMidnight, Schema schema, 
LogicalType type) {
+  return 
LocalTime.ofNanoOfDay(TimeUnit.MILLISECONDS.toNanos(millisFromMidnight));
+}
+
+@Override
+public Integer toInt(LocalTime time, Schema schema, LogicalType type) {
+  return 
Math.toIntExact(TimeUnit.NANOSECONDS.toMillis(time.toNanoOfDay()));
+}
+  }
+
+  public static class TimeMicrosConversion extends Conversion {
+@Override
+public Class getConvertedType() {
+  return LocalTime.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "time-micros";
+}
+
+@Override
+public LocalTime fromLong(Long microsFromMidnight, Schema schema, 
LogicalType type) {
+  return 
LocalTime.ofNanoOfDay(TimeUnit.MICROSECONDS.toNanos(microsFromMidnight));
+}
+
+@Override
+public Long toLong(LocalTime time, Schema schema, LogicalType type) {
+  return TimeUnit.NANOSECONDS.toMicros(time.toNanoOfDay());
+}
+  }
+
+  public static class TimestampMillisConversion extends Conversion {
+@Override
+public Class getConvertedType() {
+  return Instant.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "timestamp-millis";
+}
+
+@Override
+public Instant fromLong(Long millisFromEpoch, Schema schema, LogicalType 
type) {
+  return Instant.ofEpochMilli(millisFromEpoch);
+}
+
+@Override
+public Long toLong(Instant timestamp, Schema schema, LogicalType type) {
+  return timestamp.toEpochMilli();
+}
+  }
+
+  public static class TimestampMicrosConversion extends Conversion {
+@Override
+public Class getConvertedType() {
+  return Instant.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "timestamp-micros";
+}
+
+@Override
+public Instant fromLong(Long microsFromEpoch, Schema schema, LogicalType 
type) {
+  long epochSeconds = microsFromEpoch / (1_000_000);

[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

nandorKollar commented on issue #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-426280537
 
 
   Sure I'll. @pvorb could you please assign AVRO-2079 to yourself, if you have 
an Apache Jira account?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
> Fix For: 1.9.0
>
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #248: AVRO-2079: Add ability to generate Java8 native 
date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-426264250
 
 
   @nandorKollar Since you merged #309, could you close this old pull request?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
> Fix For: 1.9.0
>
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-426263732
 
 
   Thanks, @nandorKollar!


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
> Fix For: 1.9.0
>
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-01 Thread Daniel Kulp (JIRA)


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

Daniel Kulp commented on AVRO-2079:
---

Note:  I'm getting a random failure in one of the tests:


{code:java}
Failed tests:
  TestSpecificLogicalTypes.testAbilityToReadJsr310RecordWrittenAsJodaRecord:148
Expected: is "16:10:08.420"
 but: was "16:10:08.42"
{code}


> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
> Fix For: 1.9.0
>
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-01 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

nandorKollar commented on issue #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-425855240
 
 
   Merged to master, thanks @aukevanleeuwen and @pvorb for working on 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


> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-01 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

nandorKollar closed pull request #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309
 
 
   

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/src/main/java/org/apache/avro/data/Jsr310TimeConversions.java 
b/lang/java/avro/src/main/java/org/apache/avro/data/Jsr310TimeConversions.java
new file mode 100644
index 0..a717bbc9f
--- /dev/null
+++ 
b/lang/java/avro/src/main/java/org/apache/avro/data/Jsr310TimeConversions.java
@@ -0,0 +1,184 @@
+/*
+ * 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.
+ */
+
+package org.apache.avro.data;
+
+import org.apache.avro.Conversion;
+import org.apache.avro.LogicalType;
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.util.concurrent.TimeUnit;
+
+public class Jsr310TimeConversions {
+  public static class DateConversion extends Conversion {
+
+@Override
+public Class getConvertedType() {
+  return LocalDate.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "date";
+}
+
+@Override
+public LocalDate fromInt(Integer daysFromEpoch, Schema schema, LogicalType 
type) {
+  return LocalDate.ofEpochDay(daysFromEpoch);
+}
+
+@Override
+public Integer toInt(LocalDate date, Schema schema, LogicalType type) {
+  long epochDays = date.toEpochDay();
+
+  return (int) epochDays;
+}
+
+@Override
+public Schema getRecommendedSchema() {
+  return LogicalTypes.date().addToSchema(Schema.create(Schema.Type.INT));
+}
+  }
+
+  public static class TimeMillisConversion extends Conversion {
+@Override
+public Class getConvertedType() {
+  return LocalTime.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "time-millis";
+}
+
+@Override
+public LocalTime fromInt(Integer millisFromMidnight, Schema schema, 
LogicalType type) {
+  return 
LocalTime.ofNanoOfDay(TimeUnit.MILLISECONDS.toNanos(millisFromMidnight));
+}
+
+@Override
+public Integer toInt(LocalTime time, Schema schema, LogicalType type) {
+  return (int) TimeUnit.NANOSECONDS.toMillis(time.toNanoOfDay());
+}
+
+@Override
+public Schema getRecommendedSchema() {
+  return 
LogicalTypes.timeMillis().addToSchema(Schema.create(Schema.Type.INT));
+}
+  }
+
+  public static class TimeMicrosConversion extends Conversion {
+@Override
+public Class getConvertedType() {
+  return LocalTime.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "time-micros";
+}
+
+@Override
+public LocalTime fromLong(Long microsFromMidnight, Schema schema, 
LogicalType type) {
+  return 
LocalTime.ofNanoOfDay(TimeUnit.MICROSECONDS.toNanos(microsFromMidnight));
+}
+
+@Override
+public Long toLong(LocalTime time, Schema schema, LogicalType type) {
+  return TimeUnit.NANOSECONDS.toMicros(time.toNanoOfDay());
+}
+
+@Override
+public Schema getRecommendedSchema() {
+  return 
LogicalTypes.timeMicros().addToSchema(Schema.create(Schema.Type.LONG));
+}
+  }
+
+  public static class TimestampMillisConversion extends Conversion {
+@Override
+public Class getConvertedType() {
+  return Instant.class;
+}
+
+@Override
+public String getLogicalTypeName() {
+  return "timestamp-millis";
+}
+
+@Override
+public Instant fromLong(Long millisFromEpoch, Schema schema, LogicalType 
type) {
+  return Instant.ofEpochMilli(millisFromEpoch);
+}
+
+@Override
+public Long toLong(Instant timestamp, Schema schema, LogicalType 

[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-01 Thread ASF subversion and git services (JIRA)


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

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

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

AVRO-2079: Add ability to generate Java8 native date/time classes (new) (#309)

AVRO-2079: Add ability to use Java 8 date/time types instead of Joda time.

Add compiler option to allow generating Java 8 date/time classes instead of 
Joda time. This commit adds a new optional compiler option 
-dateTimeLogicalTypeImpl to specify which date/time implementation to use. It 
could be joda or jsr310, if not specified by, then the default is joda.

> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-10-01 Thread ASF subversion and git services (JIRA)


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

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

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

AVRO-2079: Add ability to generate Java8 native date/time classes (new) (#309)

AVRO-2079: Add ability to use Java 8 date/time types instead of Joda time.

Add compiler option to allow generating Java 8 date/time classes instead of 
Joda time. This commit adds a new optional compiler option 
-dateTimeLogicalTypeImpl to specify which date/time implementation to use. It 
could be joda or jsr310, if not specified by, then the default is joda.

> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-25 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-424380475
 
 
   @nandorKollar I changed the code according to your requests. Good spot about 
overriding the `getRecommendedSchema()` methods in each conversion!


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-25 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

nandorKollar commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r220208975
 
 

 ##
 File path: 
lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
 ##
 @@ -153,16 +174,38 @@ public SpecificCompiler(Protocol protocol) {
   }
 
   public SpecificCompiler(Schema schema) {
-this();
+this(schema, DateTimeLogicalTypeImplementation.JODA);
+  }
+
+  public SpecificCompiler(Schema schema, DateTimeLogicalTypeImplementation 
dateTimeLogicalTypeImplementation) {
+this(dateTimeLogicalTypeImplementation);
 enqueue(schema);
 this.protocol = null;
   }
 
+  /**
+   * Creates a specific compler with the default (Joda) type for date/time 
related logical types.
 
 Review comment:
   nit: compler -> compiler


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-25 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

nandorKollar commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r220208860
 
 

 ##
 File path: 
lang/java/avro/src/main/java/org/apache/avro/data/Jsr310TimeConversions.java
 ##
 @@ -0,0 +1,158 @@
+/*
+ * 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.
+ */
+
+package org.apache.avro.data;
+
+import org.apache.avro.Conversion;
+import org.apache.avro.LogicalType;
+import org.apache.avro.Schema;
+
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.util.concurrent.TimeUnit;
+
+public class Jsr310TimeConversions {
 
 Review comment:
   It would be nice to override getRecommendedSchema methods for each 
conversion similar as in the Joda time conversion class (TimeConversions)


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

Fokko commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-424006938
 
 
   I've ran some tests against 
[Divolte](https://github.com/divolte/divolte-collector) and it looks great. Can 
we get this merged?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-18 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

kgalieva commented on issue #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-422528812
 
 
   @malcolmrobbins You need to add 
`jsr310` 
into `configuration` section.
   
   @pvorb thank you! This patch works fine on our schemas!


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-16 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

malcolmrobbins commented on issue #309: AVRO-2079: Add ability to generate 
Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-421868660
 
 
   FYI I overcame this problem.  To do this I simply needed to run the build.sh 
script in the lang/java folder rather than following the more explicit mvn 
instructions in the How To Contribute guide.  Now I just need to figure out how 
to get the avro-maven-plugin to generate Java sources that use Java 8 datetime 
rather than Joda


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

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


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

ASF GitHub Bot commented on AVRO-2079:
--

malcolmrobbins edited a comment on issue #309: AVRO-2079: Add ability to 
generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-421226180
 
 
   Thanks for that - I took a copy of your branch and tried a mvn test install 
and the build failed on Apache Avro Tools with an error that indicates a 
dependency on avro-mapred:jar:tests could not be satisfied.  
   Note that building mapred worked fine but unlike the other modules it didn't 
build a tests jar and this seems to be the root cause of the dependency error.
   The actual error was:
   
   [ERROR] Failed to execute goal on project avro-tools: Could not resolve 
dependencies for project org.apache.avro:avro-tools:jar:1.9.0-SNAPSHOT: Could 
not find artifact org.apache.avro:avro-mapred:jar:tests:1.9.0-SNAPSHOT -> [Help 
1]
   
   Do have any pointers as to how I can overcome this?  Thanks in advance.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

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


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

ASF GitHub Bot commented on AVRO-2079:
--

malcolmrobbins commented on issue #309: AVRO-2079: Add ability to generate 
Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-421226180
 
 
   Thanks for that - I took a copy of your branch and tried a mvn test install 
and the build failed on Apache Avro Tools with an error that indicates a 
dependency on avro-mapred:jar:tests could not be satisfied.  The actual error 
is:
   
   [ERROR] Failed to execute goal on project avro-tools: Could not resolve 
dependencies for project org.apache.avro:avro-tools:jar:1.9.0-SNAPSHOT: Could 
not find artifact org.apache.avro:avro-mapred:jar:tests:1.9.0-SNAPSHOT -> [Help 
1]
   
   Do have any pointers as to how I can overcome this?  Thanks in advance.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

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


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-421075273
 
 
   @malcolmrobbins Feel free to do this. Don't expect an official release with 
this change anytime soon.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

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


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

ASF GitHub Bot commented on AVRO-2079:
--

rocketraman commented on issue #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-42103
 
 
   LOL: https://issues.apache.org/jira/browse/AVRO-2210


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

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


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

ASF GitHub Bot commented on AVRO-2079:
--

malcolmrobbins commented on issue #309: AVRO-2079: Add ability to generate 
Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-420913712
 
 
   i.e. can I get hold of vorb:use-java8-time for our "private use" until it 
becomes generally available


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-12 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

malcolmrobbins commented on issue #309: AVRO-2079: Add ability to generate 
Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-420605247
 
 
   Hi pvorb,
   we're really keen to get hold of Java8 time support within AVRO, even if 
this means creating our own fork for a while as we're about to undertake a 
significant project...  What would it take for me to do this ?  i.e. can I pull 
the changes and apply this to my own fork of the code?  Alternatively is there 
an AVRO release imminent to save me the trouble?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-01 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb edited a comment on issue #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-417861922
 
 
   This PR and [its precursor](248) are by far the most upvoted pull requests 
for this project. Probably it’s worth considering to merge it?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-09-01 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-417861922
 
 
   This PR and [its precursor](#248) are by far the most upvoted pull requests 
for this project. Probably it’s worth considering to merge it?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-06-27 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-400647814
 
 
   @cutting Can you please have a look? Is there anything that needs to be 
changed before merging this request? It would be nice to get some feedback 
given the time me and others invested into it.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-06-01 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-393883006
 
 
   @nandorKollar Is there anything else I can do?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-06-01 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-391153063
 
 
   Recent changes:
   
   - added a commit that replaces `JAVA8` by `JSR310` as suggested by me 
earlier in this thread. If anybody from the Avro project disagrees with that 
change, I will remove it.
   
   - removed the runtime dependency on Guava's `Strings` class from the 
`AbstractAvroMojo`, which caused the archetype modules to fail.
   
   - added a new entry in the `CHANGES.txt` describing the feature


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-391280602
 
 
   @nandorKollar Just saw that you want to remove `CHANGES.txt` in #310, so I 
removed the new entry in order to prevent a merge conflict.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-22 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #309: AVRO-2079: Add ability to generate Java8 native 
date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-391153063
 
 
   Recent changes:
   
   - added a commit that replaces `JAVA8` by `JSR310` as suggested by me 
earlier in this thread. If anybody from the Avro project disagrees with that 
change, I will remove it.
   
   - removed the runtime dependency on Guava's `Strings` class from the 
`AbstractAvroMojo`, which caused the archetype modules to fail.
   
   - added a new entry in the `CHANGES.txt` describing the feature
   
   @nandorKollar Is there anything else I can do?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on a change in pull request #309: AVRO-2079: Add ability to 
generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r189080338
 
 

 ##
 File path: 
lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java
 ##
 @@ -164,7 +181,7 @@ public String getShortDescription() {
   System.err.println("No input files found.");
 }
 
-return fileSet.toArray((new File[fileSet.size()]));
+return fileSet.toArray(new File[0]);
 
 Review comment:
   @nandorKollar If you prefer `toArray(new File[fileSet.size()])`, I can 
revert it of course.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on a change in pull request #309: AVRO-2079: Add ability to 
generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r189016664
 
 

 ##
 File path: 
lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java
 ##
 @@ -164,7 +181,7 @@ public String getShortDescription() {
   System.err.println("No input files found.");
 }
 
-return fileSet.toArray((new File[fileSet.size()]));
+return fileSet.toArray(new File[0]);
 
 Review comment:
   [Here is an excellent 
article](https://shipilev.net/blog/2016/arrays-wisdom-ancients/) that explains 
why nowadays it's better (despite counter intuitive) to use `toArray(new 
File[0])` in favor of `toArray(new File[fileSet.size()])`. The old code was not 
wrong, but I wanted to remove those redundant parentheses and switched to `new 
File[0]` because I was already editing that line. ;-)


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread Michael Werle (JIRA)

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

Michael Werle commented on AVRO-2079:
-

The conventional wisdom of using a pre-sized array to prevent throwing out the 
original one is wrong for modern VMs.  See the following for exhaustive 
performance testing:

[https://shipilev.net/blog/2016/arrays-wisdom-ancients/]

> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

nandorKollar commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r189011365
 
 

 ##
 File path: 
lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java
 ##
 @@ -164,7 +181,7 @@ public String getShortDescription() {
   System.err.println("No input files found.");
 }
 
-return fileSet.toArray((new File[fileSet.size()]));
+return fileSet.toArray(new File[0]);
 
 Review comment:
   Why did you change this? Since we know the size of the result array, the 
original code (allocating one before toArray, and passing it) is still fine 
isn't it?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

DolgopolovOleg commented on issue #309: AVRO-2079: Add ability to generate 
Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-389908078
 
 
   Sorry guys, it's really crucial feature for us. What do you think how long 
will it take to approve it?
   Many thanks =)


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread Luke Jackson (JIRA)

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

Luke Jackson commented on AVRO-2079:


[~cutting] the latest PR appears to address the concerns you raised above. Is 
there anything else blocking this change being reviewed and merged? The change 
appears to me to be of good quality and has associated unit tests.

> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on issue #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-389785650
 
 
   @jcustenborder @pvorb has picked up this change in #309, which has addressed 
the remaining comments in this PR. We just need an Avro committer to review and 
merge it...


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on issue #248: AVRO-2079: Add ability to generate Java8 native 
date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-389765161
 
 
   @jcustenborder Did you mean #309?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

jcustenborder commented on issue #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-389597424
 
 
   It looks like there is another pull as well. Check out #248 


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

jcustenborder commented on issue #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-389596598
 
 
   @aukevanleeuwen @lukejackson @Kuroshii Is this pull request dead? Do you 
need someone to pick it up?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb commented on a change in pull request #309: AVRO-2079: Add ability to 
generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r186790457
 
 

 ##
 File path: 
lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
 ##
 @@ -163,9 +163,9 @@ public class ${this.mangle($schema.getName())}#if 
($schema.isError()) extends or
 #if ($this.hasLogicalTypeField($schema))
   protected static final org.apache.avro.Conversions.DecimalConversion 
DECIMAL_CONVERSION = new org.apache.avro.Conversions.DecimalConversion();
 #if ($this.useJodaForDateTimeLogicalTypes())
 
 Review comment:
   Good spot!


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r186711907
 
 

 ##
 File path: 
lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
 ##
 @@ -163,9 +163,9 @@ public class ${this.mangle($schema.getName())}#if 
($schema.isError()) extends or
 #if ($this.hasLogicalTypeField($schema))
   protected static final org.apache.avro.Conversions.DecimalConversion 
DECIMAL_CONVERSION = new org.apache.avro.Conversions.DecimalConversion();
 #if ($this.useJodaForDateTimeLogicalTypes())
 
 Review comment:
   i think this needs to be refactored to use the new 
getDateTimeLogicalTypeImplementation() method


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r186588233
 
 

 ##
 File path: 
lang/java/avro/src/main/java/org/apache/avro/data/JodaTimeConversions.java
 ##
 @@ -28,7 +28,7 @@
 import org.joda.time.LocalDate;
 import org.joda.time.LocalTime;
 
-public class TimeConversions {
+public class JodaTimeConversions {
 
 Review comment:
   I think it makes sense to rename this class, however in [this 
comment](https://issues.apache.org/jira/browse/AVRO-2079?focusedCommentId=16402111=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16402111)
 Doug Cutting states:
   
   > The more back-compatible this is, the easier it will be to include in 
releases.  Currently this renames an existing class, which is not 
back-compatible.  As such, it thus could not be included in a minor, bugfix 
release.
   
   I assume he is referring to this class when he says 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


> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on issue #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-387247072
 
 
   +1 on renaming to JSR310. (Note I am not an Avro committer).


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r186588984
 
 

 ##
 File path: lang/java/maven-plugin/src/test/resources/unit/idl/pom-java8.xml
 ##
 @@ -0,0 +1,69 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+  4.0.0
+
+  
+avro-parent
+org.apache.avro
+1.9.0-SNAPSHOT
+../../../../../../../../../
 
 Review comment:
   relativePath should point to a specific pom.xml file, rather than a 
directory, here and in other pom.xml files touched by this change.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r186588681
 
 

 ##
 File path: 
lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
 ##
 @@ -225,6 +268,14 @@ public void setEnableDecimalLogicalType(boolean 
enableDecimalLogicalType) {
 this.enableDecimalLogicalType = enableDecimalLogicalType;
   }
 
+  public boolean useJodaForDateTimeLogicalTypes() {
 
 Review comment:
   any reason not to expose the enum here? the two getters are not independent, 
and the interface essentially exposes four possible states when there are only 
two.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on a change in pull request #309: AVRO-2079: Add ability 
to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#discussion_r186588233
 
 

 ##
 File path: 
lang/java/avro/src/main/java/org/apache/avro/data/JodaTimeConversions.java
 ##
 @@ -28,7 +28,7 @@
 import org.joda.time.LocalDate;
 import org.joda.time.LocalTime;
 
-public class TimeConversions {
+public class JodaTimeConversions {
 
 Review comment:
   I think it makes sense to rename this class, however in [this 
comment](https://issues.apache.org/jira/browse/AVRO-2079?focusedCommentId=16402111=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16402111)
 Doug Cutting states:
   
   > The more back-compatible this is, the easier it will be to include in 
releases.  Currently this renames an existing class, which is not 
back-compatible.  As such, it thus could not be included in a minor, bugfix 
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


> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

lukejackson commented on issue #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309#issuecomment-387245804
 
 
   Awesome, thanks @pvorb. I was not far off doing the same, as I am also very 
keen to see this feature added.


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-05-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

pvorb opened a new pull request #309: AVRO-2079: Add ability to generate Java8 
native date/time classes (new)
URL: https://github.com/apache/avro/pull/309
 
 
   As there was no progress on #248 for the past few months, I went ahead and 
resolved the merge conflicts of that PR and also fixed the remarks from 
@Kuroshii.
   
   Here's a brief overview of what I've changed:
   
   - Reorder imports in TestJava8TimeConversions.java
   - Directly cast epochDays to int
   - Directly cast millis to int
   - Explicitly format java8 and joda time dates in test
   - Rename DateTimeLogicalTypeType to DateTimeLogicalTypeImplementation
   - Refactor registration of conversions
   - Make DateTimeLigicalTypeImplementation field final
   - Use parent POM version in Maven plugin tests
   - Log warning message about unknown parameter values
   - Remove unused imports
   
   I would also suggest to rename the enum value `JAVA8` and all of its uses to 
`JSR310` because that's more specific to the `java.time.*` APIs introduced in 
Java 8 (see https://jcp.org/en/jsr/detail?id=310). I can add that change if you 
agree.
   
   @Kuroshii I would appreciate if you could review this PR again, so maybe 
we'll have JSR-310 support in the next Avro release. Thanks!


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-04-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

atlantech commented on issue #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-380743833
 
 
   Good improvement. Why still not merged?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-04-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

antonomoon commented on issue #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-380741202
 
 
   Bump!


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-03-16 Thread Doug Cutting (JIRA)

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

Doug Cutting commented on AVRO-2079:


There still seems to be some debate on the best way to implement this.  We can 
commit something once there's consensus.

The more back-compatible this is, the easier it will be to include in releases. 
 Currently this renames an existing class, which is not back-compatible.  As 
such, it thus could not be included in a minor, bugfix release.  The patch is 
also out of date too.

> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2018-03-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

jorgecara commented on issue #248: AVRO-2079: Add ability to generate Java8 
native date/time classes
URL: https://github.com/apache/avro/pull/248#issuecomment-373641745
 
 
   This request seems like a good contribution to the library. Any news on when 
could this be released?


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 ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>Priority: Major
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



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


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2017-11-21 Thread Adam Batkin (JIRA)

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

Adam Batkin commented on AVRO-2079:
---

This isn't a "me too" but I think that this work should be considered a 
high-priority, and here's why: Currently, if you use any logical types, all 
(Specific) generated classes will contain ALL of the built-in conversions, 
which include DATE_CONVERSION, TIME_CONVERSION and TIMESTAMP_CONVERSION. This 
means you MUST include JodaTime on your classpath or you will fail with a 
ClassNotFoundException (org.jora.time.ReadablePartial).

Users of the Decimal logical type are out of luck, unless they want to include 
Joda Time.

I can open a separate Jira, but that isn't needed, if we will see this work in 
the next release. Plus, any fix would likely conflict with this issue, and I'd 
rather not cause confusion if that isn't necessary.

> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2017-10-15 Thread Bridger Howell (JIRA)

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

Bridger Howell commented on AVRO-2079:
--

[~aukevanleeuwen]: I've looked over your PR and left a few nits a bit ago 
(under the username "Kuroshii").

Upon revisiting, I have some higher-level thoughts:
1. It seems weird how, after this PR, the configuration for 
{{SpecificCompiler}} would be mixed between a constructor parameter and 
setters. If we're going to take this approach, my preference would be to 
isolate all the compiler configuration into it's own immutable 
{{SpecificCompilerOptions}} class (and associated builder) that's set once in 
the constructor. Not that you should refactor everything now, but if you're 
lobbying for switching to a different convention, we should create a separate 
ticket and deal with it there.

2. It's nice that you have a lot of tests to be sure that these time 
conversions won't break later, but I dislike how we're expanding the amount 
that we have to check that the compiler output precisely matches predetermined 
files. This is brittle and makes much harder to change {{SpecificCompiler}} for 
unrelated changes. Worst case, when we add new options, we start considering 
every combination of compiler flags and eventually end up with an explosion of 
brittle test cases. I'm not sure of a great solution to this yet, but just 
something I'd like to keep in mind.

3. I would have liked this to handle this situation in a more general way.
* Set a particular compiler option
* Setting that option adds those conversions to the {{SpecificCompiler}} class 
which in turn makes those conversions generally available to the generated code

This last point might seem minor, but I think it would do a lot enable future 
configuration (e.g. users being able to add their own third-party conversions 
to generated classes without needing the {{SpecificCompiler}} to have already 
been prepared for those cases).

Also, I'd appreciate it if a committer could have a look at these changes soon. 
This topic is very significant to the way I use avro, and I'm not very familiar 
with all the particular usages of {{SpecificCompiler}}. 

> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>  Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

2017-09-22 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2079:
--

GitHub user aukevanleeuwen opened a pull request:

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

AVRO-2079: Add ability to generate Java8 native date/time classes

Some remarks:
* I've added the type (either Joda or Java8) to the constructor of the 
`SpecificCompiler`. This mainly because it affects the state of the compiler 
(i.e. it would add/remove converters based on this attribute) and I would 
rather not do this in a setter. 
* I have renamed the original class `TimeConversions` to 
`JodaTimeConversions` for clarity, but it clutters the changeset a bit. I can 
revert that If needed.
* I've generated 
`lang/java/avro/src/test/java/org/apache/avro/specific/TestRecordWithJava8LogicalTypes.java`
 with the new compiler switch `-dateTimeLogicalType java8` and created tests 
for compatibility witgh the already existing generated classes based on the 
Joda time.
* I'm defaulting to Joda time for compatibility reasons. In both Maven and 
the command line generation tool you have the ability to override that default.

Let me know if there's something I'm missing or am overlooking functionally.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/aukevanleeuwen/avro use-java8-time

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/avro/pull/248.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #248


commit 78aae1395cc17e47d73f7595611622535ccc90d3
Author: Auke van Leeuwen 
Date:   2017-09-21T08:01:48Z

AVRO-2079: Add ability to generate Java8 native date/time classes




> Add ability to use Java 8 date/time types instead of Joda time.
> ---
>
> Key: AVRO-2079
> URL: https://issues.apache.org/jira/browse/AVRO-2079
> Project: Avro
>  Issue Type: Improvement
>  Components: java, logical types
>Affects Versions: 1.8.2
>Reporter: Auke van Leeuwen
>
> Currently, for the date/time related logical types, we are generating Joda 
> date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical 
> to also provide the possibility to generate {{java.time.*}} date/time objects 
> instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will 
> default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)