You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@falcon.apache.org by Ruslan Ostafiychuk <ro...@hortonworks.com> on 2014/10/09 13:40:25 UTC
Review Request 26496: Parse json with instances to InstancesResult
with correct dateFormat
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/
-----------------------------------------------------------
Review request for Falcon.
Bugs: falcon-706
https://issues.apache.org/jira/browse/falcon-706
Repository: falcon-git
Description
-------
"startTime": "2014-10-09T04:28:36-07:00" is accepteble now
Diffs
-----
falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
Diff: https://reviews.apache.org/r/26496/diff/
Testing
-------
ProcessInstanceStatusTest
Thanks,
Ruslan Ostafiychuk
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Ruslan Ostafiychuk <ro...@hortonworks.com>.
> On Oct. 9, 2014, 6:09 p.m., Raghav Gautam wrote:
> > falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java, line 174
> > <https://reviews.apache.org/r/26496/diff/1/?file=716643#file716643line174>
> >
> > for testProcessInstanceStatusDateEmpty() I am getting this exception:
> >
> > java.lang.IllegalArgumentException: Illegal pattern character 'X'
> > at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:768)
> > at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:575)
> > at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:500)
> > at com.google.gson.DefaultDateTypeAdapter.<init>(DefaultDateTypeAdapter.java:49)
> > at com.google.gson.GsonBuilder.addTypeAdaptersForDate(GsonBuilder.java:556)
> > at com.google.gson.GsonBuilder.create(GsonBuilder.java:544)
> > at org.apache.falcon.regression.core.util.InstanceUtil.hitUrl(InstanceUtil.java:175)
> > at org.apache.falcon.regression.core.util.InstanceUtil.sendRequestProcessInstance(InstanceUtil.java:93)
> > at org.apache.falcon.regression.core.util.InstanceUtil.createAndSendRequestProcessInstance(InstanceUtil.java:750)
> > at org.apache.falcon.regression.core.interfaces.IEntityManagerHelper.getProcessInstanceStatus(IEntityManagerHelper.java:391)
> > at org.apache.falcon.regression.core.interfaces.IEntityManagerHelper.getProcessInstanceStatus(IEntityManagerHelper.java:383)
> > at org.apache.falcon.regression.ProcessInstanceStatusTest.testProcessInstanceStatusDateEmpty(ProcessInstanceStatusTest.java:178)
> >
> > If I change the format to "yyyy-MM-dd'T'HH:mm:ssZ" - the test goes through but it will not parse 2014-10-07T13:35:42-07:00. The basic issue I think here is that we have both UTC and non-UTC format being returned in the same response (when falcon server is running in non-UTC).
> >
> > I would prefer to have the test working in UTC scenario and wait till devs decide on supporting UTC in https://issues.apache.org/jira/browse/FALCON-725.
> >
> > Makes sense ?
>
> Ruslan Ostafiychuk wrote:
> I see that ISO 8601 time zone ('X') is not supported in SimpleDateFormat in JDK6. Replaced by typeAdapter.
> The basic issue I think here is that we have both UTC and non-UTC format being returned in the same response (when falcon server is running in non-UTC).
No, GsonBuilder can deserialize fields with different time zones and we always have all "Date" fields in one time zone (instance field is "String")
- Ruslan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/#review56022
-----------------------------------------------------------
On Oct. 10, 2014, 7:17 a.m., Ruslan Ostafiychuk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26496/
> -----------------------------------------------------------
>
> (Updated Oct. 10, 2014, 7:17 a.m.)
>
>
> Review request for Falcon.
>
>
> Bugs: falcon-706
> https://issues.apache.org/jira/browse/falcon-706
>
>
> Repository: falcon-git
>
>
> Description
> -------
>
> "startTime": "2014-10-09T04:28:36-07:00" is accepteble now
>
>
> Diffs
> -----
>
> falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
>
> Diff: https://reviews.apache.org/r/26496/diff/
>
>
> Testing
> -------
>
> ProcessInstanceStatusTest
>
>
> Thanks,
>
> Ruslan Ostafiychuk
>
>
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Ruslan Ostafiychuk <ro...@hortonworks.com>.
> On Oct. 9, 2014, 6:09 p.m., Raghav Gautam wrote:
> > falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java, line 174
> > <https://reviews.apache.org/r/26496/diff/1/?file=716643#file716643line174>
> >
> > for testProcessInstanceStatusDateEmpty() I am getting this exception:
> >
> > java.lang.IllegalArgumentException: Illegal pattern character 'X'
> > at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:768)
> > at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:575)
> > at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:500)
> > at com.google.gson.DefaultDateTypeAdapter.<init>(DefaultDateTypeAdapter.java:49)
> > at com.google.gson.GsonBuilder.addTypeAdaptersForDate(GsonBuilder.java:556)
> > at com.google.gson.GsonBuilder.create(GsonBuilder.java:544)
> > at org.apache.falcon.regression.core.util.InstanceUtil.hitUrl(InstanceUtil.java:175)
> > at org.apache.falcon.regression.core.util.InstanceUtil.sendRequestProcessInstance(InstanceUtil.java:93)
> > at org.apache.falcon.regression.core.util.InstanceUtil.createAndSendRequestProcessInstance(InstanceUtil.java:750)
> > at org.apache.falcon.regression.core.interfaces.IEntityManagerHelper.getProcessInstanceStatus(IEntityManagerHelper.java:391)
> > at org.apache.falcon.regression.core.interfaces.IEntityManagerHelper.getProcessInstanceStatus(IEntityManagerHelper.java:383)
> > at org.apache.falcon.regression.ProcessInstanceStatusTest.testProcessInstanceStatusDateEmpty(ProcessInstanceStatusTest.java:178)
> >
> > If I change the format to "yyyy-MM-dd'T'HH:mm:ssZ" - the test goes through but it will not parse 2014-10-07T13:35:42-07:00. The basic issue I think here is that we have both UTC and non-UTC format being returned in the same response (when falcon server is running in non-UTC).
> >
> > I would prefer to have the test working in UTC scenario and wait till devs decide on supporting UTC in https://issues.apache.org/jira/browse/FALCON-725.
> >
> > Makes sense ?
I see that ISO 8601 time zone ('X') is not supported in SimpleDateFormat in JDK6. Replaced by typeAdapter.
- Ruslan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/#review56022
-----------------------------------------------------------
On Oct. 10, 2014, 7:17 a.m., Ruslan Ostafiychuk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26496/
> -----------------------------------------------------------
>
> (Updated Oct. 10, 2014, 7:17 a.m.)
>
>
> Review request for Falcon.
>
>
> Bugs: falcon-706
> https://issues.apache.org/jira/browse/falcon-706
>
>
> Repository: falcon-git
>
>
> Description
> -------
>
> "startTime": "2014-10-09T04:28:36-07:00" is accepteble now
>
>
> Diffs
> -----
>
> falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
>
> Diff: https://reviews.apache.org/r/26496/diff/
>
>
> Testing
> -------
>
> ProcessInstanceStatusTest
>
>
> Thanks,
>
> Ruslan Ostafiychuk
>
>
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Raghav Gautam <ra...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/#review56022
-----------------------------------------------------------
falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
<https://reviews.apache.org/r/26496/#comment96382>
for testProcessInstanceStatusDateEmpty() I am getting this exception:
java.lang.IllegalArgumentException: Illegal pattern character 'X'
at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:768)
at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:575)
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:500)
at com.google.gson.DefaultDateTypeAdapter.<init>(DefaultDateTypeAdapter.java:49)
at com.google.gson.GsonBuilder.addTypeAdaptersForDate(GsonBuilder.java:556)
at com.google.gson.GsonBuilder.create(GsonBuilder.java:544)
at org.apache.falcon.regression.core.util.InstanceUtil.hitUrl(InstanceUtil.java:175)
at org.apache.falcon.regression.core.util.InstanceUtil.sendRequestProcessInstance(InstanceUtil.java:93)
at org.apache.falcon.regression.core.util.InstanceUtil.createAndSendRequestProcessInstance(InstanceUtil.java:750)
at org.apache.falcon.regression.core.interfaces.IEntityManagerHelper.getProcessInstanceStatus(IEntityManagerHelper.java:391)
at org.apache.falcon.regression.core.interfaces.IEntityManagerHelper.getProcessInstanceStatus(IEntityManagerHelper.java:383)
at org.apache.falcon.regression.ProcessInstanceStatusTest.testProcessInstanceStatusDateEmpty(ProcessInstanceStatusTest.java:178)
If I change the format to "yyyy-MM-dd'T'HH:mm:ssZ" - the test goes through but it will not parse 2014-10-07T13:35:42-07:00. The basic issue I think here is that we have both UTC and non-UTC format being returned in the same response (when falcon server is running in non-UTC).
I would prefer to have the test working in UTC scenario and wait till devs decide on supporting UTC in https://issues.apache.org/jira/browse/FALCON-725.
Makes sense ?
- Raghav Gautam
On Oct. 9, 2014, 4:40 a.m., Ruslan Ostafiychuk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26496/
> -----------------------------------------------------------
>
> (Updated Oct. 9, 2014, 4:40 a.m.)
>
>
> Review request for Falcon.
>
>
> Bugs: falcon-706
> https://issues.apache.org/jira/browse/falcon-706
>
>
> Repository: falcon-git
>
>
> Description
> -------
>
> "startTime": "2014-10-09T04:28:36-07:00" is accepteble now
>
>
> Diffs
> -----
>
> falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
>
> Diff: https://reviews.apache.org/r/26496/diff/
>
>
> Testing
> -------
>
> ProcessInstanceStatusTest
>
>
> Thanks,
>
> Ruslan Ostafiychuk
>
>
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Paul Isaychuk <pi...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/#review56381
-----------------------------------------------------------
Ship it!
Ship It!
- Paul Isaychuk
On Oct. 13, 2014, 6:14 a.m., Ruslan Ostafiychuk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26496/
> -----------------------------------------------------------
>
> (Updated Oct. 13, 2014, 6:14 a.m.)
>
>
> Review request for Falcon.
>
>
> Bugs: falcon-706
> https://issues.apache.org/jira/browse/falcon-706
>
>
> Repository: falcon-git
>
>
> Description
> -------
>
> "startTime": "2014-10-09T04:28:36-07:00" is accepteble now
>
>
> Diffs
> -----
>
> falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
>
> Diff: https://reviews.apache.org/r/26496/diff/
>
>
> Testing
> -------
>
> ProcessInstanceStatusTest
>
>
> Thanks,
>
> Ruslan Ostafiychuk
>
>
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Ruslan Ostafiychuk <ro...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/
-----------------------------------------------------------
(Updated Oct. 13, 2014, 6:14 a.m.)
Review request for Falcon.
Bugs: falcon-706
https://issues.apache.org/jira/browse/falcon-706
Repository: falcon-git
Description
-------
"startTime": "2014-10-09T04:28:36-07:00" is accepteble now
Diffs (updated)
-----
falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
Diff: https://reviews.apache.org/r/26496/diff/
Testing
-------
ProcessInstanceStatusTest
Thanks,
Ruslan Ostafiychuk
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Raghav Gautam <ra...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/#review56161
-----------------------------------------------------------
falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
<https://reviews.apache.org/r/26496/#comment96480>
So, we are using joda's DateTime for parsing dates. Nice!
- Raghav Gautam
On Oct. 10, 2014, 12:17 a.m., Ruslan Ostafiychuk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26496/
> -----------------------------------------------------------
>
> (Updated Oct. 10, 2014, 12:17 a.m.)
>
>
> Review request for Falcon.
>
>
> Bugs: falcon-706
> https://issues.apache.org/jira/browse/falcon-706
>
>
> Repository: falcon-git
>
>
> Description
> -------
>
> "startTime": "2014-10-09T04:28:36-07:00" is accepteble now
>
>
> Diffs
> -----
>
> falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
>
> Diff: https://reviews.apache.org/r/26496/diff/
>
>
> Testing
> -------
>
> ProcessInstanceStatusTest
>
>
> Thanks,
>
> Ruslan Ostafiychuk
>
>
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Raghav Gautam <ra...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/#review56162
-----------------------------------------------------------
Ship it!
Ship It!
- Raghav Gautam
On Oct. 10, 2014, 12:17 a.m., Ruslan Ostafiychuk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26496/
> -----------------------------------------------------------
>
> (Updated Oct. 10, 2014, 12:17 a.m.)
>
>
> Review request for Falcon.
>
>
> Bugs: falcon-706
> https://issues.apache.org/jira/browse/falcon-706
>
>
> Repository: falcon-git
>
>
> Description
> -------
>
> "startTime": "2014-10-09T04:28:36-07:00" is accepteble now
>
>
> Diffs
> -----
>
> falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
>
> Diff: https://reviews.apache.org/r/26496/diff/
>
>
> Testing
> -------
>
> ProcessInstanceStatusTest
>
>
> Thanks,
>
> Ruslan Ostafiychuk
>
>
Re: Review Request 26496: Parse json with instances to
InstancesResult with correct dateFormat
Posted by Ruslan Ostafiychuk <ro...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26496/
-----------------------------------------------------------
(Updated Oct. 10, 2014, 7:17 a.m.)
Review request for Falcon.
Bugs: falcon-706
https://issues.apache.org/jira/browse/falcon-706
Repository: falcon-git
Description
-------
"startTime": "2014-10-09T04:28:36-07:00" is accepteble now
Diffs (updated)
-----
falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java d8bef69
Diff: https://reviews.apache.org/r/26496/diff/
Testing
-------
ProcessInstanceStatusTest
Thanks,
Ruslan Ostafiychuk