99re热视频这里只精品,久久久天堂国产精品女人,国产av一区二区三区,久久久精品成人免费看片,99久久精品免费看国产一区二区三区

HBase模式(Schema) 創(chuàng)建

2018-03-14 14:07 更新

HBase模式創(chuàng)建

你可以使用 Apache HBase Shell 或使用 Java API 中的 Admin 來創(chuàng)建或更新 HBase 模式。

進行 ColumnFamily 修改時,必須禁用表格,例如:

Configuration config = HBaseConfiguration.create();
Admin admin = new Admin(conf);
TableName table = TableName.valueOf("myTable");

admin.disableTable(table);

HColumnDescriptor cf1 = ...;
admin.addColumn(table, cf1);      // adding new ColumnFamily
HColumnDescriptor cf2 = ...;
admin.modifyColumn(table, cf2);    // modifying existing ColumnFamily

admin.enableTable(table);

HBase模式更新

當對表或 ColumnFamilies (如區(qū)域大小、塊大小) 進行更改時,這些更改將在下一次出現(xiàn)重大壓縮并重新寫入 StoreFiles 時生效。

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號