filenotfoundexception与pig

t9aqgxwy  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(327)

我正在用pig命令运行shell脚本 pig -param_file some-filename 但我有以下例外: FileNotFoundException . 我查过了,文件在指定的位置存在。什么会导致问题?

清管器启动前出错

ERROR 2997: Encountered IOException. File some-file.properties does not exist

java.io.FileNotFoundException: File some-file.properties does not exist
    at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:520)
    at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:398)
    at org.apache.pig.impl.io.FileLocalizer.fetchFilesInternal(FileLocalizer.java:791)
    at org.apache.pig.impl.io.FileLocalizer.fetchFile(FileLocalizer.java:735)
    at org.apache.pig.Main.fetchRemoteParamFiles(Main.java:756)
    at org.apache.pig.Main.run(Main.java:408)
    at org.apache.pig.Main.main(Main.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
kqlmhetl

kqlmhetl1#

试试这个,

pig pathname/pig_file_name.pig

其中pathname是拥有pig脚本文件的位置。
例如 pig C:\Users\Ren\Documents\Scripts\Weather_Analysis.pig

ia2d9nvy

ia2d9nvy2#

我想我也遇到了同样的问题,我这样做是为了解决这个问题:
指定属性文件的绝对路径。以下几点对我有用:

pig -param_file /home/cloudera/Desktop/SOMELONGPATH/parameters.properties /home/cloudera/Desktop/SOMELONGPATHAGAIN/Flight.pig

相关问题