猪:无法用参数'[,]'来实例化'PigStorage'

时间:2017-02-10 15:10:28

标签: hadoop apache-pig

我正在尝试将一个简单的4列圆柱文本加载到猪中,而它只是不加载 文件内容为:

iphone5s,Apple iPhone 5s,smartphone,24000
iphone6s,Apple iPhone 6s,highendphone,60000
iphone6s_plus,Apple iPhone 6s Plus,highendphone,65000
len_ideapad,Lenovo Ideapad Laptop,laptop,19990
len_yoga,Lenovo Yoga Laptop,laptop,45599
len_ultra_thin,Lenovo Ultra thin Laptop,laptop,18999
len_k900,Lenovo K900,smartphone,14000
len_note3,Lenovo Vibe Note 3,smartphone,10800
len_note4,Lenovo Vibe K4 Note,smartphone,12999
nokia_3310,Nokia 3310 mobile phone,mobilephone,800
nokia_asha,Nokia Asha mobile phone,mobilephone,2499

我试过

REGISTER '/usr/hdp/current/pig-client/lib/piggybank.jar';
A = LOAD '/hdfs/path/to/file.txt' USING PigStorage(',');

它一直在诅咒我的错误:

2017-02-10 14:59:26,398 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: Pig script failed to parse:
<line 1, column 4> pig script failed to validate: java.lang.RuntimeException: could not instantiate 'PigStorage' with arguments '[,]'

我尝试使用PigStorage()PigStorage(' ')PigStorage(''),但没有任何效果。 我正在使用猪版0.15 我现在不知道该怎么做。

0 个答案:

没有答案
相关问题