我正在尝试使用 MapReduce 将数据写入 Accumulo 表。以下是我的 accumulo 的 mapreduce 代码。
Job job = Job.getInstance(conf);
AccumuloOutputFormat.setZooKeeperInstance(job, accumuloInstance, zooKeepers);
AccumuloOutputFormat.setDefaultTableName(job, accumuloTableName);
AccumuloOutputFormat.setConnectorInfo(job, accumuloUser, new PasswordToken(accumuloPassword));
在执行时,我收到以下异常:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/thrift/TException
at org.apache.accumulo.core.client.mapreduce.lib.util.ConfiguratorBase.setConnectorInfo(ConfiguratorBase.java:107)
at org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.setConnectorInfo(AccumuloOutputFormat.java:94)
at core.accumulo.mapreduce.AccumuloMapReduceWrite.main(AccumuloMapReduceWrite.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
我将如何解决这个问题?我也尝试过并推荐了几个 URL。但这无济于事。