[jira] [Commented] (APEXMALHAR-2119) Make DirectoryScanner in AbstractFileInputOperator inheritance friendly.

2016-06-21 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on APEXMALHAR-2119:


Github user asfgit closed the pull request at:

https://github.com/apache/apex-malhar/pull/318


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


[jira] [Commented] (APEXMALHAR-2119) Make DirectoryScanner in AbstractFileInputOperator inheritance friendly.

2016-06-21 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on APEXMALHAR-2119:


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

https://github.com/apache/apex-malhar/pull/318#discussion_r67813977
  
--- 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 --

Added test for setPartition and verified that the base function usage the 
value set.


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


[jira] [Commented] (APEXMALHAR-2119) Make DirectoryScanner in AbstractFileInputOperator inheritance friendly.

2016-06-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on APEXMALHAR-2119:


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

https://github.com/apache/apex-malhar/pull/318#discussion_r67808791
  
--- 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 --

With the kryo.clone change in createPartition, it is getting set on the 
derived object from there. Initially createPartition was creating object of 
type DirectoryScanner, so derived class had no option to override it and create 
object of own type, and then set the count and index value, but it could not  
as those were private without setters in base class.



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


[jira] [Commented] (APEXMALHAR-2119) Make DirectoryScanner in AbstractFileInputOperator inheritance friendly.

2016-06-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/APEXMALHAR-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (APEXMALHAR-2119) Make DirectoryScanner in AbstractFileInputOperator inheritance friendly.

2016-06-15 Thread ASF GitHub Bot (JIRA)

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

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_r67174126
  
--- Diff: 
library/src/main/java/com/datatorrent/lib/io/fs/AbstractFileInputOperator.java 
---
@@ -1056,10 +1056,15 @@ protected Pattern getRegex()
   return pathSet;
 }
 
+protected int getParition(String filePathStr)
--- End diff --

getParition => getPartition


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


[jira] [Commented] (APEXMALHAR-2119) Make DirectoryScanner in AbstractFileInputOperator inheritance friendly.

2016-06-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on APEXMALHAR-2119:


GitHub user tushargosavi opened a pull request:

https://github.com/apache/apex-malhar/pull/318

APEXMALHAR-2119 add setters for partition count and index.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/tushargosavi/incubator-apex-malhar 
APEXMALHAR-2119

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/apex-malhar/pull/318.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #318


commit 82cfbbbcca80c4f6eb4d76cb35a6fb5402db0d58
Author: Tushar R. Gosavi 
Date:   2016-06-15T11:42:16Z

APEXMALHAR-2119 add setters for partition count and index.




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