Sample for creating database on HBase using Java

Hi Everyone,
Does anyone has sample code that runs on cloudxlb.com server for creating and deleting tables using Java source code.
Thanks,
Utkarsh Rathor.

Hi @utkarsh_rathor,

This discussion might help you

:smiley: The discussion that you are pointing to is put BY ME and I am still facing the errors that are mentioned. I posted this question when that technique did not work.

1 Like

@utkarsh_rathor,

I’ve used HBase bulk loading using almost all tools, Sqoop, Hive, Pig, ImportTsv tools, Python. But apart from these
we have below other 3 options:
Flume, Java, MapReduce, Spark.

Let me know if anyone of the tools will suffice you, if still you need Java. Gimme some time, will post your answer.

I am trying to prepare for all possible scenarios related to interviews. I can use other tools as well. But transferring data is not my motive. I want to learn how to do the things using programming language so that I learn something out of it. That is the reason I first chose Java. I would try to do this with Scala and Python as well.
I have learnt to do this using Java. But due to some configuration differences I am not able to load and manipulate data.
You can look at my attempt at this at this link(Creating Hbase Table using Java ) .Some problem related to configuration class.
Thanks.

2 Likes

@utkarsh_rathor,

Got your intentions, will post answer tomorrow. So you can retry again.
P.S: Not only just java others are also important not just for interviews but for real-time practices.

1 Like

Hi @raviteja
You got any headway on this ? I am stuck on my side.

Hi @utkarsh_rathor,

i’ve tried your Java code to integrate with HBase Java API. It turns out to be that you’re trying to use “Deprecated API” is pre V1.0. At present running API is greater than V1.0. We can see this warnings in while compiling our java classes. Still we can try old API but that’s not good practice.

New API has modified majority of changes how Java interacts with HBase Java API. I’m working on Java Code with New API, then faced issues that exactly as same as your previous issues you posted in this forum:

Creating Hbase Table using Java

Above issue is regarding the configuration of HBase masters & ZooKeeper nodes in Java HBaseConfiguration object. This issue is solved & will post updates with clear documentation & code soon in same window.

P.S: Expect some delay, as i’ve occupied in lot of other activities.

1 Like