本文介绍了恢复如何在HBase中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实际观察HBase中恢复的工作原理,我使用了下面的代码片段:

I wanted to observe practically How Recovery Works in HBase, i had used the following snippet of code

    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);

执行上述代码后,我重新启动了我的VM (不停止HBase)并启动了HBase,当我通过这张表扫描Rowkey name10时没有出现。当我正确地停止 HBase实例和重新启动VM 时,它显示得很完美(因为从MemStore HBase将数据推送到HBase表中)。

尽管我的WAL启用了它无法恢复的原因。在我的理解中有没有什么错误?

WAL文件存储在哪里?我在本地文件系统而不是HDFS上使用HBase ....我可以在哪里检查WAL文件?

After executing the above code i restarted my VM (without stopping HBase) and started the HBase, when i scanned through this table the Rowkey name10 was not showing up. Where as, when i properly stopped the HBase instance and restarted the VM, it is showing perfectly(Since from MemStore the HBase pushed the data into HBase tables).
Although, my WAL was enabled why it's not able to recover. Is there any wrong in my understanding?
Where will be the WAL files are stored?I am using HBase on top of my local file system instead of HDFS....Where can i check the WAL files?

推荐答案

WAL文件存储在.logs文件夹中(隐藏)。在独立模式下,写入WAL需要一些时间,而在伪分布模式下,它将正常工作。

WAL files gets stored in .logs folder(hidden). In Stand alone mode it will takes time to write into WAL, where as in Pseudo Distributed mode it will works fine

这篇关于恢复如何在HBase中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 01:33