[jira] [Updated] (HDFS-13428) RBF: Remove LinkedList From StateStoreFileImpl.java
[ https://issues.apache.org/jira/browse/HDFS-13428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yongjun Zhang updated HDFS-13428: - Fix Version/s: (was: 3.0.4) 3.0.3 > RBF: Remove LinkedList From StateStoreFileImpl.java > --- > > Key: HDFS-13428 > URL: https://issues.apache.org/jira/browse/HDFS-13428 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: federation >Affects Versions: 3.0.1 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Trivial > Fix For: 2.10.0, 3.2.0, 3.1.1, 2.9.2, 3.0.3 > > Attachments: HDFS-13428.1.patch > > > Replace {{LinkedList}} with {{ArrayList}} implementation in the > StateStoreFileImpl class. This is especially advantageous because we can > pre-allocate the internal array before a copy occurs. {{ArrayList}} is > faster for iterations and requires less memory than {{LinkedList}}. > {code:java} > protected List getChildren(String path) { > List ret = new LinkedList<>(); > File dir = new File(path); > File[] files = dir.listFiles(); > if (files != null) { > for (File file : files) { > String filename = file.getName(); > ret.add(filename); > } > } > return ret; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-13428) RBF: Remove LinkedList From StateStoreFileImpl.java
[ https://issues.apache.org/jira/browse/HDFS-13428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yiqun Lin updated HDFS-13428: - Fix Version/s: 3.0.4 2.9.2 3.1.1 3.2.0 2.10.0 > RBF: Remove LinkedList From StateStoreFileImpl.java > --- > > Key: HDFS-13428 > URL: https://issues.apache.org/jira/browse/HDFS-13428 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: federation >Affects Versions: 3.0.1 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Trivial > Fix For: 2.10.0, 3.2.0, 3.1.1, 2.9.2, 3.0.4 > > Attachments: HDFS-13428.1.patch > > > Replace {{LinkedList}} with {{ArrayList}} implementation in the > StateStoreFileImpl class. This is especially advantageous because we can > pre-allocate the internal array before a copy occurs. {{ArrayList}} is > faster for iterations and requires less memory than {{LinkedList}}. > {code:java} > protected List getChildren(String path) { > List ret = new LinkedList<>(); > File dir = new File(path); > File[] files = dir.listFiles(); > if (files != null) { > for (File file : files) { > String filename = file.getName(); > ret.add(filename); > } > } > return ret; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-13428) RBF: Remove LinkedList From StateStoreFileImpl.java
[ https://issues.apache.org/jira/browse/HDFS-13428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Íñigo Goiri updated HDFS-13428: --- Resolution: Fixed Hadoop Flags: Reviewed Status: Resolved (was: Patch Available) Thanks [~belugabehr] for the fix, committed to trunk branch-3.1, branch-3.0, branch-2, and branch-2.9. > RBF: Remove LinkedList From StateStoreFileImpl.java > --- > > Key: HDFS-13428 > URL: https://issues.apache.org/jira/browse/HDFS-13428 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: federation >Affects Versions: 3.0.1 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Trivial > Attachments: HDFS-13428.1.patch > > > Replace {{LinkedList}} with {{ArrayList}} implementation in the > StateStoreFileImpl class. This is especially advantageous because we can > pre-allocate the internal array before a copy occurs. {{ArrayList}} is > faster for iterations and requires less memory than {{LinkedList}}. > {code:java} > protected List getChildren(String path) { > List ret = new LinkedList<>(); > File dir = new File(path); > File[] files = dir.listFiles(); > if (files != null) { > for (File file : files) { > String filename = file.getName(); > ret.add(filename); > } > } > return ret; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-13428) RBF: Remove LinkedList From StateStoreFileImpl.java
[ https://issues.apache.org/jira/browse/HDFS-13428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Íñigo Goiri updated HDFS-13428: --- Issue Type: Sub-task (was: Improvement) Parent: HDFS-12615 > RBF: Remove LinkedList From StateStoreFileImpl.java > --- > > Key: HDFS-13428 > URL: https://issues.apache.org/jira/browse/HDFS-13428 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: federation >Affects Versions: 3.0.1 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Trivial > Attachments: HDFS-13428.1.patch > > > Replace {{LinkedList}} with {{ArrayList}} implementation in the > StateStoreFileImpl class. This is especially advantageous because we can > pre-allocate the internal array before a copy occurs. {{ArrayList}} is > faster for iterations and requires less memory than {{LinkedList}}. > {code:java} > protected List getChildren(String path) { > List ret = new LinkedList<>(); > File dir = new File(path); > File[] files = dir.listFiles(); > if (files != null) { > for (File file : files) { > String filename = file.getName(); > ret.add(filename); > } > } > return ret; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-13428) RBF: Remove LinkedList From StateStoreFileImpl.java
[ https://issues.apache.org/jira/browse/HDFS-13428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Íñigo Goiri updated HDFS-13428: --- Environment: (was: Replace {{LinkedList}} with {{ArrayList}} implementation in the StateStoreFileImpl class. This is especially advantageous because we can pre-allocate the internal array before a copy occurs. {{ArrayList}} is faster for iterations and requires less memory than {{LinkedList}}. {code:java} protected List getChildren(String path) { List ret = new LinkedList<>(); File dir = new File(path); File[] files = dir.listFiles(); if (files != null) { for (File file : files) { String filename = file.getName(); ret.add(filename); } } return ret; }{code}) > RBF: Remove LinkedList From StateStoreFileImpl.java > --- > > Key: HDFS-13428 > URL: https://issues.apache.org/jira/browse/HDFS-13428 > Project: Hadoop HDFS > Issue Type: Improvement > Components: federation >Affects Versions: 3.0.1 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Trivial > Attachments: HDFS-13428.1.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-13428) RBF: Remove LinkedList From StateStoreFileImpl.java
[ https://issues.apache.org/jira/browse/HDFS-13428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Íñigo Goiri updated HDFS-13428: --- Description: Replace {{LinkedList}} with {{ArrayList}} implementation in the StateStoreFileImpl class. This is especially advantageous because we can pre-allocate the internal array before a copy occurs. {{ArrayList}} is faster for iterations and requires less memory than {{LinkedList}}. {code:java} protected List getChildren(String path) { List ret = new LinkedList<>(); File dir = new File(path); File[] files = dir.listFiles(); if (files != null) { for (File file : files) { String filename = file.getName(); ret.add(filename); } } return ret; } {code} > RBF: Remove LinkedList From StateStoreFileImpl.java > --- > > Key: HDFS-13428 > URL: https://issues.apache.org/jira/browse/HDFS-13428 > Project: Hadoop HDFS > Issue Type: Improvement > Components: federation >Affects Versions: 3.0.1 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Trivial > Attachments: HDFS-13428.1.patch > > > Replace {{LinkedList}} with {{ArrayList}} implementation in the > StateStoreFileImpl class. This is especially advantageous because we can > pre-allocate the internal array before a copy occurs. {{ArrayList}} is > faster for iterations and requires less memory than {{LinkedList}}. > {code:java} > protected List getChildren(String path) { > List ret = new LinkedList<>(); > File dir = new File(path); > File[] files = dir.listFiles(); > if (files != null) { > for (File file : files) { > String filename = file.getName(); > ret.add(filename); > } > } > return ret; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-13428) RBF: Remove LinkedList From StateStoreFileImpl.java
[ https://issues.apache.org/jira/browse/HDFS-13428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Íñigo Goiri updated HDFS-13428: --- Summary: RBF: Remove LinkedList From StateStoreFileImpl.java (was: Remove LinkedList From StateStoreFileImpl.java) > RBF: Remove LinkedList From StateStoreFileImpl.java > --- > > Key: HDFS-13428 > URL: https://issues.apache.org/jira/browse/HDFS-13428 > Project: Hadoop HDFS > Issue Type: Improvement > Components: federation >Affects Versions: 3.0.1 > Environment: Replace {{LinkedList}} with {{ArrayList}} implementation > in the StateStoreFileImpl class. This is especially advantageous because we > can pre-allocate the internal array before a copy occurs. {{ArrayList}} is > faster for iterations and requires less memory than {{LinkedList}}. > > {code:java} > protected List getChildren(String path) { > List ret = new LinkedList<>(); > File dir = new File(path); > File[] files = dir.listFiles(); > if (files != null) { > for (File file : files) { > String filename = file.getName(); > ret.add(filename); > } > } > return ret; > }{code} >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Trivial > Attachments: HDFS-13428.1.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org