[ 
https://issues.apache.org/jira/browse/HDFS-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004908#comment-13004908
 ] 

Tanping Wang commented on HDFS-1738:
------------------------------------

# -1 tests included
The change only touches JMXGet tool itself and is simple enough.  We may 
consider to add in more test cases to test JMXGet tool in the future.  At this 
moment, we will not add unit test cases.

# -1 core tests. The patch failed these core unit tests:
org.apache.hadoop.hdfs.server.datanode.TestBlockReport
org.apache.hadoop.hdfs.TestFileConcurrentReader

I ran TestBlockReport multiple times with the JMX patch.  The case was all 
passed.  TestBlockReport does not use the tool JMXGet.  I have also checked the 
patch submission the day before and have seen TestBlockReport failed in 
HDFS-1611's pre-committing run 

https://builds.apache.org/hudson/job/PreCommit-HDFS-Build/240/testReport/org.apache.hadoop.hdfs.server.datanode/TestBlockReport/blockReport_08/

So this is not relevant. 


I ran TestFileConcurrentReader multiple times withOUT the patch.  The test case 
fails roughly 1 out of 3 times.  I recall HDFS-1410 reported this problem and 
we tried to  fix it in HDFS-1310.  In HDFS-1410, Konstantin Boudnik commented 
seeing this problem again.  It seems that this problem is resurfacing.  

# -1 system test framework. The patch failed system test framework compile.
I checked the console output from running the patch

https://builds.apache.org/hudson/job/PreCommit-HDFS-Build/242/console

It seems that there was a problem that hadoop-common;0.23.0-SNAPSHOT can not be 
retrieved.

     [exec] ivy-resolve-system:
     [exec] [ivy:resolve] 
     [exec] [ivy:resolve] :::: WARNINGS
     [exec] [ivy:resolve]               module not found: 
org.apache.hadoop#hadoop-common;0.23.0-SNAPSHOT

I ran 
$ant run-test-hdfs-fault-inject
on my Linux box and it was successful.

run-test-hdfs-excluding-commit-and-smoke:
    [mkdir] Created dir: 
/home/tanping/src/HDFS/Y22Trunk/hadoop-hdfs-trunk/build-fi/test/data
    [mkdir] Created dir: 
/home/tanping/src/HDFS/Y22Trunk/hadoop-hdfs-trunk/build-fi/test/logs
     [copy] Copying 1 file to 
/home/tanping/src/HDFS/Y22Trunk/hadoop-hdfs-trunk/build-fi/test/extraconf
     [copy] Copying 1 file to 
/home/tanping/src/HDFS/Y22Trunk/hadoop-hdfs-trunk/build-fi/test/extraconf
    [junit] WARNING: multiple versions of ant detected in path for junit 
    [junit]          
jar:file:/opt/apache-ant-1.7.1/lib/ant.jar!/org/apache/tools/ant/Project.class
    [junit]      and 
jar:file:/home/tanping/.ivy2/cache/ant/ant/jars/ant-1.6.5.jar!/org/apache/tools/ant/Project.class
    [junit] Running org.apache.hadoop.fs.TestFiListPath
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.937 sec
    [junit] Running org.apache.hadoop.fs.TestFiRename
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 6.557 sec
    [junit] Running org.apache.hadoop.hdfs.TestFiHFlush
    [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 16.601 sec
    [junit] Running org.apache.hadoop.hdfs.TestFiHftp
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 34.026 sec
    [junit] Running org.apache.hadoop.hdfs.TestFiPipelines
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 8.262 sec
    [junit] Running 
org.apache.hadoop.hdfs.server.datanode.TestFiDataTransferProtocol
    [junit] Tests run: 29, Failures: 0, Errors: 0, Time elapsed: 212.885 sec
    [junit] Running 
org.apache.hadoop.hdfs.server.datanode.TestFiDataTransferProtocol2
    [junit] Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 395.321 sec
    [junit] Running org.apache.hadoop.hdfs.server.datanode.TestFiPipelineClose
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 36.842 sec

checkfailure:

-run-test-hdfs-fault-inject-withtestcaseonly:

run-test-hdfs-fault-inject:

BUILD SUCCESSFUL






> change hdfs jmxget to return an empty string instead of null when an 
> attribute value is not available.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-1738
>                 URL: https://issues.apache.org/jira/browse/HDFS-1738
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: tools
>            Reporter: Tanping Wang
>            Assignee: Tanping Wang
>            Priority: Minor
>         Attachments: HDFS-1738.patch
>
>
> Currently the tool, hdfs jmx returns null in case of an attribute value is 
> not available.  A null pointer exception is thrown and the value of the rest 
> attributes are not printed.  It makes more sense to return an empty string 
> and continue to print out the values for the rest attributes.
> Example of current behavior
> $ hdfs jmxget -server gsbl90629.blue.ygrid.yahoo.com -port 8004 -service 
> NameNode,name=NameNodeActivity
> >>>>>>>>jmx name: name=NameNodeActivity,service=NameNode
> tag.ProcessName=NameNode
> java.lang.NullPointerException
> at org.apache.hadoop.hdfs.tools.JMXGet.printAllValues(JMXGet.java:106)
> at org.apache.hadoop.hdfs.tools.JMXGet.main(JMXGet.java:329)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to