Peter W. wrote:
Hi,

Are there any HBase samples out there not using Junit?
Not currently. The unit tests are good source for figuring how to manipulate hbase. What else do you need?

I would like to:

a. create a master server, region and table descriptor.

Do you mean in code or on the command-line?  If the latter:

> ${HBASE_HOME}/bin/start-hbase.sh
> ${HBASE_HOME}/bin/hbase client createTable table_name colum_family_name 3

You may want/need to edit your ${HBASE_HOME}/conf/{hbase-env.sh,regionservers,hbase-site.xml} to suit your environment.

b. read in and convert a 'csv' file to byte[] (populating a family with 3 columns).

For general pattern adding to a table goes as follows after creating a client instance:

     long lockid = client.startUpdate(row);
     client.put(lockid, column_name, value);
      ...
     client.commit(lockid);


c. get the data back out into Text format.
Text result = new Text(client.get(row_name, column_name));


Also, are scanners required for getting values or can you
access the conceptual model with a labeled column directly?

Yes.

Since data to recreate a table is in the csv, is logging required?

Which logging are you referring to?

Yours,
St.Ack

Thanks,

Peter W.

Reply via email to