Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Accesing remote HBASE using java code via KNOX Gateway

Solved Go to solution

Accesing remote HBASE using java code via KNOX Gateway

New Contributor

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
Highlighted

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
4 REPLIES 4

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

New Contributor

Thank You.

Highlighted

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

Re: Accesing remote HBASE using java code via KNOX Gateway

New Contributor

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