【问题标题】:Retrieve existing hbase table's schema检索现有 hbase 表的架构
【发布时间】:2012-02-11 09:20:19
【问题描述】:

我想知道是否可以检索现有 hbase 表的架构?

我想知道列族的名称等等。

如果有任何 .net 或 java 代码,我将非常感谢为我发帖。

【问题讨论】:

  • 你试过什么?这听起来不像是你想知道它是否可能,而是听起来你正在寻找某人为你编写代码。

标签: c# java hbase thrift


【解决方案1】:

是的,这是可能的。你只需要调用HBaseAdmin.getTableDescriptor

HBaseAdmin hbaseAdmin = new HBaseAdmin(config);
HTableDescriptor tableDescriptor = hbaseAdmin.getTableDescriptor(tableName)

tableDescriptor 对象将包含有关表的所有信息(家庭等)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-04
    • 2013-01-08
    • 1970-01-01
    相关资源
    最近更新 更多