Hadoop Job在FBUtilities.java中抛出NullPointerException

时间:2012-07-31 10:51:58

标签: hadoop nullpointerexception cassandra

我在尝试启动可以访问Cassandra的hadoop作业时遇到NullPointerException。这是堆栈跟踪:

线程“main”java.lang.NullPointerException中的异常     在org.apache.cassandra.utils.FBUtilities.newPartitioner(FBUtilities.java:415)     在org.apache.cassandra.hadoop.ConfigHelper.getOutputPartitioner(ConfigHelper.java:416)     在org.apache.cassandra.hadoop.ColumnFamilyOutputFormat.checkOutputSpecs(ColumnFamilyOutputFormat.java:90)     在org.apache.cassandra.hadoop.ColumnFamilyOutputFormat.checkOutputSpecs(ColumnFamilyOutputFormat.java:81)     在org.apache.hadoop.mapred.JobClient $ 2.run(JobClient.java:887)     在org.apache.hadoop.mapred.JobClient $ 2.run(JobClient.java:850)     at java.security.AccessController.doPrivileged(Native Method)     在javax.security.auth.Subject.doAs(Subject.java:416)     在org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)     在org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)     在org.apache.hadoop.mapreduce.Job.submit(Job.java:500)     在org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)     在RowKeyIndexer.run(RowKeyIndexer.java:393)     在Indexer.run(Indexer.java:56)     在org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)     在Indexer.main(Indexer.java:30)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:616)     在org.apache.hadoop.util.RunJar.main(RunJar.java:156)

我正在运行hadoop版本1.0.3和cassandra版本1.1.2。

我非常感谢任何帮助,因为我不知道从哪里开始。

非常感谢!

1 个答案:

答案 0 :(得分:3)

看起来您还没有设置输出parititioner,如下所示:

ConfigHelper.setOutputPartitioner(conf, "org.apache.cassandra.dht.RandomPartitioner");