streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steveblackmon <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: Streams 164
Date Tue, 16 Sep 2014 18:43:00 GMT
Github user steveblackmon commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/83#discussion_r17621665
  
    --- Diff: streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchPersistUpdater.java
---
    @@ -71,32 +42,44 @@ public ElasticsearchPersistUpdater(ElasticsearchWriterConfiguration
config) {
         @Override
         public void write(StreamsDatum streamsDatum) {
     
    -        Preconditions.checkNotNull(streamsDatum);
    -        Preconditions.checkNotNull(streamsDatum.getDocument());
    -        Preconditions.checkNotNull(streamsDatum.getMetadata());
    -        Preconditions.checkNotNull(streamsDatum.getMetadata().get("id"));
    +        if(streamsDatum == null || streamsDatum.getDocument() == null)
    +            return;
    +
    +        LOGGER.debug("Update Document: {}", streamsDatum.getDocument());
    --- End diff --
    
    yes, but it would take more code to abstract lines 45 and 46 across 3 similar classes
than to leave as it.


---
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.
---

Mime
View raw message