0

pig で簡単なスクリプトを作成しましたが、ターミナルから実行するとうまく動作します。
ただし、Apache サーバーを使用してブラウザーからスクリプトを実行しようとすると、次のエラーがスローされます。

[main] ERROR org.apache.pig.tools.grunt.Grunt - You don't have permission to perform the operation. Error from the server: dummy (Permission denied)
[main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2997: Encountered IOException. dummy (Permission denied)

問題を解決するためのアイデアはありますか? それが役に立ったら、スクリプトのどこにも「ダミー」と呼ばれるものを使用していません!!!

PS: /tmp hdfs ディレクトリの権限を 777 に変更しましたが、役に立ちませんでした!!
         /tmp ローカル ディレクトリの権限が 777 であることを確認しましたが、問題ありませんでした!!
         -Dpig.temp.dir を apache が書き込み権限を持つディレクトリに使用しようとしましたが、役に立ちませんでした!!
助けてください、私は何かを逃しましたか?

編集:言及する価値があります:このエラーは、豚スクリプトのコンパイルをチェックしているときにスクリプトを実行しているときに発生します。つまり、 pig -c ScriptName

2013-09-06 10:41:19,344 [main] INFO org.apache.pig.Main - Apache Pig version 0.10.0 (r1328203) compiled Apr 19 2012, 22:54:12
2013-09-06 10:41:19,344 [main] INFO org.apache.pig.Main - Logging error messages to: /data/storage/pig-0.10.0/logs/pig_1378444279340.log
2013-09-06 10:41:19,658 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://[master]:9000
2013-09-06 10:41:19,743 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: [master]:9001
2013-09-06 10:41:19,866 [main] INFO org.apache.pig.scripting.jython.JythonScriptEngine - created tmp python.cachedir=/tmp/pig_jython_4266457116882300725
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/lib/tools.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/hadoop-core-0.20.203.0.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/aspectjrt-1.6.5.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/aspectjtools-1.6.5.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-beanutils-1.7.0.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-beanutils-core-1.8.0.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-cli-1.2.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-codec-1.4.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-collections-3.2.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-configuration-1.6.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-configurationhadoop-1.6.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-daemon-1.0.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-digester-1.8.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-el-1.0.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-httpclient-3.0.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-lang-2.4.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-logging-1.1.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-logging-api-1.0.4.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-math-2.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/commons-net-1.4.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/core-3.1.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/guava-r09.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/hadoop-fairscheduler-0.20.203.0.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/hbase-0.94.4.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/hsqldb-1.8.0.10.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/hstreaming-all.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jackson-core-asl-1.0.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jackson-mapper-asl-1.0.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jasper-compiler-5.5.12.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jasper-runtime-5.5.12.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jets3t-0.6.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jetty-6.1.26.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jetty-util-6.1.26.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jsch-0.1.42.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/junit-4.5.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/kfs-0.2.2.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/log4j-1.2.15.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/mockito-all-1.8.5.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/oro-2.0.8.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/protobuf-java-2.4.0a.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/servlet-api-2.5-20081211.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/slf4j-api-1.4.3.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/slf4j-log4j12-1.4.3.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/xmlenc-0.52.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/zookeeper-3.4.5.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jsp-2.1/jsp-2.1.jar'
*sys-package-mgr*: processing new jar, '/home/hadoop/hadoop-0.20.203.0/lib/jsp-2.1/jsp-api-2.1.jar'
*sys-package-mgr*: processing new jar, '/data/storage/pig-0.10.0/lib/automaton.jar'
*sys-package-mgr*: processing new jar, '/data/storage/pig-0.10.0/lib/jython-2.5.0.jar'
*sys-package-mgr*: processing new jar, '/data/storage/pig-0.10.0/pig-0.10.0-withouthadoop.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/resources.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/rt.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/jsse.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/jce.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/charsets.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/ext/sunpkcs11.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/ext/sunec.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/ext/sunjce_provider.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/ext/zipfs.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/ext/localedata.jar'
*sys-package-mgr*: processing new jar, '/usr/java/jdk1.7.0_03/jre/lib/ext/dnsns.jar'
2013-09-06 10:41:28,086 [main] INFO org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: pythonDefpyUDF.[UDF1]
2013-09-06 10:41:28,087 [main] INFO org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: pythonDefpyUDF.[UDF2]
2013-09-06 10:41:28,266 [main] WARN org.apache.pig.PigServer - Encountered Warning IMPLICIT_CAST_TO_FLOAT 1 time(s).
2013-09-06 10:41:28,421 [main] WARN org.apache.pig.PigServer - Encountered Warning IMPLICIT_CAST_TO_FLOAT 1 time(s).
2013-09-06 10:41:28,578 [main] WARN org.apache.pig.PigServer - Encountered Warning IMPLICIT_CAST_TO_FLOAT 1 time(s).
2013-09-06 10:41:29,665 [main] WARN org.apache.pig.PigServer - Encountered Warning IMPLICIT_CAST_TO_FLOAT 1 time(s).
2013-09-06 10:41:29,712 [main] WARN org.apache.pig.tools.grunt.GruntParser - 'rm/rmf' statement is ignored while processing 'explain -script' or '-check'
2013-09-06 10:41:29,774 [main] WARN org.apache.pig.PigServer - Encountered Warning IMPLICIT_CAST_TO_FLOAT 1 time(s).
2013-09-06 10:41:29,814 [main] ERROR org.apache.pig.tools.grunt.Grunt - You don't have permission to perform the operation. Error from the server: dummy (Permission denied)
2013-09-06 10:41:29,815 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2997: Encountered IOException. dummy (Permission denied)
Details at logfile: /data/storage/pig-0.10.0/logs/pig_1378444279340.log
4

1 に答える 1

0

apache ユーザーの権限の問題のようです。
次のコマンドpig -c ScriptNameの実行中に、両方の場所からの出力を確認します。

  1. シェルからの出力
  2. Apache サーバーを介して実行中のスクリプトからの出力

pig が書き込もうとしているログ ファイルのパーミッションも確認してください。これは、この問題を解決するのに役立ちます。

于 2013-09-06T16:17:43.213 に答える