You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Owen O'Malley (JIRA)" <ji...@apache.org> on 2007/07/12 19:04:05 UTC

[jira] Created: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
------------------------------------------------------------------------------------------

                 Key: HADOOP-1601
                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
             Project: Hadoop
          Issue Type: Bug
          Components: io
            Reporter: Owen O'Malley
            Assignee: Enis Soztutar


GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Attachment: genericWritable_v1.1.patch

Attaching the patch, which was attached to hadoop-dev previously. 
This version compares classes, rather than class names, adds some javadoc and improves logging in the test case.

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521598 ] 

Doug Cutting commented on HADOOP-1601:
--------------------------------------

I'd rather keep it separate from this patch.  I'll commit this without that change, unless someone objects.

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521688 ] 

Enis Soztutar commented on HADOOP-1601:
---------------------------------------

version 1.2 of the patch with the sortFiles patch was an experiment with Raghu, to see if the failure could be corrected by the patch in HADOOP-1696. I thought we have made it clear in comments in HADOOP-1696, sorry for the extra noise. Now that we saw it is, we can commit patch version 1.1(same as v1.2 w/o sortFiles patch), after HADOOP-1729. 


> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

        Fix Version/s: 0.15.0
    Affects Version/s: 0.15.0

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517920 ] 

Hadoop QA commented on HADOOP-1601:
-----------------------------------

-1, build or testing failed

2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12363235/genericWritable_v1.1.patch against trunk revision r562608.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/517/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/517/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512429 ] 

Enis Soztutar commented on HADOOP-1601:
---------------------------------------

There is a related issue in nutch NUTCH-434. I will just port this to hadoop as soon as i find some time.

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521540 ] 

Hadoop QA commented on HADOOP-1601:
-----------------------------------

+1

http://issues.apache.org/jira/secure/attachment/12364211/genericWritable_v1.2-sortFiles.patch applied and successfully tested against trunk revision r567877.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/581/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/581/console

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by Enis Soztutar <en...@gmail.com>.
Hi,

There seems to be an error with the issue tracking system (at least for 
my account). So i am attaching the patch here (sorry for the trouble). 
This version compares classes, rather than class names, adds some 
javadoc and improves logging in the test case.

 

Enis Soztutar (JIRA) wrote:
>      [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Enis Soztutar updated HADOOP-1601:
> ----------------------------------
>
>     Attachment: genericWritable_v1.0.patch
>
> This patch delegates object initialization to ReflectionUtils, and changes GenericWritable to implement Configurable. A test case for GenericWritable is added. 
> I have also found a subtle bug in {{GenericWritable#set()}}. If {{getTypes()}} returns classes such that a subclass is listed before its superclass, then the type of the wrapped object is set wrong, since {{Class#isInstanceOf()}} returns true. The bug is fixed by comparing class names. 
>
>   
>> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
>> ------------------------------------------------------------------------------------------
>>
>>                 Key: HADOOP-1601
>>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>>             Project: Hadoop
>>          Issue Type: Bug
>>          Components: io
>>    Affects Versions: 0.15.0
>>            Reporter: Owen O'Malley
>>            Assignee: Enis Soztutar
>>             Fix For: 0.15.0
>>
>>         Attachments: genericWritable_v1.0.patch
>>
>>
>> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.
>>     
>
>   

[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Attachment: genericWritable_v1.0.patch

This patch delegates object initialization to ReflectionUtils, and changes GenericWritable to implement Configurable. A test case for GenericWritable is added. 
I have also found a subtle bug in {{GenericWritable#set()}}. If {{getTypes()}} returns classes such that a subclass is listed before its superclass, then the type of the wrapped object is set wrong, since {{Class#isInstanceOf()}} returns true. The bug is fixed by comparing class names. 

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514773 ] 

Hadoop QA commented on HADOOP-1601:
-----------------------------------

+1

http://issues.apache.org/jira/secure/attachment/12362305/genericWritable_v1.0.patch applied and successfully tested against trunk revision r558831.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/450/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/450/console

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512181 ] 

Owen O'Malley commented on HADOOP-1601:
---------------------------------------

There should also be a unit test for GenericWritable.

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated HADOOP-1601:
---------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Enis!

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517931 ] 

Enis Soztutar commented on HADOOP-1601:
---------------------------------------

running test local succeeds, i believe failure of TestDFSUpgrade is not related to this. 

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Status: Open  (was: Patch Available)

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Attachment: genericWritable_v1.2-sortFiles.patch

Attaching the patch v1.2(no change) incorporating the patch in HADOOP-1696. 
See HADOOP-1696, for details. 

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Status: Patch Available  (was: Open)

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Status: Patch Available  (was: Open)

Triggering the hudson build to see if the tests passes. The tests used to fail due to HADOOP-1696. 

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521688 ] 

enis edited comment on HADOOP-1601 at 8/21/07 10:39 PM:
-----------------------------------------------------------------

version 1.2 of the patch with the sortFiles patch was an experiment with Raghu, to see if the failure could be corrected by the patch in HADOOP-1696. I thought we have made it clear in comments in HADOOP-1696, sorry for the extra noise. Now that we saw it is, we can commit patch version 1.1(same as v1.2 w/o sortFiles patch), after HADOOP-1749. 


      was (Author: enis):
    version 1.2 of the patch with the sortFiles patch was an experiment with Raghu, to see if the failure could be corrected by the patch in HADOOP-1696. I thought we have made it clear in comments in HADOOP-1696, sorry for the extra noise. Now that we saw it is, we can commit patch version 1.1(same as v1.2 w/o sortFiles patch), after HADOOP-1729. 

  
> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Status: Patch Available  (was: Open)

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen O'Malley updated HADOOP-1601:
----------------------------------

    Status: Open  (was: Patch Available)

It looks good, but rather than compare class names, please compare the class objects themselves.

ie. instead of {{if (clazz.getName().equals(instanceClassName) ...}} do {{if (clazz == instanceClass) ... }}

You also have one line with a 4 space indent that should be 2 spaces.

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Status: Patch Available  (was: Open)

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enis Soztutar updated HADOOP-1601:
----------------------------------

    Status: Open  (was: Patch Available)

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521594 ] 

Raghu Angadi commented on HADOOP-1601:
--------------------------------------

The UpgradeUtilities patch is part of HADOOP-1696, either way is ok, we can include it in this patch since it is small enough.


> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521592 ] 

Doug Cutting commented on HADOOP-1601:
--------------------------------------

You've also patched UpgradeUtilities to sort directories.  This makes good sense, but is it really related to this issue, or should it rather be a separate issue?

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch, genericWritable_v1.2-sortFiles.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520252 ] 

Hadoop QA commented on HADOOP-1601:
-----------------------------------

-1, build or testing failed

2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12363235/genericWritable_v1.1.patch against trunk revision r566467.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/563/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/563/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.

> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1601
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>             Project: Hadoop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.15.0
>            Reporter: Owen O'Malley
>            Assignee: Enis Soztutar
>             Fix For: 0.15.0
>
>         Attachments: genericWritable_v1.0.patch, genericWritable_v1.1.patch
>
>
> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance. Furthermore, GenericWritable should be Configurable and should configure the nested objects. This will prevent a lot of classloader issues and allow the objects to get a configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.