Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hadoop Pig与来自Hbase的数据连接_Hbase_Apache Pig - Fatal编程技术网

Hadoop Pig与来自Hbase的数据连接

Hadoop Pig与来自Hbase的数据连接,hbase,apache-pig,Hbase,Apache Pig,我正在尝试将文本文件中的数据与hbase中的数据合并,但失败 这是我使用的数据 C:XXX106820,7 XXX207442,9 G1:XXX1,53 XXX2,54 G2:XXX1,53 XXX1,53 G1从文本文件加载,G2从HBase加载 G1:{sn:bytearray,国家:chararray} G2:{sn:bytearray,国家:chararray} J1=按序号连接C,按序号连接G1 J2=按序号连接C,按序号连接G2。 当转储J1时,我可以得到结果,但对于J2,我什么也没

我正在尝试将文本文件中的数据与hbase中的数据合并,但失败

这是我使用的数据

C:XXX106820,7 XXX207442,9 G1:XXX1,53 XXX2,54 G2:XXX1,53 XXX1,53 G1从文本文件加载,G2从HBase加载

G1:{sn:bytearray,国家:chararray} G2:{sn:bytearray,国家:chararray} J1=按序号连接C,按序号连接G1 J2=按序号连接C,按序号连接G2。 当转储J1时,我可以得到结果,但对于J2,我什么也没有得到,这是日志

Successfully read records from: "/opt/inputdata/ips1"
Successfully read records from: "hbase://geoinfo1"

Output(s):
Successfully stored records in: "file:/tmp/temp410352744/tmp-403556508" -- EMPTY FILE

Successfully read 616 records (11473 bytes) from: "/opt/inputdata/ips1"
Successfully read 1354204 records from: "hbase://geoinfo"

Output(s):
Successfully stored 0 records in: "hdfs://master:9000/user/hadoop/jjj" --- EMPTY FILE
我的解决方案有什么问题吗?若要从hbase加载数据,并使用文本文件中的数据进行连接,该怎么办


提前感谢。

我假设您已将数据加载到Hbase中,然后在grunt shell提示符上使用以下pig脚本

要与HBasStorage一起存储的pig脚本:


G1=荷载'hbase://geoinfo1“使用org.apache.pig.backend.hadoop.hbase.hbastorage”column_family_name:*,“-loadKey true-gt 10000”作为序号:chararray,国家/地区:chararray

我知道原因了。我错过了类型信息。我改为序号后,国家:chararray改为序号:chararray,国家:chararray;很有效,谢谢。