Accumulo:没有平板电脑服务器

cha*_*dra 2 hadoop accumulo apache-zookeeper

./bin/accumulo shell -u root
Password: ******

2015-02-14 15:18:28,503 [impl.ServerClient] WARN : There are no tablet servers: check that zookeeper and accumulo are running.

2015-02-14 13:58:52,878 [tserver.NativeMap] ERROR: Tried and failed to load native map library from /home/hduser/hadoop/lib/native::/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
java.lang.UnsatisfiedLinkError: no accumulo in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at org.apache.accumulo.tserver.NativeMap.<clinit>(NativeMap.java:80)
at org.apache.accumulo.tserver.TabletServerResourceManager.<init>(TabletServerResourceManager.java:155)
at org.apache.accumulo.tserver.TabletServer.config(TabletServer.java:3560)
at org.apache.accumulo.tserver.TabletServer.main(TabletServer.java:3671)
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.accumulo.start.Main$1.run(Main.java:141)
at java.lang.Thread.run(Thread.java:745)
2015-02-14 13:58:52,915 [tserver.TabletServer] ERROR: Uncaught exception in TabletServer.main, exiting
java.lang.IllegalArgumentException: Maximum tablet server map memory 83,886,080 and block cache sizes 28,311,552 is too large for this JVM configuration 48,693,248
at org.apache.accumulo.tserver.TabletServerResourceManager.<init>(TabletServerResourceManager.java:166)
at org.apache.accumulo.tserver.TabletServer.config(TabletServer.java:3560)
at org.apache.accumulo.tserver.TabletServer.main(TabletServer.java:3671)
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.accumulo.start.Main$1.run(Main.java:141)
at java.lang.Thread.run(Thread.java:745)
Run Code Online (Sandbox Code Playgroud)

上述错误显示在tserver_localhost.log中.任何人都可以帮我解决这个问题.我有hadoop在单节点模式下运行,zookeeper运行,我按照accumulo自述文件中的说明操作.我不知道如何启动平板电脑服务器.在自述文件中没有任何解释,任何人都可以帮助我.

小智 6

这是两个问题的汇合.

首先,您的Accumulo找不到它将用于堆积内存映射以进行实时编辑的本机库.知道你的Accumulo版本,你如何部署accumulo,并看到你的accumulo-env.sh将需要诊断它可能失败的原因.(询问用户邮件列表是最好的)在"构建"部分下查看"本地地图支持"下的自述文件的README.

例如,版本1.6.1段落给出了以下建议:在没有完整源代码树的情况下自己构建它们:

或者,您可以手动解压缩$ ACCUMULO_HOME/lib目录中的accumulo-native tarball.切换到当前目录中的accumulo-native目录并发出make.然后,将生成的"libaccumulo"库复制到$ ACCUMULO_HOME/lib/native/map中.

$ mkdir -p $ ACCUMULO_HOME/lib/native/map $ cp libaccumulo.*$ ACCUMULO_HOME/lib/native/map

通常,没有可用的本机库是软故障; Accumulo将很乐意发布WARN,然后依赖纯java实现.

您的第二个问题是由错误的内存配置引起的.Accumulo依赖单个配置参数来调整内存内存映射和java内存映射的内存使用.本机实现的内存在JVM堆之外分配,并且可能很大(在1-16GB范围内,具体取决于目标工作负载).在使用Java实现运行时,相同的配置值会占用最大堆大小的空间.

根据您的日志输出,您已为平板电脑服务器配置了大约46MB的最大堆总数.您已为块缓存分配了27MB,为内存映射分配了80MB.您看到的错误是因为这两个值会导致OOM.

您可以在accumulo-env.sh中增加总Java堆:

# Probably looks like this
test -z "$ACCUMULO_TSERVER_OPTS" && export ACCUMULO_TSERVER_OPTS="${POLICY} -Xmx48m -Xms48m "
#                                 change this part to give it more memory --^^^^^^
Run Code Online (Sandbox Code Playgroud)

和/或您可以在accumulo-site.xml中调整应该为本机映射,块缓存和索引缓存使用多少空间

  <!-- Amount of space to hold incoming random writes -->
  <property>
    <name>tserver.memory.maps.max</name>
    <value>80M</value>
  </property>

  <!-- Amount of space for holding blocks of data read out of HDFS -->
  <property>
    <name>tserver.cache.data.size</name>
    <value>7M</value>
  </property>

  <!-- Amount of space for holding indexes read out of HDFS -->
  <property>
    <name>tserver.cache.index.size</name>
    <value>20M</value>
  </property>
Run Code Online (Sandbox Code Playgroud)

如何平衡这三者将取决于您拥有多少内存以及您的工作负载.请记住,不仅仅是这两件事需要进入整个Java堆(就像每个RPC上写入/读取的当前单元的至少一个副本一样).