扫描HBase时如何显示时间戳?
for key, data in table.scan():
print('Found: {}, {}'.format(key, data))
我有一个HBASE表,需要扫描并打印时间戳。我已经编写了上述代码,但它仅产生像...
找到:b'row1',{b'cf1:col':( b'value')}
但我想要像...
找到:b'row1',{b'cf1:col':( b'value',timestamp)}
}
for key, data in table.scan():
print('Found: {}, {}'.format(key, data))
I have an HBase table that I need to scan and print the timestamp. I have written the above code but it only produces output like...
Found: b'row1', {b'cf1:col':(b'value')}
But I want output like...
Found: b'row1', {b'cf1:col':(b'value', timestamp)}
Any idea guys?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,HBASE在您返回的结果中不包括时间戳。您可以使用Happybase检索它们。要获得它们,您的应用程序需要具有
timestamps_include
,然后您可以使用,
By default, HBase does not include timestamps in the results you return. You can use HappyBase to retrieve them. To get them, your application needs to have
timestamps_include
,And after that, you can use,