grunt> A=load 'data.txt' as (name: chararray, id: int, age: int);
2012-09-11 18:06:32,072 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " <PATH> "A=load "" at line 3, column 1.
Was expecting one of:
<EOF>
"cat" ...
"fs" ...
"sh" ...
"cd" ...
"cp" ...
"copyFromLocal" ...
"copyToLocal" ...
"dump" ...
"describe" ...
"aliases" ...
"explain" ...
"help" ...
"kill" ...
"ls" ...
"mv" ...
"mkdir" ...
"pwd" ...
"quit" ...
"register" ...
"rm" ...
"rmf" ...
"set" ...
"illustrate" ...
"run" ...
"exec" ...
"scriptDone" ...
"" ...
<EOL> ...
";" ...
Details at logfile: /home/hadoop/pig-0.10.0/logs
不能为:grunt> A=load 'data.txt' as (name: chararray, id: int, age: int);
下面两种都可以:(注意,上面的不能运行主要是A后面一定要有空格)
grunt> A =load 'data.txt' as (name: chararray, id: int, age: int);
grunt> A = load 'data.txt' as (name: chararray, id: int, age: int);