我刚刚构建了Hue-4.1.0,它能够通过jdbc执行Presto sql。这是我的hue-presto配置:
[notebook]
[[interpreters]]
[[[presto-jdbc]]]
name=Presto-jdbc
interface=jdbc
options='{"url": "jdbc:presto://localhost:18080/platform_data/platform_data", "driver": "com.facebook.presto.jdbc.PrestoDriver", "user": "analysis"}'
# Doesn't work either
# options='{"url": "jdbc:presto://localhost:18080/platform_data/", "driver": "com.facebook.presto.jdbc.PrestoDriver", "user": "analysis"}'
查询Presto没问题但是当我点击刷新按钮时看到图片reflash,我得到了这个:
调用o237.execute时发生错误。 :java.sql.SQLException:查询失败(#20180605_105344_00147_ugf87):第1:26行:com.facebook.presto上的com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1798)中不存在模式dbc。 jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1742)在com.facebook.presto.jdbc.PrestoResultSet。(PrestoResultSet.java:118)在com.facebook.presto.jdbc.PrestoStatement.internalExecute(PrestoStatement.java:246)在来自java.lang的sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)的sun.reflect.GeneratedMethodAccessor4.invoke(未知来源)的com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:225)。反射.Method.invoke(Method.java:497)py4j.reflection.MethodInvoke.invoke(MethodInvoker.java:231)py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:381)at py4j.Gateway.invoke(Gateway .java:259)在py4j.commands.CallCommand.execute的py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133) CallCommand.java:79)at py4j.GatewayConnection.run(GatewayConnection.java:209)at java.lang.Thread.run(Thread.java:745)引起:com.facebook.presto.sql.analyzer.SemanticException:line 1:26:com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.visitTable(StatementAnalyzer.java:845)com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.visitTable(StatementAnalyzer)中不存在模式dbc .java:258)com.facebook.presto.sql.tree.Table.accept(Table.java:53)at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)at com。 facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.process(StatementAnalyzer.java:270)at com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.analyzeFrom(StatementAnalyzer.java:1919)at com.facebook.presto。 sql.analyzer.StatementAnalyzer $ Visitor.visitQuerySpecification(StatementAnalyzer.java:957)at com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.visitQuerySpecification(StatementAnalyzer.java:258)at com.facebook.pr esto.sql.tree.QuerySpecification.accept(QuerySpecification.java:127)位于com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)的com.facebook.presto.sql.analyzer.StatementAnalyzer $访客进程(StatementAnalyzer.java:270)位于com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.process(StatementAnalyzer.java:280)com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.visitQuery( StatementAnalyzer.java:676)com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.visitQuery(StatementAnalyzer.java:258)at com.facebook.presto.sql.tree.Query.accept(Query.java:94) at com.facebook.prestitor.sata.tree.AstVisitor.process(AstVisitor.java:27)at com.facebook.presto.sql.analyzer.StatementAnalyzer $ Visitor.process(StatementAnalyzer.java:270)at com.facebook.presto .sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:244)at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:72)at com.facebook.presto.sql.analyzer.Analyzer.analyze (Analyzer.java:64)a牛逼com.facebook.presto.execution.SqlQueryExecution(SqlQueryExecution.java:169)在com.facebook.presto.execution.SqlQueryExecution $ SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:660)在com.facebook.presto.execution.SqlQueryExecution $ SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:582)在com.facebook.presto.execution.SqlQueryManager.createQuery(SqlQueryManager.java:417)在com.facebook.presto.server.protocol.Query。(Query.java:186)在com.facebook.presto.server.protocol.Query.create(Query.java:153)位于sun.reflect.GeneratedMethodAccessor674.invoke的com.facebook.presto.server.protocol.StatementResource.createQuery(StatementResource.java:144)来源不明)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在java.lang.reflect.Method.invoke(Method.java:498)在org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory。 lambda $ static $ 0(ResourceMethodInvocationHandlerFactory.java:76)at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher $ 1.run(AbstractJavaResourceMethodDispatcher.java:148)org.glassfish的org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)位于org.glassfish.jersey的org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)的.jersey.server.model.internal.JavaResourceMethodDispatcherProvider $ VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:183)位于org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)的org.glassfish.jersey.server.model.ResourceMethodInvoker.apply中的.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493) (ResourceMethodInvoker.java:104)org.glassfish.jersey.server.ServerRuntime $ 1.run(ServerRuntime.java:277)org.glassfish.jersey.internal.Errors $ 1.call(Errors.java:272)at at org.glassfish.jersey.internal.Errors $ 1.call(Errors.java:268)org.glassfish.jersey.internal.Errors.process(Errors.java:316)org.glassfish.jersey.internal.Errors.process (Errors.java:298)org.glassfish.jersey.internal.Errors.process(Errors.java:268)org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)at org。 glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)在org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)在org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent的。 java:416)org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)org.glassfish.jersey.servlet位于org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)的.ServletContainer.service(ServletContainer.java:342) org.ecli pse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1655)位于org.eclipse.jetty.servlet.ServletHandler的com.facebook.presto.server.security.AuthenticationFilter.doFilter(AuthenticationFilter.java:69) CachedChain.doFilter(ServletHandler.java:1642)在io.airlift.http.server.TraceTokenFilter.doFilter(TraceTokenFilter.java:64)org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)在io.airlift.http.server.TimingFilter.doFilter(TimingFilter.java:52)在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)在org.eclipse.jetty.servlet.ServletHandler .doHandle(ServletHandler.java:533)位于org.eclipse.jetty.handle(ScopedHandler.java:146)org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java)的org.eclipse.jetty.server.handler.ScopedHandler.handle :674)org.eclipse.jetty.handle(HandlerWrapper.java:132)atg.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.j) AVA:257)在org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)在org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)在org.eclipse位于org.eclipse.jetty.server.cope.hand.ContextHandler.doScope的org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)的.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) (ContextHandler.java:1155)在org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)在org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)在Org.eclipse.jetty.server.handle.StatisticsHandler.handle(StatisticsHandler.java:169)位于org.eclipse.jetty.server的org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:61)。 handler.HandlerWrapper.handle(HandlerWrapper.java:132)在org.eclipse.jetty.server.Server.handle(Server.java:531)在org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)在org.eclipse.jetty.server.H ttpConnection.onFillable(HttpConnection.java:260)位于org.eclipse.jetty上的org.eclipse.jetty.io.AbstractConnection $ ReadCallback.succeeded(AbstractConnection.java:281)(FillInterest.java:102)在Org.eclipse.jetty上的org.eclipse.jetty.ChannelEndPoint $ 2.run(ChannelEndPoint.java:118)org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)。 util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)在org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)在org.eclipse.jetty.util.thread。 strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)在org.eclipse.jetty.util.thread.ReservedThreadExecutor $ ReservedThread.run(ReservedThreadExecutor.java:366)在org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( QueuedThreadPool.java:755)在java.lang.Thread.run(Thread.java:748)的org.eclipse.jetty.util.thread.QueuedThreadPool $ 2.run(QueuedThreadPool.java:673)
有些人也遇到了同样的问题: https://community.cloudera.com/t5/Web-UI-Hue-Beeswax/HUE-and-Presto-Integration-Error-on-Page-Load/td-p/62353
我希望得到你的帮助!
答案 0 :(得分:0)