You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Yang Jiandan (JIRA)" <ji...@apache.org> on 2012/07/18 05:45:33 UTC
[jira] [Created] (HADOOP-8605)
TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils
don't generate memory leak
Yang Jiandan created HADOOP-8605:
------------------------------------
Summary: TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils don't generate memory leak
Key: HADOOP-8605
URL: https://issues.apache.org/jira/browse/HADOOP-8605
Project: Hadoop Common
Issue Type: Bug
Components: test
Affects Versions: 1.0.3
Reporter: Yang Jiandan
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
int iterations=9999; // very fast, but a bit less reliable - bigger numbers force GC
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
but every time it generate the same class
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8605)
TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils
don't generate memory leak
Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Suresh Srinivas updated HADOOP-8605:
------------------------------------
Priority: Minor (was: Major)
> TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils don't generate memory leak
> -----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-8605
> URL: https://issues.apache.org/jira/browse/HADOOP-8605
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 1.0.3
> Reporter: Yang Jiandan
> Priority: Minor
>
> TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild in a for cycle:
> {code}
> int iterations=9999;
> for (int i=0; i<iterations; i++) {
> URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
> Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
> Object o = ReflectionUtils.newInstance(cl, null);
> assertEquals(cl, o.getClass());
> }
> {code}
> but every time it generate the same class,so in ReflectionUtils.CONSTRUCTOR_CACHE only include one class.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8605)
TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils
don't generate memory leak
Posted by "Yang Jiandan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Jiandan updated HADOOP-8605:
---------------------------------
Description:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild in a for cycle:
{code}
int iterations=9999;
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
{code}
but every time it generate the same class,so in ReflectionUtils.CONSTRUCTOR_CACHE only include one class.
was:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild in a for cycle:
{code}
int iterations=9999;
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
{code}
but every time it generate the same class
> TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils don't generate memory leak
> -----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-8605
> URL: https://issues.apache.org/jira/browse/HADOOP-8605
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 1.0.3
> Reporter: Yang Jiandan
>
> TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild in a for cycle:
> {code}
> int iterations=9999;
> for (int i=0; i<iterations; i++) {
> URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
> Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
> Object o = ReflectionUtils.newInstance(cl, null);
> assertEquals(cl, o.getClass());
> }
> {code}
> but every time it generate the same class,so in ReflectionUtils.CONSTRUCTOR_CACHE only include one class.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8605)
TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils
don't generate memory leak
Posted by "Yang Jiandan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Jiandan updated HADOOP-8605:
---------------------------------
Description:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild in a for cycle:
{code}
int iterations=9999;
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
{code}
but every time it generate the same class
was:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
int iterations=9999;
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
but every time it generate the same class
> TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils don't generate memory leak
> -----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-8605
> URL: https://issues.apache.org/jira/browse/HADOOP-8605
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 1.0.3
> Reporter: Yang Jiandan
>
> TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild in a for cycle:
> {code}
> int iterations=9999;
> for (int i=0; i<iterations; i++) {
> URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
> Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
> Object o = ReflectionUtils.newInstance(cl, null);
> assertEquals(cl, o.getClass());
> }
> {code}
> but every time it generate the same class
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8605)
TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils
don't generate memory leak
Posted by "Yang Jiandan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Jiandan updated HADOOP-8605:
---------------------------------
Description:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
int iterations=9999;
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
but every time it generate the same class
was:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
int iterations=9999;
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
but every time it generate the same class
> TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils don't generate memory leak
> -----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-8605
> URL: https://issues.apache.org/jira/browse/HADOOP-8605
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 1.0.3
> Reporter: Yang Jiandan
>
> TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
> int iterations=9999;
> for (int i=0; i<iterations; i++) {
> URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
> Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
> Object o = ReflectionUtils.newInstance(cl, null);
> assertEquals(cl, o.getClass());
> }
> but every time it generate the same class
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8605)
TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils
don't generate memory leak
Posted by "Yang Jiandan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Jiandan updated HADOOP-8605:
---------------------------------
Description:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
int iterations=9999;
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
but every time it generate the same class
was:
TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
int iterations=9999; // very fast, but a bit less reliable - bigger numbers force GC
for (int i=0; i<iterations; i++) {
URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
Object o = ReflectionUtils.newInstance(cl, null);
assertEquals(cl, o.getClass());
}
but every time it generate the same class
> TestReflectionUtils.testCacheDoesntLeak() can't illustrate ReflectionUtils don't generate memory leak
> -----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-8605
> URL: https://issues.apache.org/jira/browse/HADOOP-8605
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 1.0.3
> Reporter: Yang Jiandan
>
> TestReflectionUtils.testCacheDoesntLeak() uses different urlClassLoader to load TestReflectionUtils$LoadedInChild by a for cycle:
> int iterations=9999;
> for (int i=0; i<iterations; i++) {
> URLClassLoader loader = new URLClassLoader(new URL[0], getClass().getClassLoader());
> Class cl = Class.forName("org.apache.hadoop.util.TestReflectionUtils$LoadedInChild", false, loader);
> Object o = ReflectionUtils.newInstance(cl, null);
> assertEquals(cl, o.getClass());
> }
> but every time it generate the same class
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira