错误:解析公共apache日志文件时出现意外的双引号

n1bvdmb6  于 2021-06-24  发布在  Pig
关注(0)|答案(1)|浏览(352)

我试图解析apache日志:

159.142.136.231 - - [08/Aug/1995:21:56:04 -0400] "GET /shuttle/countdown/ HTTP/1.0" 200 4673 
Code:
log = load "/myhdfs/project/TestLog.txt" USING org.apache.pig.piggybank.storage.apachelog.ApacheCommonLogLoader AS (address, logname, user, time,method, uri, proto,status, bytes);
Error :
<line 1, column 9>  Unexpected character '"'
2015-12-12 00:49:10,187 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 1, column 9>  Unexpected character '"'.

我不知道为什么会发生这种错误?

e3bfsja2

e3bfsja21#

在给出hdfs路径时,请尝试使用单引号而不是双引号

相关问题