Search code examples
javahadoopnamespaceshbase

Can it affect the performace of application If we create the NameSpaces and Tables at runtime in HBase?


We are creating Namespace and several tables (5 to 6) at runtime and it takes 10-15 sec to create whole structure. Is it recommended to create tables at the runtime in HBase?


Solution

  • Generally it is not recommended to create HBase tables or to change column family at runtime in application code. Firstly, the client will have no clue when the table is ready to write and read unless you tell them explicitly. This can be extra complexity of your systems. Meanwhile, the overall availability of the system is in question, for e.g. tables must be disabled when making ColumnFamily modifications. Second, the schema of the HBase tales are very important to performance and functionalities. It needs careful design and should be understood well by the users before their application read and write the table.

    However, if 1. you have very clear schema design up front, and 2. the code of creating tables is running by provisioned control plane (instead of in application business logic), you can create tables at runtime using Admin Java API.