I have installed Pig 0.12 in my machine. when I run
darwin$ pig
grunt> ls /data/
hdfs://Nmame:10001/data/pg20417.txt<r 3> 674570
hdfs://Nname:10001/data/pg4300.txt<r 3> 1573150
hdfs:/Nname:10001/data/pg5000.txt<r 3> 1423803
hdfs://Nname:10001/data/weather <dir>
but when I try to create a query, I get the following error:
grunt> book = load '/data/pg4300.txt' as (lines:chararray);
2014-06-30 17:40:08,939 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " <PATH> "book=load "" at line 2, column 1.
Was expecting one of:
<EOF>
"cat" ...
"clear" ...
"fs" ...
"sh" ...
"cd" ...
"cp" ...
"copyFromLocal" ...
"copyToLocal" ...
"dump" ...
"\\d" ...
"describe" ...
"\\de" ...
"aliases" ...
"explain" ...
"\\e" ...
"help" ...
"history" ...
"kill" ...
"ls" ...
"mv" ...
"mkdir" ...
"pwd" ...
"quit" ...
"\\q" ...
"register" ...
"rm" ...
"rmf" ...
"set" ...
"illustrate" ...
"\\i" ...
"run" ...
"exec" ...
"scriptDone" ...
"" ...
"" ...
<EOL> ...
";" ...
Details at logfile: /Users/Documents/pig_1404175088198.log
I tried changingload
to LOAD
and as
to AS
but nothing worked.
/data
, because thats where my data folder. it is not in/user/data
to load it as default directory. but the real problems is with some versioning differences between Hadoop2.2 and pig. I need toant clean jar-all -Dhadoopversion=23
to fix it – Underthecounter