[jira] [Commented] (AVRO-2050) Clear Array To Allow GC
[ https://issues.apache.org/jira/browse/AVRO-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16092131#comment-16092131 ] Hadoop QA commented on AVRO-2050: - | (/) *{color:green}+1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 14s{color} | {color:blue} Docker mode activated. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} buildtest {color} | {color:green} 0m 0s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} buildtest {color} | {color:green} 6m 52s{color} | {color:green} the patch passed {color} | | {color:black}{color} | {color:black} {color} | {color:black} 7m 8s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Docker | Client=1.13.1 Server=1.13.1 Image:yetus/avro:793178a | | JIRA Issue | AVRO-2050 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12877874/AVRO-2050.3.patch | | Optional Tests | buildtest javac | | uname | Linux ec17bb8bd028 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 GNU/Linux | | Build tool | build | | git revision | master / 793178a | | Default Java | 1.7.0_111 | | modules | C: lang/java U: lang/java | | Console output | https://builds.apache.org/job/PreCommit-AVRO-Build-TEST/27/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > Clear Array To Allow GC > --- > > Key: AVRO-2050 > URL: https://issues.apache.org/jira/browse/AVRO-2050 > Project: Avro > Issue Type: Improvement > Components: java >Affects Versions: 1.7.7, 1.8.2 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Minor > Attachments: AVRO-2050.1.patch, AVRO-2050.2.patch, AVRO-2050.3.patch > > > Java's {{ArrayList}} implementation clears all Objects from the internal > buffer when the {{clear()}} method is called. This allows the Objects to be > free for GC. We should do the same in Avro > {{org.apache.avro.generic.GenericData}} > [ArrayList > Source|http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/util/ArrayList.java#ArrayList.clear%28%29] -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (AVRO-2050) Clear Array To Allow GC
[ https://issues.apache.org/jira/browse/AVRO-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16092098#comment-16092098 ] BELUGA BEHR commented on AVRO-2050: --- [~cutting] Thanks for the input. I was simply mimicking the OpenJDK implementation. I attached a new patch. Either will work. :) > Clear Array To Allow GC > --- > > Key: AVRO-2050 > URL: https://issues.apache.org/jira/browse/AVRO-2050 > Project: Avro > Issue Type: Improvement > Components: java >Affects Versions: 1.7.7, 1.8.2 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Minor > Attachments: AVRO-2050.1.patch, AVRO-2050.2.patch, AVRO-2050.3.patch > > > Java's {{ArrayList}} implementation clears all Objects from the internal > buffer when the {{clear()}} method is called. This allows the Objects to be > free for GC. We should do the same in Avro > {{org.apache.avro.generic.GenericData}} > [ArrayList > Source|http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/util/ArrayList.java#ArrayList.clear%28%29] -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (AVRO-2050) Clear Array To Allow GC
[ https://issues.apache.org/jira/browse/AVRO-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16092023#comment-16092023 ] Doug Cutting commented on AVRO-2050: Arrays.fill() would be simpler than coding the loop yourself and perform similarly. A more optimized implementation could use System.arraycopy(), which is native code, but that's perhaps overkill. > Clear Array To Allow GC > --- > > Key: AVRO-2050 > URL: https://issues.apache.org/jira/browse/AVRO-2050 > Project: Avro > Issue Type: Improvement > Components: java >Affects Versions: 1.7.7, 1.8.2 >Reporter: BELUGA BEHR >Assignee: BELUGA BEHR >Priority: Minor > Attachments: AVRO-2050.1.patch, AVRO-2050.2.patch > > > Java's {{ArrayList}} implementation clears all Objects from the internal > buffer when the {{clear()}} method is called. This allows the Objects to be > free for GC. We should do the same in Avro > {{org.apache.avro.generic.GenericData}} > [ArrayList > Source|http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/util/ArrayList.java#ArrayList.clear%28%29] -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (AVRO-2050) Clear Array To Allow GC
[ https://issues.apache.org/jira/browse/AVRO-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16089518#comment-16089518 ] Nandor Kollar commented on AVRO-2050: - I'm wondering why {{clear()}} method is in overridden. It looks like the base class is AbstractList, which has clear method implemented correctly, so we might instead implement the {{Array}} iterator's {{remove()}} method no? > Clear Array To Allow GC > --- > > Key: AVRO-2050 > URL: https://issues.apache.org/jira/browse/AVRO-2050 > Project: Avro > Issue Type: Improvement > Components: java >Affects Versions: 1.7.7, 1.8.2 >Reporter: BELUGA BEHR >Priority: Minor > Attachments: AVRO-2050.1.patch > > > Java's {{ArrayList}} implementation clears all Objects from the internal > buffer when the {{clear()}} method is called. This allows the Objects to be > free for GC. We should do the same in Avro > {{org.apache.avro.generic.GenericData}} > [ArrayList > Source|http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/util/ArrayList.java#ArrayList.clear%28%29] -- This message was sent by Atlassian JIRA (v6.4.14#64029)