您好:
测试了您的例子,报错了呢?
Configuration: Configuration: core-default.xml, core-site.xml
15/12/08 19:46:14 INFO client.RMProxy: Connecting to ResourceManager at ktbigdata1/192.168.100.141:8032
15/12/08 19:46:14 WARN mapreduce.JobResourceUploader: Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
15/12/08 19:46:15 INFO splitter.SingleMongoSplitter: SingleMongoSplitter calculating splits for mongodb://192.168.3.107:27017/mydb.tree
15/12/08 19:46:15 INFO mapreduce.JobSubmitter: number of splits:1
15/12/08 19:46:15 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
15/12/08 19:46:15 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1449480684665_0027
15/12/08 19:46:16 INFO impl.YarnClientImpl: Submitted application application_1449480684665_0027
15/12/08 19:46:16 INFO mapreduce.Job: The url to track the job: http://ktbigdata1:8088/proxy/application_1449480684665_0027/
15/12/08 19:46:16 INFO mapreduce.Job: Running job: job_1449480684665_0027
15/12/08 19:46:22 INFO mapreduce.Job: Job job_1449480684665_0027 running in uber mode : false
15/12/08 19:46:22 INFO mapreduce.Job: map 0% reduce 0%
15/12/08 19:46:27 INFO mapreduce.Job: Task Id : attempt_1449480684665_0027_m_000000_0, Status : FAILED
Error: java.lang.NullPointerException
at test.ImportWeblogsFromMongo$ReadWeblogsFromMongo.map(ImportWeblogsFromMongo.java:21)
at test.ImportWeblogsFromMongo$ReadWeblogsFromMongo.map(ImportWeblogsFromMongo.java:1)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
15/12/08 19:46:32 INFO mapreduce.Job: map 100% reduce 0%
15/12/08 19:46:32 INFO mapreduce.Job: Task Id : attempt_1449480684665_0027_m_000000_1, Status : FAILED
Error: java.lang.NullPointerException
at test.ImportWeblogsFromMongo$ReadWeblogsFromMongo.map(ImportWeblogsFromMongo.java:21)
at test.ImportWeblogsFromMongo$ReadWeblogsFromMongo.map(ImportWeblogsFromMongo.java:1)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
15/12/08 19:46:33 INFO mapreduce.Job: map 0% reduce 0%
15/12/08 19:46:35 INFO mapreduce.Job: Task Id : attempt_1449480684665_0027_m_000000_2, Status : FAILED
Error: java.lang.NullPointerException
at test.ImportWeblogsFromMongo$ReadWeblogsFromMongo.map(ImportWeblogsFromMongo.java:21)
at test.ImportWeblogsFromMongo$ReadWeblogsFromMongo.map(ImportWeblogsFromMongo.java:1)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
15/12/08 19:46:40 INFO mapreduce.Job: map 100% reduce 0%
15/12/08 19:46:40 INFO mapreduce.Job: Job job_1449480684665_0027 failed with state FAILED due to: Task failed task_1449480684665_0027_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0
15/12/08 19:46:40 INFO mapreduce.Job: Counters: 9
Job Counters
Failed map tasks=4
Launched map tasks=4
Other local map tasks=3
Rack-local map tasks=1
Total time spent by all maps in occupied slots (ms)=12125
Total time spent by all reduces in occupied slots (ms)=0
Total time spent by all map tasks (ms)=12125
Total vcore-seconds taken by all map tasks=12125
Total megabyte-seconds taken by all map tasks=12416000
这可能会是什么原因呢?
|