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 "Konstantin Boudnik (JIRA)" <ji...@apache.org> on 2009/05/19 05:02:45 UTC
[jira] Created: (HADOOP-5867) Cleaning NNBench* off javac warnings
Cleaning NNBench* off javac warnings
------------------------------------
Key: HADOOP-5867
URL: https://issues.apache.org/jira/browse/HADOOP-5867
Project: Hadoop Core
Issue Type: Improvement
Components: test
Affects Versions: 0.20.0
Reporter: Konstantin Boudnik
Assignee: Konstantin Boudnik
Fix For: 0.21.0
These files have a number of javac 'class depricated' warnings
src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-5867) Cleaning NNBench* off javac warnings
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo (Nicholas), SZE updated HADOOP-5867:
-------------------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
I have committed this. Thanks, Konstantin!
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-5867) Cleaning NNBench* off javac
warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711808#action_12711808 ]
Konstantin Boudnik commented on HADOOP-5867:
--------------------------------------------
These changes aren't exactly touch any kind of tests, however I have SUCCESSFULLY ran the following tests
- test-hdfs-with-mr
- test-hdfs
Please let me know if something beyond this has to be done before the commit of the patch.
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-5867) Cleaning NNBench* off javac
warnings
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710944#action_12710944 ]
Tsz Wo (Nicholas), SZE commented on HADOOP-5867:
------------------------------------------------
Patch looks mostly good. Some nits:
- Each line should have 80 characters or less. Some lines are too long, e.g.
{noformat}
+ * @return true if the method was able to sleep for <code>-startTime</code> without interruption; false otherwise
{noformat}
- Question: the rename and delete return values are ignored currently. How about setting "success = fileSys.rename(..)"?
- Possible bug in the existing code: "totalTimeTPmS / successfulFileOps" below is an integer division
{code}
double AverageExecutionTime = (totalTimeTPmS == 0) ?
(double) successfulFileOps :
(double) (totalTimeTPmS / successfulFileOps);
{code}
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-5867) Cleaning NNBench* off javac warnings
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo (Nicholas), SZE updated HADOOP-5867:
-------------------------------------------
Hadoop Flags: [Reviewed]
> More generic question is: are we trying to count both false and true return as success and only exception throwing as a failure?
I am fine with counting both false and true as long as the options are carefully considered.
+1 patch looks good
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-5867) Cleaning NNBench* off javac warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Boudnik updated HADOOP-5867:
---------------------------------------
Attachment: HADOOP-5867.patch
Fixing pretty much all javac warnings unrelated to deprecation of mapred APIs. Those will have to be addressed separately
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (HADOOP-5867) Cleaning NNBench* off javac
warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on HADOOP-5867 started by Konstantin Boudnik.
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-5867) Cleaning NNBench* off javac warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Boudnik updated HADOOP-5867:
---------------------------------------
Status: Patch Available (was: In Progress)
The following modifications were made:
- redundant initializations were removed
- missed JavaDoc added
- unused variables were removed and replaced with proper comments explaining why the result of some calls isn't important for the purpose of the test
- some class members were converted to a method's variables
- few method signatures were refactored to remove unused parameters
- redundant casts were removed
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-5867) Cleaning NNBench* off javac
warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710959#action_12710959 ]
Konstantin Boudnik commented on HADOOP-5867:
--------------------------------------------
Thanks for review Nicholas.
Some comments:
1) Oops, will fix long lines
2) I though of making exactly this change (the first version of the patch
contains this very change). However, it might be troublesome in some cases,
because fileSys.rename can return false in some cases (say, namespace won't
rename the path) and then we might stuck in this loop forever
(code)
do {
...
while (!success);
(/code)
That's why I've left it as is and put this comment in both (rename and delete)
cases. I'll appreciate to hear from you on this before I'll submit the update to
this patch.
3) nice catch! Fixed along with a couple of other excessive castings to double.
Thanks in advance,
Cos
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-5867) Cleaning NNBench* off javac
warnings
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711859#action_12711859 ]
Hadoop QA commented on HADOOP-5867:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12408546/HADOOP-5867.patch
against trunk revision 777152.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 6 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs warnings.
+1 Eclipse classpath. The patch retains Eclipse classpath integrity.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
-1 contrib tests. The patch failed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/372/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/372/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/372/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/372/console
This message is automatically generated.
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-5867) Cleaning NNBench* off javac warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Boudnik updated HADOOP-5867:
---------------------------------------
Attachment: HADOOP-5867.patch
All but one comments from the reviewer were taken into consideration and fixed.
I'm hesitant to used suggestion from the review and modify the code in question to
success = fileSys.rename(...)
because rename() might return false in three cases our of four existing exit points.
More generic question is: are we trying to count both false and true return as success and only exception throwing as a failure?
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-5867) Cleaning NNBench* off javac warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Boudnik updated HADOOP-5867:
---------------------------------------
Attachment: HADOOP-5867.patch
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
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-5867) Cleaning NNBench* off
javac warnings
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711808#action_12711808 ]
Konstantin Boudnik edited comment on HADOOP-5867 at 5/21/09 4:35 PM:
---------------------------------------------------------------------
These changes aren't exactly touch any kind of tests, however I have SUCCESSFULLY ran the following tests
- test-hdfs-with-mr
- test-hdfs
Also I have ran NNBench and NNBenchWithoutMR successfully.
Please let me know if something beyond this has to be done before the commit of the patch.
was (Author: cos):
These changes aren't exactly touch any kind of tests, however I have SUCCESSFULLY ran the following tests
- test-hdfs-with-mr
- test-hdfs
Please let me know if something beyond this has to be done before the commit of the patch.
> Cleaning NNBench* off javac warnings
> ------------------------------------
>
> Key: HADOOP-5867
> URL: https://issues.apache.org/jira/browse/HADOOP-5867
> Project: Hadoop Core
> Issue Type: Improvement
> Components: test
> Affects Versions: 0.20.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.21.0
>
> Attachments: HADOOP-5867.patch, HADOOP-5867.patch, HADOOP-5867.patch
>
>
> These files have a number of javac 'class depricated' warnings
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBench.java
> src/test/hdfs-with-mr/org/apache/hadoop/hdfs/NNBenchWithoutMR.java
> It is possible to fix most of them plus make some readability improvements on the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.