【问题标题】:How to restore an instance in Accumulo 1.7.0?如何在 Accumulo 1.7.0 中恢复实例?
【发布时间】:2016-03-09 00:54:59
【问题描述】:

我用 Hadoop 2.6.0 (HDFS) 和 Zookeeper 3.4.6 配置了 Accumulo 1.7.0,一切正常,但我想知道如何恢复实例。

谢谢!!!

更新

问题是我想在重启 PC 或停止所有进程后恢复实例。我放了日志以便更好地理解:

hduser@master:/opt/accumulo-1.7.0-bin/bin$ ./start-all.sh 
Starting monitor on localhost
WARN : Max open files on localhost is 1024, recommend 32768
Starting tablet servers .... done
Starting tablet server on localhost
WARN : Max open files on localhost is 1024, recommend 32768
2016-02-23 11:46:46,089 [fs.VolumeManagerImpl] WARN : dfs.datanode.synconclose set to false in hdfs-site.xml: data loss is possible on hard system reset or power loss
2016-02-23 11:46:46,092 [server.Accumulo] INFO : Attempting to talk to zookeeper
2016-02-23 11:46:46,242 [server.Accumulo] INFO : Waiting for accumulo to be initialized
2016-02-23 11:46:47,243 [server.Accumulo] INFO : Waiting for accumulo to be initialized
2016-02-23 11:46:48,246 [server.Accumulo] INFO : Waiting for accumulo to be initialized

hduser@master:/opt/accumulo-1.7.0-bin/bin$ ./accumulo init
2016-02-22 16:10:46,410 [fs.VolumeManagerImpl] WARN : dfs.datanode.synconclose set to false in hdfs-site.xml: data loss is possible on hard system reset or power loss
2016-02-22 16:10:46,411 [init.Initialize] INFO : Hadoop Filesystem is hdfs://master:9000
2016-02-22 16:10:46,412 [init.Initialize] INFO : Accumulo data dirs are [hdfs://master:9000/accumulo]
2016-02-22 16:10:46,412 [init.Initialize] INFO : Zookeeper server is localhost:2181
2016-02-22 16:10:46,412 [init.Initialize] INFO : Checking if Zookeeper is available. If this hangs, then you need to make sure zookeeper is running
2016-02-22 16:10:46,606 [init.Initialize] ERROR: FATAL It appears the directories [hdfs://master:9000/accumulo] were previously initialized.
2016-02-22 16:10:46,606 [init.Initialize] ERROR: FATAL: Change the property instance.volumes to use different filesystems,
2016-02-22 16:10:46,606 [init.Initialize] ERROR: FATAL: or change the property instance.dfs.dir to use a different directory.
2016-02-22 16:10:46,606 [init.Initialize] ERROR: FATAL: The current value of instance.dfs.uri is ||
2016-02-22 16:10:46,606 [init.Initialize] ERROR: FATAL: The current value of instance.dfs.dir is |/accumulo|
2016-02-22 16:10:46,606 [init.Initialize] ERROR: FATAL: The current value of instance.volumes is |hdfs://master:9000/accumulo|

【问题讨论】:

    标签: hdfs apache-zookeeper accumulo


    【解决方案1】:

    应该像进入bin 目录并运行适当的标记脚本一样简单。

    cd accumulo-1.7.0/bin
    ./stop-all.sh
    

    然后重新开始:

    ./start-all.sh
    

    【讨论】:

    • 请注意,如果您要删除 Accumulo HDFS 目录,则需要在重新启动 Accumulo 之前重新运行 accumulo init
    • @elserj 你有原因,但我的问题是当我重新启动我的电脑时我需要重新启动实例,因为当我运行accumulo init 时,它会发送退出的“instance.volumes”错误
    • @WilD 您不一定需要重新启动并删除 hdfs 目录,只需重新启动您的 PC。如果您不想继续处于关闭 PC 时的状态,您只需要这样做。
    • @Christopher,那么如何恢复状态,所以在重启电脑后?@elserj 的问题是它在运行./start-all.sh 时发送错误。
    • 它是一个文件系统,重启计算机后HDFS应该仍然存在。您需要做的就是启动 Accumulo,而不是从 HDFS 中删除任何内容。确保您没有将 HDFS 配置为使用 /tmp
    【解决方案2】:

    感谢您的帮助,问题是我需要为zookeeper设置存储快照的目录,因为默认情况下它存储在“/tmp”中。我修改了 zoo.cfg 文件并为“dataDir”设置了一个新目录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-16
      • 1970-01-01
      • 1970-01-01
      • 2012-04-04
      • 1970-01-01
      • 1970-01-01
      • 2021-09-02
      • 2021-11-04
      相关资源
      最近更新 更多