hadoop - 如何在HBase中测试恢复?

标签 hadoop hbase bigdata

我想测试HBase(独立模式)中数据的恢复,我该怎么做?恢复将在独立模式下工作吗?

在不关闭HBase的情况下从 shell 执行put命令后,我切换了VM
重新启动,它不会显示新添加的数据。即使我尝试从 eclipse 也没有显示。如何在HBase中测试恢复?我能够看到Hfiles,但是没有Hlog我需要为此设置任何路径吗?

这是我写的代码。

Put p=new Put(Bytes.toBytes("name10"));
p.setWriteAheadLog(true);
p.add(Bytes.toBytes("cf"), Bytes.toBytes("name"),Bytes.toBytes("Some Value 10"));
table.setAutoFlush(true);
table.put(p);

提前感谢

最佳答案

HLog文件存储在 .logs文件夹(Rootdir)中,在独立模式下,写入WAL需要花费时间,在WAL中,如在伪分布式或分布式模式下,它将立即更新

关于hadoop - 如何在HBase中测试恢复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15607070/

相关文章:

hadoop - MapReduce 排列

hadoop - 如何使 Hbase 对 Hadoop 2 中的名称节点故障具有弹性

java - 如何将 pdf/images 存储到 HBase 表

java - HADOOP HTTPFS : giving error "User: ubuntu is not allowed to impersonate ubuntu" while accessing the application through Http

hadoop - 当多个文件(在完全相同的文件夹/目录中)具有完全相同的列时,如何创建一个Hive表?

hadoop - 文件分成许多部分

hadoop - Hive CLI '-e' 和 '-f' 选项不起作用

python - 如何使用 python thrift 客户端扫描具有 maxversions 的 hbase 表?

hadoop - hadoop中输入了多少数据?

ruby-on-rails - 将文件保留为数据源或将所有内容放入数据库中