【发布时间】:2017-10-13 18:42:14
【问题描述】:
我想通过 pig 脚本从 hbase 远程服务器读取/写入数据。我们正在使用 Hortonworks HDP 2.5
以下是场景。
我们有两个集群,一个用于 Hive,一个用于 Hbase。我们可以访问作为 Hive 集群一部分的边缘节点。
我们的代码(MapReduce 作业和 Pig 脚本)将在 Hive 集群上执行。
作为要求的一部分,我们还必须从 Hbase 表中读取/写入数据。
我们在网上找到了一种解决方案,但它不起作用。 http://grokbase.com/t/cloudera/cdh-user/137at5cg72/pig-stores-into-remote-hbase
此解决方案建议在我们的 pig 脚本中注册 hbase 服务器的 zookeeper quorum。但是语法不起作用。
set hbase.zookeeper.quorum '108.168.251.xxx-static.reverse.softlayer.com<http://108.168.251.xxx-static.reverse.softlayer.com:8020/hbase>'
...
STORE raw_rec INTO 'hbase://my_table<http://108.168.251.xxx-static.reverse.softlayer.com:8020/hbase>' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('score:val');
但这不起作用。 命名空间中只允许使用字母数字字符(不允许符号)
请告诉我们是否有任何方法可以使用默认的 org.apache.pig.backend.hadoop.hbase.hbasestorage 从 pig 内的远程 hbase 集群读取/写入数据
提前致谢!!!
【问题讨论】:
标签: hadoop hbase apache-pig hortonworks-data-platform