rashmi
rashmi

Reputation: 16

data insertion in particular hbase regionserver

I want to insert data in particular datanode\regionserver,

what configuration changes are needed for this?

Let say, there are 4 datanodes A, B, C, D hostnames. and 4 threads are running. One thread is inserting records only on datanode A and B. Another thread is inserting\accessing records in datanode C. forth thread is inserting records in C and D.

Is there any configuration which i can do for this type of insertion? which hbase\hadoop API would be used for programmatic insertion\access?

One more thing, can we specify same character format(UTF8) used at both client java application and hbase db and hadoop cluster?

regards, rashmi

Upvotes: 0

Views: 198

Answers (1)

Paul M
Paul M

Reputation: 2046

With hbase, you can't really target a specific datanode or regionserver. I guess you can target a specific region and if you make sure each regionserver has only one region, then its pretty close to what you are looking for. I can say this is not a typical usage pattern for hbase so I would make sure this is really what you want.

To manage the regions, you'll want to disable splitting by setting hbase.hregion.max.filesize to something like 100GB and pre-splitting your table by hand. You can pre-split your table using the HBaseAdmin class.

As far as character format, hbase doesn't have data types or character sets - everything is stored as bytes - so there should be no problem using utf8.

If your using java, you can use the standard java API. For other languages, you have your choice of Thrift, Avro and REST interfaces though none of them are going to be as fast as using the java API.

Upvotes: 1

Related Questions