Azure上的Node.js和HBase(HDInsight)

我正尝试从Node.js访问微软Azure上的HBase。 我查看了不同的库,如hbase和REST API(webhcat)。 我想要实现的是创build一个表并从节点上传数据。 后来我想对这个数据集进行查询。 不幸的是,Azure的文档在这个问题上并不是很有帮助,因为它专注于PowerShell和.NET SDK。

我发现一个相当有用的文章是这样的: http : //blogs.msdn.com/b/bigdatasupport/archive/2014/04/22/querying-hdinsight-job-status-with-webhcat-via-native-powershell-or -node-js.aspx查询作业状态对我来说工作正常,但是在适应请求以便上载和查询数据时,我有点卡住了。 这甚至可能与使用webhcat(以前的寺庙)API?

这个azure页面描述了如何使用configuration单元或REST API与HDInsight上的HBase进行交互: http ://azure.microsoft.com/en-us/documentation/articles/hdinsight-hbase-get-started/#hive-query ,我不知道是否有可能做到这一点与node.js而不是PowerShell?

我会非常感谢任何想法和主angular在正确的方向!

您可以在HDInsight上使用HBase REST API,但是必须在/ hbaserest /上加上它。

您还需要提供基本身份validation凭据,这些凭据是在创build集群时提供的。 这应该也适用于群集上任何有效的hadoop用户。

端点是: https://[clustername].azurehdinsight.net/hbaserest/

REST API的其余部分logging在这里: https : //wiki.apache.org/hadoop/Hbase/Stargate

所以例如在节点中:

 var superagent = require('superagent') superagent.get('https://clustername.azurehdinsight.net/hbaserest/my_table/schema') .auth(username, password) .end(function(err, result) { console.log(result.text) }) 

hbase有一个NPM模块,但是它当前(v 0.1.7)不支持HDInsight Hbase群集所需的身份validation或SSL。