[
https://issues.apache.org/jira/browse/HADOOP-14508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16042591#comment-16042591
]
wenxin he commented on HADOOP-14508:
------------------------------------
When I use "-sequential" mode to write to hdfs, I got such NPE:
{code}
[root@hewenxin01 hadoop]# bin/hadoop jar
share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.0.0-alpha4-SNAPSHOT-tests.jar
TestDFSIO -write -sequential
2017-06-08 19:04:19,673 INFO fs.TestDFSIO: TestDFSIO.1.8
...
2017-06-08 19:04:19,842 WARN util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes where
applicable
java.lang.NullPointerException
at org.apache.hadoop.fs.TestDFSIO$WriteMapper.doIO(TestDFSIO.java:427)
at org.apache.hadoop.fs.TestDFSIO$WriteMapper.doIO(TestDFSIO.java:395)
at org.apache.hadoop.fs.TestDFSIO.sequentialTest(TestDFSIO.java:722)
at org.apache.hadoop.fs.TestDFSIO.run(TestDFSIO.java:846)
{code}
We forget to initialize {{ioer.stream}} in {{TestDFSIO#sequentialTest}}
It should look like this:
{code}
[root@hewenxin01 hadoop]# bin/hadoop jar
share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.0.0-alpha4-SNAPSHOT-tests.jar
TestDFSIO -write -sequential
2017-06-08 19:10:09,466 INFO fs.TestDFSIO: TestDFSIO.1.8
2017-06-08 19:10:09,470 INFO fs.TestDFSIO: nrFiles = 1
2017-06-08 19:10:09,470 INFO fs.TestDFSIO: nrBytes (MB) = 1.0
2017-06-08 19:10:09,470 INFO fs.TestDFSIO: bufferSize = 1000000
2017-06-08 19:10:09,470 INFO fs.TestDFSIO: baseDir = /benchmarks/TestDFSIO
2017-06-08 19:10:09,632 WARN util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes where
applicable
2017-06-08 19:10:10,639 INFO fs.TestDFSIO: out =
org.apache.hadoop.hdfs.client.HdfsDataOutputStream
2017-06-08 19:10:10,766 INFO fs.TestDFSIO: Seq Test exec time sec: 0.34
{code}
> TestDFSIO throws NPE when set -sequential argument.
> ---------------------------------------------------
>
> Key: HADOOP-14508
> URL: https://issues.apache.org/jira/browse/HADOOP-14508
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 3.0.0-alpha4
> Reporter: wenxin he
> Assignee: wenxin he
>
> Benchmark tool TestDFSIO throws NPE when set {{-sequential}} due to
> uninitialized {{ioer.stream}} in {{TestDFSIO#sequentialTest}}.
> More descriptions, stack traces see comments.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]