Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How do Zookeeper save HBase Column and Column Family metadata in Znode?

Solved Go to solution

How do Zookeeper save HBase Column and Column Family metadata in Znode?

New Contributor

I am trying to write a zookeeper watcher to monitor hbase column family and hbase column modification.

I know Hbase table is saved as a znode under the /table znode, but I did not get much info about how do zookeeper save the metadata of hbase column family and hbase column, so How can I get notified when there is any modification in hbase column family or hbase columns ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How do Zookeeper save HBase Column and Column Family metadata in Znode?

Guru

The best way to observe and run custom logic when a table is modified would be to write a master coprocessor. Your MasterObserver will be called before and after any table is modified (see https://hbase.apache.org/book.html#cp).

However, unlike column families, columns in HBase are not predefined. So you cannot observe column changes since there is no fixed "schema". Please read up on the HBase data model.

5 REPLIES 5

Re: How do Zookeeper save HBase Column and Column Family metadata in Znode?

Table metadata is stored as table descriptor in the corresponding table directory and is read and altered there itself. I don't think that we have any znode where we keep the information of columnfamily during alter or create table.

Re: How do Zookeeper save HBase Column and Column Family metadata in Znode?

New Contributor

Where is that table directory? Is it also in Zookeeper?

Re: How do Zookeeper save HBase Column and Column Family metadata in Znode?

it is in hdfs and if you are using HDP then it may be under /apps/hbase/data/data/<namespace>/<tableName>/.tabledesc/

Highlighted

Re: How do Zookeeper save HBase Column and Column Family metadata in Znode?

Guru

The best way to observe and run custom logic when a table is modified would be to write a master coprocessor. Your MasterObserver will be called before and after any table is modified (see https://hbase.apache.org/book.html#cp).

However, unlike column families, columns in HBase are not predefined. So you cannot observe column changes since there is no fixed "schema". Please read up on the HBase data model.

Re: How do Zookeeper save HBase Column and Column Family metadata in Znode?

New Contributor

Thanks I think that solves my problem, I used to use the Zookeeper watcher but it can only get the hbase table modification.

Don't have an account?
Coming from Hortonworks? Activate your account here