locked
Azure HBASE REST - simple get failing for colfam:col RRS feed

  • Question

  • This should be a very simple one (been searching for a solution all day - read a thousand and a half posts).

    I put a test row in my HBASE table in hbase shell:

    put 'iEngine','testrow','SVA:SourceName','Journal of Fun'

    I can get the value for a column family using the REST API in DHC Chrome:  

    https:// ienginemaster.azurehdinsight.net/hbaserest/iEngine/testrow/SVA

    I can't seem to get it for the specific cell: 

    https:// ienginemaster.azurehdinsight.net/hbaserest/iEngine/testrow/SVA:SourceName

    {
    "Row": [{
        "key": "dGVzdHJvdw==",
        "Cell": [{
            "column": "U1ZBOlNvdXJjZU5hbWU=",
            "timestamp": 1440602453975,
            "$": "Sm91cm5hbCBvZiBGdW4="
        }]
    }]
    

    }

    I get back a 400 error. 

    When successfully asking for just the family, I get back:

    I tried replacing the encoded value for SVA:SourceName, and a thousand other things.   I'm assuming I'm missing something simple.

    Wednesday, August 26, 2015 7:16 PM

Answers

  • Hi WinningJr,

    The issue is due to a colon character in the request. HBase cluster gateway by defaults blocks this character. As Amar pointed out this issue is being worked on and we'll enable the character pass through. In the meantime there are couple of workarounds:

    1. You can bypass gateway by deploying cluster into VNet. In this case your application will be able to send requests directly to REST servers on the cluster. The URI would be workernode0.<clusterdnsuffix>:8090. The rest servers are hosted on HTTP port 8090. You can use any of the workernodes from 0 to N-1 where N is number of worker nodes in your cluster. You don't need to add hbaserest to the URI. You can get <clusterdnssuffix> following the article https://azure.microsoft.com/en-in/documentation/articles/hdinsight-hbase-provision-vnet/

    2. Use scanner APIs with filter on column instead of cell get request.

    Maxim

    Monday, September 14, 2015 6:59 PM

All replies

  • Hi,

    Thank you for contacting Microsoft Forums. 

    Have you tried the example provided in https://azure.microsoft.com/en-in/documentation/articles/hdinsight-hbase-tutorial-get-started/ under the title : Use the .NET HBase REST API client library.

    the example is comprehensive and does talk about :

    1) Inserting data

    2) Retrieving data at the cell level.

    Please try it out and let me know if it helps you.

    Best,

    Amar

    Tuesday, September 1, 2015 6:00 AM
  • I am not using the .NET client library (though I did try it as described below).  I'm making a direct REST call as documented in https://wiki.apache.org/hadoop/Hbase/Stargate  (single cell query).  

    I'm thinking Azure is just not implementing the API correctly.  I need to get back just the single cell in the column family.   The .NET examples get the entire column family into a cell set, then shows how to get the value from a single cell from the giant cell set - that means getting WAY to much data for a web service.   

    Additionally, the error returned in an application error (400 error, bad request), rather than a 404 "not found" error.

    • Edited by WinningJr Wednesday, September 2, 2015 11:09 PM
    Wednesday, September 2, 2015 11:03 PM
  • Hi,

    Thank you for your response. let me try to get some opinion on this and then respond back to you.

    Best,

    Amar

    Friday, September 4, 2015 1:10 PM
  • Hi,

    I got a response on this and this is being worked on. The workaround till a fix is out is to set up a HBase cluster in a VNET and use RPC calls as mentioned in the article: https://azure.microsoft.com/en-in/documentation/articles/hdinsight-hbase-provision-vnet/ 

    I will be marking this thread as "proposed as answer" and you can always "unpropose" for continued discussion.

    Best,

    Amar

    • Proposed as answer by AmarpreetBassasn Saturday, September 5, 2015 3:53 PM
    • Unproposed as answer by WinningJr Thursday, September 10, 2015 12:59 PM
    Saturday, September 5, 2015 3:52 PM
  • Thank You for all the good work.  I un-proposed the answer as I'm not using Java on the client.  I'm making REST web service calls to HBase from a web application.     Unless you are outlining a plan of somehow creating our own web service on Azure that uses RPC to call hbase, but that means the work-around is to NOT use the REST API and to create our own.  That is not a work-around "I" would propose!
    Thursday, September 10, 2015 1:08 PM
  • Hi WinningJr,

    The issue is due to a colon character in the request. HBase cluster gateway by defaults blocks this character. As Amar pointed out this issue is being worked on and we'll enable the character pass through. In the meantime there are couple of workarounds:

    1. You can bypass gateway by deploying cluster into VNet. In this case your application will be able to send requests directly to REST servers on the cluster. The URI would be workernode0.<clusterdnsuffix>:8090. The rest servers are hosted on HTTP port 8090. You can use any of the workernodes from 0 to N-1 where N is number of worker nodes in your cluster. You don't need to add hbaserest to the URI. You can get <clusterdnssuffix> following the article https://azure.microsoft.com/en-in/documentation/articles/hdinsight-hbase-provision-vnet/

    2. Use scanner APIs with filter on column instead of cell get request.

    Maxim

    Monday, September 14, 2015 6:59 PM
  • I logged a case with Premium support. They have confirmed it is a bug with no work-around (as in, no work-around if you are using the REST API). They are planning a fix.
    • Proposed as answer by gwinning Monday, September 14, 2015 8:25 PM
    Monday, September 14, 2015 8:25 PM
  • The workaround part is not absolutely correct, but it may depend on exact scenario where some of the workarounds may not be applicable. Please include me in the support case, we'll correct that. Just refer to me by name and support team will include me. Thank you.
    Monday, September 14, 2015 9:00 PM
  • Hi all

    Is there still no workaround for this "bug"?

    Want to deploy a Node.js Frontend as WebApp to Azure, since it is not possible to deploy it into a Vnet i do not see a way on how to do it. A Scanner is not a solution here, since it will affect the performance...

    Thanks for a short feedback.

    kind regards


    Friday, June 24, 2016 1:10 PM