无法在Apache Zeppelin上运行 pig 脚本

2020年8月5日 24点热度 0条评论

> org.apache.pig.backend.executionengine.ExecException: ERROR 4010:
> Cannot find hadoop configurations in classpath (neither
> hadoop-site.xml nor core-site.xml was found in the classpath). If you
> plan to use local mode, please put -x local option in command line at
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.getExecConf(HExecutionEngine.java:157)
> at
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.init(HExecutionEngine.java:194)
> at
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.init(HExecutionEngine.java:111)
> at org.apache.pig.impl.PigContext.connect(PigContext.java:310) at
> org.apache.pig.PigServer.<init>(PigServer.java:232) at
> org.apache.pig.PigServer.<init>(PigServer.java:220) at
> org.apache.pig.PigServer.<init>(PigServer.java:193) at
> org.apache.pig.PigServer.<init>(PigServer.java:185) at
> org.apache.zeppelin.pig.PigInterpreter.open(PigInterpreter.java:61) at
> org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69)
> at
> org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:617)
> at org.apache.zeppelin.scheduler.Job.run(Job.java:188) at
> org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:140)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)

我尝试在apache Zeppelin上运行Pig脚本,但它给了我这个错误。我检查了所有配置和设置,但无法解决此问题。

解决方案如下:

请在此处检查文档。 https://zeppelin.apache.org/docs/0.8.0/interpreter/pig.html
您很可能将执行模式设置为mapreduce,但未配置HADOOP_CONF_DIR