How to use mapper to connection hbase

68 views
Skip to first unread message

严伟光

unread,
Aug 22, 2015, 10:58:36 PM8/22/15
to lif...@googlegroups.com
Hi everyone:
 I want to use lift mapper to connection hbase . the hbase use phoenix to supper SQL.
 Does anyone have example to complete it?
 
I try it but failure


ERROR db.StandardDBVendor: Unable to get database connection. url=jdbc:phoenix:x.x.x.x:xxx, user=user@TS-BHTEST-01
java.lang.NoSuchMethodError: org.apache.hadoop.security.UserGroupInformation.getCurrentUser()Lorg/apache/hadoop/security/UserGroupInformation;
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:291)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:287)
    at org.apache.hadoop.hbase.security.User.getCurrent(User.java:189)
    at org.apache.hadoop.hbase.security.UserProvider.getCurrent(UserProvider.java:89)
    at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:352)
    at org.apache.phoenix.query.HConnectionFactory$HConnectionFactoryImpl.createConnection(HConnectionFactory.java:47)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:286)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:171)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1881)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1860)
    at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1860)
    at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
    at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:131)
    at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
    at java.sql.DriverManager.getConnection(DriverManager.java:571)
    at java.sql.DriverManager.getConnection(DriverManager.java:215)
    at net.liftweb.db.StandardDBVendor$$anonfun$createOne$4.apply(DB.scala:1143)
    at net.liftweb.db.StandardDBVendor$$anonfun$createOne$4.apply(DB.scala:1143)
    at net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:46)
    at net.liftweb.util.Helpers$.tryo(Helpers.scala:34)
    at net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:96)
    at net.liftweb.util.Helpers$.tryo(Helpers.scala:34)
    at net.liftweb.db.StandardDBVendor.createOne(DB.scala:1143)
    at net.liftweb.db.ProtoDBVendor$class.newConnection(DB.scala:1196)
    at net.liftweb.db.StandardDBVendor.newConnection(DB.scala:1131)
    at net.liftweb.db.DB$$anonfun$cmSuperConnection$1$1.apply(DB.scala:171)
    at net.liftweb.db.DB$$anonfun$cmSuperConnection$1$1.apply(DB.scala:171)
    at net.liftweb.common.EmptyBox.or(Box.scala:646)
    at net.liftweb.db.DB$class.cmSuperConnection$1(DB.scala:171)
    at net.liftweb.db.DB$$anonfun$9.apply(DB.scala:182)
    at net.liftweb.db.DB$$anonfun$9.apply(DB.scala:181)
    at net.liftweb.common.Full.flatMap(Box.scala:555)
    at net.liftweb.db.DB$class.newConnection(DB.scala:181)
    at net.liftweb.db.DB$class.getConnection(DB.scala:295)
    at net.liftweb.db.DB$class.use(DB.scala:690)
    at net.liftweb.db.DB$$anon$1.use(DB.scala:40)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:91)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:57)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:54)
    at com.xxx.dynamicreport.server.ScalaMain$delayedInit$body.apply(ScalaMain.scala:22)
    at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
    at scala.App$class.main(App.scala:71)
    at com.xxx.dynamicreport.server.ScalaMain$.main(ScalaMain.scala:11)
    at com.xxx.dynamicreport.server.ScalaMain.main(ScalaMain.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Exception in thread "main" java.lang.NullPointerException: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name
    at net.liftweb.db.DB$$anonfun$newConnection$2.apply(DB.scala:190)
    at net.liftweb.db.DB$$anonfun$newConnection$2.apply(DB.scala:190)
    at net.liftweb.common.EmptyBox.openOr(Box.scala:644)
    at net.liftweb.db.DB$class.newConnection(DB.scala:189)
    at net.liftweb.db.DB$class.getConnection(DB.scala:295)
    at net.liftweb.db.DB$class.use(DB.scala:690)
    at net.liftweb.db.DB$$anon$1.use(DB.scala:40)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:91)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:57)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:54)
    at com.xxx.dynamicreport.server.ScalaMain$delayedInit$body.apply(ScalaMain.scala:22)
    at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
    at scala.App$class.main(App.scala:71)
    at com.xxx.dynamicreport.server.ScalaMain$.main(ScalaMain.scala:11)
    at com.xxx.dynamicreport.server.ScalaMain.main(ScalaMain.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


Reply all
Reply to author
Forward
0 new messages