在UNO安装的Accumulo 2.0中运行Hello World示例InsertWithBatchWriter时出现问题。

huangapple 未分类评论53阅读模式
英文:

Issues running Hello World Example InsertWithBatchWriter on Accumulo 2.0 in UNO installation

问题

以下是您要翻译的内容:

我正在慢慢学习Accumulo命令,并在运行Apache Hello World示例时遇到问题,该示例旨在将1万行(5万个条目)的数据批量导入Accumulo。https://accumulo.apache.org/1.7/examples/

我使用uno构建来启动我的HDFS、Zookeeper和Accumulo(2.0),我可以通过Web浏览器连接到Hadoop和Accumulo。我可以通过Shell登录Accumulo,并已成功创建了表hellotable。然后,Apache示例中的说明说要启动批量插入数据的Java程序,使用BatchWriter进行插入。通用示例命令如下:

$ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter 实例 zookeeper 用户名 密码 hellotable

根据我的安装信息,我正在运行以下命令:

我Accumulo的实例名是uno,我的用户名是root,密码是secret。

$ accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter uno zookeepers root secret hellotable

当我运行命令时,我得到以下与Java和Accumulo相关的错误:

OpenJDK 64位服务器VM警告:选项UseConcMarkSweepGC在9.0版本中已被弃用,可能会在将来的版本中被移除。
SLF4J:类路径包含多个SLF4J绑定。
SLF4J:在[jar:file:/home/bob/fluo-uno/install/accumulo-2.0.0/lib/slf4j-log4j12-1.7.26.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[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:有关说明,请参见http://www.slf4j.org/codes.html#multiple_bindings。
SLF4J:实际绑定类型是[org.slf4j.impl.Log4jLoggerFactory]
无效参数:Java

'org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter'未找到。请使用完全限定的包名。

我该如何修改命令以顺利执行?

谢谢

英文:

I am slowly learning Accumulo command and am running into issues running the Apache Hello World Example to batch ingest 10K rows (50K entries) into accumulo. https://accumulo.apache.org/1.7/examples/

I used the uno build to get my HDFS, zookeeper and Accumulo (2.0) up and running. I can connect to hadoop and Accumulo using web browser. I can logon to Accumulo through shell and have successfully created the table hellotable. The instructions from the Apache example then say to launch the Java program that bulk inserts with a BatchWriter. The generic example command is as follows:

$ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter instance zookeepers username password hellotable

with my installed information, I am running the following command:

My instance of Accumulo is uno my user name is root and the password is secret

$ accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter uno zookeepers root secret hellotable

When I run the command I get following JAVA and accumulo related errors:

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.

How can I modify the command to execute cleanly?

Thanks

答案1

得分: 0

你尝试的示例是针对 Accumulo 1.7 版本的(如 URL 所示),该版本以前在默认类路径上附带了示例 jar 包。然而,你表明你正在运行 Accumulo 2.0。

这些示例并不适用于2.0版本,示例已被移动到一个单独的存储库,并且默认情况下不会出现在 Accumulo 的类路径上。如果你想尝试更新后的示例代码,可以在 https://github.com/apache/accumulo-examples 找到,尽管我不清楚该代码在主流使用方面的准备情况。

你也可以在网站上尝试 tour

英文:

The examples you are trying are specifically for Accumulo version 1.7 (as indicated by the URL), which previously shipped with an examples jar on the default class path. However, you have indicated you are running Accumulo 2.0.

Those examples are not written for 2.0, and the examples were moved to a separate repository, and will not be on the Accumulo class path out of the box. The updated example code can be found at https://github.com/apache/accumulo-examples if you wish to try, though I do not know how ready for mainstream use that code is.

You can also try the tour on the website.

huangapple
  • 本文由 发表于 2020年6月29日 07:40:04
  • 转载请务必保留本文链接:https://java.coder-hub.com/62629368.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定