[ 
https://issues.apache.org/jira/browse/APEXMALHAR-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15386086#comment-15386086
 ] 

ASF GitHub Bot commented on APEXMALHAR-2157:
--------------------------------------------

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

    https://github.com/apache/apex-malhar/pull/348#discussion_r71554183
  
    --- Diff: 
library/src/main/java/com/datatorrent/lib/formatter/Formatter.java ---
    @@ -65,17 +73,28 @@ public void setup(PortContext context)
         @Override
         public void process(Object inputTuple)
         {
    +      incomingTuplesCount++;
           OUTPUT tuple = convert(inputTuple);
           if (tuple == null && err.isConnected()) {
    +        errorTupleCount++;
             err.emit(inputTuple);
             return;
           }
           if (out.isConnected()) {
    +        emittedObjectCount++;
             out.emit(tuple);
           }
         }
       };
     
    +  @Override
    +  public void beginWindow(long windowId)
    +  {
    +    errorTupleCount = 0;
    +    emittedObjectCount = 0;
    +    incomingTuplesCount = 0;
    +  }
    +
    --- End diff --
    
    I think this is correct. Reset should be done in begin window only. These 
counts are picked between endWindow and beginWindow.. If reset is done in 
endWindow, then count will be 0 always.



> Improvements in JSON Formatter
> ------------------------------
>
>                 Key: APEXMALHAR-2157
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2157
>             Project: Apache Apex Malhar
>          Issue Type: Improvement
>            Reporter: shubham pathak
>            Assignee: shubham pathak
>            Priority: Minor
>
> We need following features in existing JSON Formatter
> 1. Ability to provide date format for different date fields in POJO. Current 
> implementation accepts just one format and applies the same to all date 
> fields.
> 2. Ability to provide JSON field to POJO field mapping.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to