java - 在UNO安装中的Accumulo 2.0上运行Hello World示例InsertWithBatchWriter的问题

标签 java hadoop accumulo

我正在慢慢学习Accumulo命令,并遇到运行Apache Hello World示例将批处理的10K行(50K条目)批量提取到累积中的问题。 https://accumulo.apache.org/1.7/examples/
我使用uno构建来启动并运行HDFS,zookeeper和Accumulo(2.0)。我可以使用网络浏览器连接到hadoop和Accumulo。我可以通过shell登录到Accumulo,并成功创建了可问候表。然后,来自Apache示例的指令说要启动用BatchWriter批量插入的Java程序。通用示例命令如下:

$ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter instance zookeepers username password hellotable
使用安装的信息,我正在运行以下命令:
我的Accumulo实例不是我的用户名是root,密码是secret
$ accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter uno zookeepers root secret hellotable
当我运行命令时,出现以下JAVA和累积相关错误:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/bob/fluo-uno/install/accumulo-2.0.0/lib/slf4j-log4j12-1.7.26.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/bob/fluo-uno/install/apache-zookeeper-3.6.1-bin/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Invalid argument: Java <main class> 'org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter' was not found.  Please use the wholly qualified package name.
如何修改命令以使其干净执行?
谢谢

最佳答案

您正在尝试的示例专门针对Accumulo 1.7版(如URL所示),该版本先前在默认类路径中随附有示例jar。但是,您已经表明您正在运行Accumulo 2.0。
这些示例不是为2.0编写的,而是将这些示例移到了单独的存储库中,而不是直接在Accumulo类路径上使用。如果您想尝试,可以在https://github.com/apache/accumulo-examples上找到更新的示例代码,尽管我不知道该代码已经为主流使用做好了准备。
您也可以在网站上尝试tour

关于java - 在UNO安装中的Accumulo 2.0上运行Hello World示例InsertWithBatchWriter的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62629368/

相关文章:

maven - 使用 Maven 安装 Accumulo 时无法执行目标

java - 从 Solr 5.0 获取所有可能的数据

hadoop - Hadoop 分布式缓存的生命周期

hadoop - Job在Cloudera 5.1下的LocalJobRunner中保持运行

hadoop - 使用安装在Apache Hadoop和Cloudera Hadoop中的apache sqoop有什么区别?

java - 使用自定义过滤器过滤 Accumulo 返回的结果时出错

database-schema - 如何将关系模式转换为 Accumulo 模式?

java - 为什么 Java 不允许基于类型参数的重载?

java - 遍历时将结果集值映射到另一个值

java - 编辑 .json 文件 : adding lines in certain parts of the file?