apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (APEXMALHAR-2069) FileSplitterInput and TimeBasedDirectoryScanner - move operational fields initialization from constructor to setup
Date Thu, 07 Jul 2016 00:39:11 GMT

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

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

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

    https://github.com/apache/apex-malhar/pull/333#discussion_r69836047
  
    --- Diff: library/src/test/java/com/datatorrent/lib/io/fs/FileSplitterInputTest.java ---
    @@ -499,7 +499,7 @@ public void testRecoveryOfBlockMetadataIterator() throws InterruptedException
         testMeta.fileSplitterInput.getScanner().setScanIntervalMillis(500);
     
     
    -    testMeta.fileSplitterInput.setup(testMeta.context);
    --- End diff --
    
    @chandnisingh
    The tests are not supposed to call setup() multiple times for the same operator instance.
According to the Java doc of the `Component.setup()` callback to setup() "is made exactly
once during the operator lifetime." If a test relies on setup() to clean or reinitialize an
operator state, such test should be modified.
    
    It will be good to fix all operators that are frequently used. Please file new JIRA for
such operators.
    



> FileSplitterInput and TimeBasedDirectoryScanner - move operational fields initialization
from constructor to setup
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: APEXMALHAR-2069
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2069
>             Project: Apache Apex Malhar
>          Issue Type: Improvement
>            Reporter: Vlad Rozov
>            Assignee: Sanjay M Pujare
>             Fix For: 3.5.0
>
>
> For example, there is no need for scanService to be initialized in the constructor. It
should be done during operator setup().



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

Mime
View raw message