Github user pasalkarsachin1 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1939#discussion_r101993619
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/trident/TridentKafkaState.java
 ---
    @@ -98,14 +107,19 @@ public void updateState(List<TridentTuple> tuples, 
TridentCollector collector) {
                 }
     
                 if(exceptions.size() > 0){
    -                String errorMsg = "Could not retrieve result for messages 
" + tuples + " from topic = " + topic 
    -                        + " because of the following exceptions: \n";
    -                for (ExecutionException exception : exceptions) {
    -                    errorMsg = errorMsg + exception.getMessage() + "\n";
    -                }
    -                LOG.error(errorMsg);
    -                throw new FailedException(errorMsg);
    -            }
    +           StringBuilder errorMsg = new StringBuilder("Could not retrieve 
result for messages ").append(tuples)
    +                   .append(" from topic = ").append(topic).append(" 
because of the following exceptions: ").append(System.lineSeparator());
    +                           
    +           for (ExecutionException exception : exceptions) {
    +                   errorMsg = 
errorMsg.append(exception.getMessage()).append(System.lineSeparator()); ;
    +           }
    +           String message = errorMsg.toString();
    +           LOG.error(message);
    +           throw new FailedException(message);
    +       }
    +       long latestTime=System.currentTimeMillis();
    +       LOG.info("Emitted record {} sucessfully in {} ms to topic {} ", new 
Object[]{emittedRecords,latestTime-currentTime,topic});
    --- End diff --
    
    In our production currently there is no way you get information of how many 
records are getting pushed from logs. This log has turned out to provide at 
least so information on records pushed to Kafka in what time. This also helps 
who took time whether Kafka was slow in responding or we have large chunk of 
messages sent to Kafka


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to