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 "Raghu Angadi (JIRA)" <ji...@apache.org> on 2009/05/13 23:36:45 UTC

[jira] Created: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

Handling javac "deprecated" warning for using UTF8
--------------------------------------------------

                 Key: HADOOP-5823
                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
             Project: Hadoop Core
          Issue Type: Bug
          Components: build
    Affects Versions: 0.20.0
            Reporter: Raghu Angadi
            Assignee: Raghu Angadi
             Fix For: 0.21.0



o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 

Two options to get rid of these warnings :
  1. use @SupressWarnings at each use of UTF or for enclosing class.
  2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 

I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.

This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Commented: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi commented on HADOOP-5823:
--------------------------------------

We could move DeprecatedUTF8 to hdfs as a package private class.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Commented: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709155#action_12709155 ] 

Suresh Srinivas commented on HADOOP-5823:
-----------------------------------------

Some comments that indicates methods overridden from {{JournalStream}} are deleted. Not sure if that is intentional. +1 other than that.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Commented: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi commented on HADOOP-5823:
--------------------------------------

> Some comments that indicates methods overridden from JournalStream are deleted. 
yes. I removed "@Override" since these methods were "implementing" abstract methods rather than overriding. My eclipse flagged them as errors. I could remove those.

I still could not get rid of one warning in DeprecatedUTF8.java. "@SupressWarnings("deprecated")" didn't work for  {{extends UTF8} part.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Updated: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi updated HADOOP-5823:
---------------------------------

    Hadoop Flags: [Reviewed]
          Status: Patch Available  (was: Open)

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Updated: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi updated HADOOP-5823:
---------------------------------

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

I just committed this.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Updated: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi updated HADOOP-5823:
---------------------------------

    Attachment: HADOOP-5823.patch

> Some comments that indicates methods overridden from JournalStream are deleted. Not sure if that is intentional. 

Updated patch removes these changes since they are not related to UTF8 warnings.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Commented: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi commented on HADOOP-5823:
--------------------------------------

UTF8 is currently used in many places. FSEditLog.java is just an example. That said, I am not opposed to any changes related this.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Updated: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi updated HADOOP-5823:
---------------------------------

    Attachment: HADOOP-5823.patch

Patch for the second option. FSEditLog.java is modified as a demo of the use case.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Commented: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Doug Cutting commented on HADOOP-5823:
--------------------------------------

> UTF8 is currently used in many places.

Yes, but FSEditLog has been identified as a place that UTF8 will continue to be used for a long time yet, long-enough that we want to squash the warnings there.  Are there other places where it should continue to be used, whose warnings should also be squashed?  If not, then moving it to be private in HDFS makes sense.

> We could move DeprecatedUTF8 to hdfs as a package private class.

+1


> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Commented: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Raghu Angadi commented on HADOOP-5823:
--------------------------------------

ant test-patch :
{noformat}
     [exec] -1 overall.  
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     -1 tests included.  The patch doesn't appear to include any new or modified tests.
     [exec]                         Please justify why no tests are needed for this patch.
     [exec] 
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec] 
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec] 
     [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
     [exec] 
     [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
     [exec] 
{noformat}

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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


[jira] Commented: (HADOOP-5823) Handling javac "deprecated" warning for using UTF8

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

Doug Cutting commented on HADOOP-5823:
--------------------------------------

Since the use of this new class is confined to FSEditLog, why not make it package-private there, rather than pollute the public, documented namespace with a new class?  For that matter, if FSEditLog is really the only user, we could move UTF8 to a private class in its package.

> Handling javac "deprecated" warning for using UTF8
> --------------------------------------------------
>
>                 Key: HADOOP-5823
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5823
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5823.patch, HADOOP-5823.patch
>
>
> o.a.h.io.UTF8 is deprecated but is still used in multiple places. FSEditLog.java has 40 UTF8 related warnings. I don't think it is feasible to avoid using UTF8 in FSEditLog.java. 
> Two options to get rid of these warnings :
>   1. use @SupressWarnings at each use of UTF or for enclosing class.
>   2. define a wrapper class {{DeprecatedUTF8}} that is not {{@deprecated}}. 
> I prefer the second option in this case since it keeps FSEditLog.java and other places clean and still makes it explicit that a deprecated class is used.
> This is part of spring cleaning effort to remove warnings in javac. I will attach a patch for the second option.

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