【发布时间】:2016-04-26 13:57:21
【问题描述】:
我尝试将查询连接到远程 postgres 数据库 -
%psql.sql
select * from my_schema.my_table limit 5
我已经更新了解释器的值,但我仍然收到以下错误 -
java.lang.NullPointerException 在 org.apache.zeppelin.postgresql.PostgreSqlInterpreter.executeSql(PostgreSqlInterpreter.java:201) 在 org.apache.zeppelin.postgresql.PostgreSqlInterpreter.interpret(PostgreSqlInterpreter.java:288) 在 org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57) 在 org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93) 在 org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:302) 在 org.apache.zeppelin.scheduler.Job.run(Job.java:171) 在 org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139) 在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 在 java.util.concurrent.FutureTask.run(FutureTask.java:266) 在 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) 在 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)
我尝试从 shell 访问但出现错误 -
进程因错误退出:2(退出值:2)
我怀疑这与它试图获取密码的事实有关。但是,相同的命令 + 密码在我的终端上有效。
另一个相关问题是解释器中的属性不包含数据库名称。我将其添加为postgresql.database,但我不确定是否使用了此属性。
如果您知道如何解决,请告诉我,谢谢!
【问题讨论】:
-
以下答案有帮助吗?如果不是,请将详细信息添加为 cmets
-
这很有帮助,因此我投了赞成票
-
你找到解决这个问题的方法了吗?
标签: postgresql apache-spark sh apache-zeppelin