如何将新的列族添加到现有的HBase表中? [英] How to add new column family to an existing HBase table?

查看:2106
本文介绍了如何将新的列族添加到现有的HBase表中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个表格,由

I created a table by

create 'tablename', 'columnfamily1'

现在是否可以添加另一个列族columnfamily2?什么是方法?

Now is it possible to add another column family 'columnfamily2'? What is the method?

推荐答案

看来

It seems

alter 'tablename', 'columnfamily2'


可以先禁用'tablename'。但是,即使启用它也可以正常工作。

does the trick. One may, disable 'tablename' first. However, it works fine even if enabled.

hbase(main):015:0> alter 'tablename', {NAME=> 'columnfamily2'}
Updating all regions with the new schema...
0/1 regions updated.
1/1 regions updated.
Done.

这篇关于如何将新的列族添加到现有的HBase表中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆