[
https://issues.apache.org/jira/browse/APEXMALHAR-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15333860#comment-15333860
]
ASF GitHub Bot commented on APEXMALHAR-2119:
--------------------------------------------
Github user amberarrow commented on a diff in the pull request:
https://github.com/apache/apex-malhar/pull/318#discussion_r67351327
--- Diff:
library/src/main/java/com/datatorrent/lib/io/fs/AbstractFileInputOperator.java
---
@@ -1110,6 +1116,16 @@ public String toString()
return "DirectoryScanner [filePatternRegexp=" + filePatternRegexp +
" partitionIndex=" +
partitionIndex + " partitionCount=" + partitionCount + "]";
}
+
+ protected void setPartitionIndex(int partitionIndex)
+ {
+ this.partitionIndex = partitionIndex;
+ }
+
+ protected void setPartitionCount(int partitionCount)
+ {
+ this.partitionCount = partitionCount;
+ }
--- End diff --
Don't see a test for the newly added methods setPartitionIndex and
setPartitionCount (since the rationale in the ticket is "Inherited
DirectoryScanner can not set them", we should have a test that shows that this
situation has
been remedied).
> Make DirectoryScanner in AbstractFileInputOperator inheritance friendly.
> -------------------------------------------------------------------------
>
> Key: APEXMALHAR-2119
> URL: https://issues.apache.org/jira/browse/APEXMALHAR-2119
> Project: Apache Apex Malhar
> Issue Type: Bug
> Reporter: Tushar Gosavi
> Assignee: Tushar Gosavi
>
> The DirectoryScanner has partitionIndex and partitionCount declared as
> private without any setters. Inherited DirectoryScanner can not set them and
> hence can not call most of the methods in DirectoryScanner which depends on
> these fields (acceptFile).
> Also new DirectoryScanner has to implement createPartition as default one
> creates instance of DirectoryScanner by default.
> Make the class inheritance friendly by adding setters and use kryo clone in
> createPartition.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)