Support Questions
Find answers, ask questions, and share your expertise

Accesing remote HBASE using java code via KNOX Gateway

Hi All,

I have developed a java application that runs in PCF (pivotal) . I would like to insert data into HBASE via KNOX gateway using this java application. Both PCF and hadoop are in different domains , so i am planning to use KNOX gateway for hbase connectivity.

I have gone through some examples which access Hadoop WebHDFS via KNOX gateway . But my requirement is not access hdfs , rather I would like to insert data in to HBASE using my java application that runs in PCF.

Can some one please share list of steps that i need to follow to accomplish above requirement. Also, please share any sample code if available. Thank You.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Accesing remote HBASE using java code via KNOX Gateway

Contributor

@Srikanth Gorripati

On infrastructure side you need to have the following in place:

  • A running HBase cluster
  • At least one HBase REST server up and running. If you have more you can configure Knox in HA mode
  • Knox configured to point to the HBase REST server url and port(s).
  • You can get some help troubleshooting Knox here.

On application side you need to:

  • Use a library that can perform requests to HTTP servers. (There's many and you probably have a favourite one?)
  • Direct your call to the Knox url:port endpoint using the path of the defined topology and the HBase service /gateway/default/hbase
  • Use the correct path of the HBase REST API defined in the HBase book

View solution in original post

6 REPLIES 6

Re: Accesing remote HBASE using java code via KNOX Gateway

Super Collaborator

You may want to use Stargate REST API Wiki page

Re: Accesing remote HBASE using java code via KNOX Gateway

Thank You.

Re: Accesing remote HBASE using java code via KNOX Gateway

Contributor

@Srikanth Gorripati

On infrastructure side you need to have the following in place:

  • A running HBase cluster
  • At least one HBase REST server up and running. If you have more you can configure Knox in HA mode
  • Knox configured to point to the HBase REST server url and port(s).
  • You can get some help troubleshooting Knox here.

On application side you need to:

  • Use a library that can perform requests to HTTP servers. (There's many and you probably have a favourite one?)
  • Direct your call to the Knox url:port endpoint using the path of the defined topology and the HBase service /gateway/default/hbase
  • Use the correct path of the HBase REST API defined in the HBase book

View solution in original post

Re: Accesing remote HBASE using java code via KNOX Gateway

Thank you. Let me try this and get back to you if any issues.

Re: Accesing remote HBASE using java code via KNOX Gateway

New Contributor

Hi @srikanth_velamm ,

 

I am also running into the same problem, where I need to connect to HBase via Knox Gateway(using Knox URL and credentials) using Java.

 

I am using the below HBase Client.

cimpile group: 'org.apache.hbase', name: 'hbase-client', version: '2.4.4'

 

Have you resolved the issue? If so, please let me know the library you used and how to connect using the Knox URL and credentials?

 

Thanks.

Re: Accesing remote HBASE using java code via KNOX Gateway

Community Manager

@saamurai, as this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.


Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community: