pig 将Hbase中表导出为CSV出现错误 高分!!! 求解!!!

发布网友 发布时间:2022-04-25 16:03

我来回答

1个回答

热心网友 时间:2022-05-06 10:10

REGISTER /usr/hdp/current/hbase-client/lib/htrace-core-3.1.0-incubating.jar
REGISTER /usr/hdp/current/pig-client/piggybank.jar;
x = LOAD 'hbase://CXXW_3M_XIAOXU' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('-loadKey true','0:ES_CXXW_3M_CC_CZCS,0:ES_CXXW_3M_CC_GQCS,0:ES_CXXW_3M_CC_PJYCZCS,0:ES_
CXXW_3M_CC_TPCS,0:ES_CXXW_3M_JY_TJDD_GQCS,0:ES_CXXW_3M_JY_TJDD_TPCS,0:ES_JCSX_RKSX_ZJLX');

STORE x INTO 'test-tbl-data.csv' USING PigStorage(',');
-loadKey true :是指定的rowkey

[root@hadoop1 ~]# pig -x maprece xiaoxu-ExportHbase.pig
17/04/05 17:16:32 INFO pig.ExecTypeProvider: Trying ExecType : LOCAL
17/04/05 17:16:32 INFO pig.ExecTypeProvider: Trying ExecType : MAPREDUCE
17/04/05 17:16:32 INFO pig.ExecTypeProvider: Picked MAPREDUCE as the ExecType
2017-04-05 17:16:32,109 [main] INFO org.apache.pig.Main - Apache Pig version 0.16.0.2.5.0.0-1245 (rexported) compiled Aug 26 2016, 02:07:35
2017-04-05 17:16:32,109 [main] INFO org.apache.pig.Main - Logging error messages to: /jboss/mwork/pig_1491383792107.log
2017-04-05 17:16:33,130 [main] INFO org.apache.pig.impl.util.Utils - Default bootup file /jboss/.pigbootup not found
2017-04-05 17:16:33,244 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://j4-nwdx-004-17:8020
2017-04-05 17:16:34,133 [main] INFO org.apache.pig.PigServer - Pig Script ID for the session: PIG-xiaoxu-ExportHbase.pig-1d8de8e3-0c85-4256-b503-fd115aa9b81f
2017-04-05 17:16:34,500 [main] INFO org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service address:
2017-04-05 17:16:34,602 [main] INFO org.apache.pig.backend.hadoop.PigATSClient - Created ATS Hook
2017-04-05 17:16:35,183 [main] INFO org.apache.pig.impl.util.SpillableMemoryManager - Selected heap (PS Old Gen) of size 699400192 to monitor. collectionUsageThreshold = 4580128, usageThreshold

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com