Tuesday, April 10, 2012

HBase Schema Manager

An open software which is : A small maven based application that allows to create and change HBase tables using an external XML schema file.
You can get the source code from HERE 


You can use it like :


See the sample schema.xml for a start. You can define as many named configurations within one schema file as you wish. The same is true for tables and, within each table, the column family definitions. Once you have created your schema file use it like this:
java -jar hbase-schema-manager-1.0.0.jar [<options>] <schema-xml-filename> [<configuration-name>]
where "options" can be:
-c,--create-config       creates a config from the tables.
-l,--list                lists all tables but performs no further action.
-n,--dryrun              do not create or change tables, just print out
                         actions.
-p,--client-port <arg>   the zookeeper client port to use, default: 2181
-q,--quorum <arg>        the list of quorum servers, e.g.
                         "foo.com,bar.com"
-v,--verbose             print verbose output.
Notes:
  • If no configuration name was given then the first one found is used or in case of using "-c" it defaults to "new".
  • The list of quorum server is without ports and comma separated.
Example:
java -jar hbase-schema-manager-1.0.0.jar -v -l schema.xml
You can create a config from an existing cluster like so:
java -jar hbase-schema-manager-1.0.0.jar -c new-schema1.xml
or:
java -jar hbase-schema-manager-1.0.0.jar -c -q localhost - cluster1 > new-schema2.xml
Notes:
Using "-" for the schema file is redirecting the output to standard out.

Source : HERE 

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

#Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc

 #Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc Linux is an open-source operating system that is loved by millio...