Support Questions

Find answers, ask questions, and share your expertise

Query Multiple HBase table through custom Knox service

avatar
Explorer

I've created a custom Knox service with the intention of using custom .class files to be able to query multiple HBase tables and/or return multiple HBase table rows The work is a PoC to extent the capabilities of Knox through a custom service. Is this possible? I am still unable to get the new service to even begin calling the custom .class files I've uploaded to replace HBaseDispatch. I am doing this within the HDP 2.3.2 Sandbox on Windows.

1 ACCEPTED SOLUTION

avatar

This is definitely possible and encouraged. Have you taken a look at the Apache Knox Developer's Guide? I've also created a blog recently called Adding a service to Apache Knox that while not directly applicable to your use case, might answer some questions you didn't know you had.

View solution in original post

6 REPLIES 6

avatar

This is definitely possible and encouraged. Have you taken a look at the Apache Knox Developer's Guide? I've also created a blog recently called Adding a service to Apache Knox that while not directly applicable to your use case, might answer some questions you didn't know you had.

avatar
Explorer

Thanks. I've used the Developer's Guide and tried to follow your blog. However, I cannot connect to the weather API (or any web hosted API for that matter) within the sandbox. I've got my own APPID. Will your guide/blog work in a Sandbox environment?

avatar

Can you share what you have either via github or pasted here?

avatar
Explorer

When I cURL the API either using the APPID in the blog or my own, I get the following,

[root@sandbox ~]# curl 'http://api.openweathermap.org/data/2.5/weather?zip=95054,us&appid=2de143494c0b295cca9337e1e96b00e0'
curl: (6) Couldn't resolve host 'api.openweathermap.org'
[root@sandbox ~]# curl 'http://api.openweathermap.org/data/2.5/weather?zip=95054,us&appid=a457898615afb99ea5e7fc9aa10bbb98'
curl: (6) Couldn't resolve host 'api.openweathermap.org'

The same goes for any open web API. However, I am able to ping IP addresses and cURL API's from my command line. Does HDP 2.3.2 have a DNS server?

avatar
Master Mentor

@Sam Bass are you still having issues with this? Can you accept best answer or provide your own solution?

avatar
Explorer

I haven't got a working solution yet. It may be worth looking at Apache Phoenix and using that through Knox. I'm no longer working on my PoC due to other commitments. I'll try and get back to finishing it but until then, I think the solution will existing in editing Knox's .class files to change it's behaviour when querying HBase.