Thank you for your reply , I failed to find where do spark or phoenix save the log, and I also tried to change log4j.evel in $SPARK_HOME/conf/log4j.properties and $PHOENIX_HOME/bin/config, unfortunately it didn't work also, can you help me more on how to find out the lost stacktrace info?
2016-11-24 1:03 GMT+08:00 Josh Elser <josh.el...@gmail.com>: > Hi Dequn, > > There should be more to this stacktrace than you provided as the actual > cause is not included. Can you please include the entire stacktrace? If you > are not seeing this client-side, please check the Phoenix Query Server log > file to see if there is more there. > > Dequn Zhang wrote: > >> Hello, since spark 2.x can not use Phoenix Spark Interpreter to load >> data, so I want to use JDBC, but when I want to get a *thin connection*, >> I got the following Error info while using *direct connection is ok* , >> >> I ran it in spark-shell, scala 2.11.8, so can anyone give a solution? >> >> Phoenix : 4.8.1-HBase-1.2 >> >> scala> >> val jdbcDf = spark.read >> .format("jdbc") >> .option("driver","org.apache.phoenix.queryserver.client.Driver") >> .option("url","jdbc:phoenix:thin:url=http://192.168.6.131:87 >> 65;serialization=PROTOBUF") >> .option("dbtable","imos") >> .load() >> >> java.sql.SQLException: While closing connection >> at >> org.apache.calcite.avatica.Helper.createException(Helper.java:39) >> at >> org.apache.calcite.avatica.AvaticaConnection.close(AvaticaCo >> nnection.java:156) >> at >> org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$. >> resolveTable(JDBCRDD.scala:167) >> at >> org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation >> .<init>(JDBCRelation.scala:117) >> at >> org.apache.spark.sql.execution.datasources.jdbc.JdbcRelation >> Provider.createRelation(JdbcRelationProvider.scala:53) >> at >> org.apache.spark.sql.execution.datasources.DataSource. >> resolveRelation(DataSource.scala:345) >> at >> org.apache.spark.sql.DataFrameReader.load(DataFrameReader. >> scala:149) >> at >> org.apache.spark.sql.DataFrameReader.load(DataFrameReader. >> scala:122) >> ... 53 elided >> Caused by: java.lang.RuntimeException: response code 500 >> at >> org.apache.calcite.avatica.remote.RemoteService.apply(Remote >> Service.java:45) >> at >> org.apache.calcite.avatica.remote.JsonService.apply(JsonServ >> ice.java:227) >> at >> org.apache.calcite.avatica.remote.RemoteMeta.closeConnection >> (RemoteMeta.java:78) >> at >> org.apache.calcite.avatica.AvaticaConnection.close(AvaticaCo >> nnection.java:153) >> ... 59 more >> >>