我有一些二进制文件与“.spc”模式,我想把这些文件存储到hbase与PigMap作业。rowkey是文件名。
以下是我使用的命令:
A = LOAD 'hdfs-directory/sampleID-uvvis.spc' USING BinStorage();
B = FOREACH A GENERATE $0 AS rowkey;
C = GROUP B BY rowkey;
STORE C INTO 'hbase://test3' USING BinStorage('colfamily:uvis');
我得到的错误如下:
[main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116:
<line 12, column 0> Output Location Validation Failed for: 'hbase://test3
More info to follow:
java.io.IOException: No FileSystem for scheme: hbase
加载后我还检查了文件:
Dump A
Input(s):
Successfully read 0 records (3353 bytes) from: "hdfs-directory-uvvis.spc"
Output(s):
Successfully stored 0 records in: "hdfs-directory/tmp/temp-
707332811/tmp1004712115"
有人能帮我解决这个问题吗?如何将二进制文件加载并存储到hbase中?
我是新的hbase和Pig的工作,任何想法将不胜感激。
1条答案
按热度按时间bqjvbblv1#
您应该使用org.apache.pig.backend.hadoop.hbase.hbastorage类进行存储。看看这个例子
https://pig.apache.org/docs/r0.14.0/api/org/apache/pig/backend/hadoop/hbase/hbasestorage.html