Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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

avatar
New Member

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

avatar
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.

View solution in original post

5 REPLIES 5

avatar

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.

avatar
New Member

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

avatar

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

avatar
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.

avatar
New Member

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