Tag: hbase

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在正确的方向!

节点js和hbase

我正尝试通过连接到hbase。 nodejs hbase模块。 我用过 https://github.com/wdavidw/node-hbase 为nodejs下载hbase模块,并尝试在使用express的nodejs脚本中运行以下代码,并处理传入的请求: – ……. app.post('/upload', function(req, res,next){ var read_stream = fs.createReadStream(req.files.upload_file.path, {encoding: 'base64'}); read_stream.on("data", function(data){ // process.stdout.write(data); dataload(data); }); read_stream.on("error", function(err){ console.error("An error occurred: %s", err) }); read_stream.on("close", function(){ console.log("File closed.") }); } function dataload(data){ var hbase = require('hbase'); var tableobj=hbase({ host: "{my server ip}", port: "8080" }).getTable('my_table1'); sys.debug(tableobj); tableobj.create("my_column_family", function(err, […]

nodejs通过phoenix和druid连接到hbase

我已经安装了Phoenix-phoenix-4.3.1,并通过sqline成功连接到hbase两台机器都是集群的一部分,另外一台机器不属于集群,也没有hadoop组件。 只是访问zookeeper的sqlline访问是好的,但通过应用程序(npm)通过德鲁伊连接运行到一个错误 我发现npm https://github.com/gaodazhu/phoenix-client 我得到以下 May 22, 2015 2:08:25 AM com.alibaba.druid.pool.DruidDataSource error SEVERE: dataSource init error java.sql.SQLException: org.apache.phoenix.jdbc.PhoenixDriver at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:514) at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:565) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:878) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:874) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97) at com.mlsc.DBClient.query(DBClient.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) Caused by: java.lang.ClassNotFoundException: org.apache.phoenix.jdbc.PhoenixDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at […]

Node.js,Hbase:无法连接到zookeeper

使用hbase-rpc-client并尝试连接到Zookeper,出现以下错误: 无法连接到zookeeper。 zkHosts:[my_host_name:2181] zkRoot:'/ hbase' 我知道主机和端口是正确的,因为我可以在Software Attributes部分的/ master-status中看到它: Zookeeper Quorum:my_host_name:2181 Zookeeper基本path:/ hbase 此外,我使用完全相同的configurationZooKeeper主机名:端口连接到我的Hbase与HareDBClient,它的工作原理。 nmap myhostname -p 2181结果nmap myhostname -p 2181 : PORT:2181 / tcp 状态:打开 服务:未知 版本: Hadoop:2.7.3 Hbase:1.3 Node.js:6.9.1 hbase-rpc-client:0.1.10 我意识到, hbase-rpc-client的最后支持版本的hbase是1.2.x. 任何人都可以确认无法使用hbase 1.3的软件包,如果是的话,推荐一些最新的工具来连接node.js到hbase? 因为在研究过程中没有出现比1.2.x更接近1.3的情况。 或者我只是缺less我的configuration中的东西?

HBase:节俭vsrestperformance

我知道在HBO上有一些关于REST和Thrift的StackOverflow的文章,但是我想关注一下性能问题。 我一直在使用Node.js中的以下库来连接到一个HBase实例: node-hbase: https : //github.com/wdavidw/node-hbase 节点 – 节俭: https : //github.com/apache/thrift/tree/trunk/lib/nodejs 在弄清楚为什么我不能得到Thrift网关的响应后,我终于得到了两个脚本运行,结果如下(每个输出相当于1000个操作完成): ┌─[mt@Marcs-MacBook-Pro]─[~/Sources/node-hbase] └──╼ node hbase.js hbase-write: 99ms hbase-write: 3412ms hbase-write: 3854ms hbase-write: 3924ms hbase-write: 3808ms hbase-write: 9035ms hbase-read: 216ms hbase-read: 4676ms hbase-read: 3908ms hbase-read: 3498ms hbase-read: 4139ms hbase-read: 3781ms completed ┌─[mt@Marcs-MacBook-Pro]─[~/Sources/node-hbase] └──╼ node thrift.js hbase-write: 4ms hbase-write: 931ms hbase-write: 1061ms hbase-write: 988ms hbase-write: […]