You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streams.apache.org by steveblackmon <gi...@git.apache.org> on 2014/08/04 23:28:52 UTC

[GitHub] incubator-streams pull request: Resolves STREAMS-141

GitHub user steveblackmon opened a pull request:

    https://github.com/apache/incubator-streams/pull/62

    Resolves STREAMS-141

    

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

    $ git pull https://github.com/apache/incubator-streams STREAMS-141

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

    https://github.com/apache/incubator-streams/pull/62.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 #62
    
----
commit 72cca372821fd26787f12d8c82ca33d7d10b05a6
Author: sblackmon <sb...@w2odigital.com>
Date:   2014-08-04T20:28:43Z

    resolves STREAMS-141

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: Resolves STREAMS-141

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-streams/pull/62


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: Resolves STREAMS-141

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/62#discussion_r16003423
  
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/StreamsTwitterMapper.java ---
    @@ -68,7 +71,14 @@ public StreamsTwitterMapper() {
                     addDeserializer(DateTime.class, new StdDeserializer<DateTime>(DateTime.class) {
                         @Override
                         public DateTime deserialize(JsonParser jpar, DeserializationContext context) throws IOException, JsonProcessingException {
    -                        return TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    +                        DateTime result = null;
    +                        try {
    +                            result = TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    --- End diff --
    
    opening STREAMS-143 to address this issue


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: Resolves STREAMS-141

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/62#discussion_r15879525
  
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/StreamsTwitterMapper.java ---
    @@ -68,7 +71,14 @@ public StreamsTwitterMapper() {
                     addDeserializer(DateTime.class, new StdDeserializer<DateTime>(DateTime.class) {
                         @Override
                         public DateTime deserialize(JsonParser jpar, DeserializationContext context) throws IOException, JsonProcessingException {
    -                        return TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    +                        DateTime result = null;
    +                        try {
    +                            result = TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    --- End diff --
    
    https://github.com/apache/incubator-streams/pull/59 for reference


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: Resolves STREAMS-141

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/62#discussion_r15879286
  
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/StreamsTwitterMapper.java ---
    @@ -68,7 +71,14 @@ public StreamsTwitterMapper() {
                     addDeserializer(DateTime.class, new StdDeserializer<DateTime>(DateTime.class) {
                         @Override
                         public DateTime deserialize(JsonParser jpar, DeserializationContext context) throws IOException, JsonProcessingException {
    -                        return TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    +                        DateTime result = null;
    +                        try {
    +                            result = TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    --- End diff --
    
    same response as on the datasift PR.  non-standard date parsing should be the modules responsibility.  i'd support creation of an advanced date parser that could pick up dates without knowing the format before-hand, but not an approach where every new one-off date format that is discovered requires a change to streams-pojo to add a new format string + try/catch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: Resolves STREAMS-141

Posted by mfranklin <gi...@git.apache.org>.
Github user mfranklin commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/62#discussion_r15872031
  
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/StreamsTwitterMapper.java ---
    @@ -68,7 +71,14 @@ public StreamsTwitterMapper() {
                     addDeserializer(DateTime.class, new StdDeserializer<DateTime>(DateTime.class) {
                         @Override
                         public DateTime deserialize(JsonParser jpar, DeserializationContext context) throws IOException, JsonProcessingException {
    -                        return TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    +                        DateTime result = null;
    +                        try {
    +                            result = TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    --- End diff --
    
    Can we just update RFC3339Utils to have the twitter format rather than forcing a separate mapper?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---