2016-07-25 4 views
0

Squirrel SQL을 통해 HBase 테이블을 쿼리하려고합니다. 다음Squirrel SQL에서 HBase/Hive 테이블 쿼리 - 저장소로드 중 오류 발생 handler.org.apache.hadoop.hive.hbase.HBaseStorageHandler

create external table tweets_hbase(key string, value string) 
stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
with serdeproperties ("hbase.columns.mapping" = ":key,data:tweet_text") 
tblproperties ("hbase.table.name" = "tweets_hbase") 

같은 하이브 외부 테이블을 생성 난 내가 다람쥐 SQL을 통해 조회 할 때 그러나, 내가 로딩에 오류가 명령 줄 HIVE

hive> select * from tweets_hbase; 
OK 
20160725001730109  {"createdat":"25-Jul-2016 12:17:03","tweet_date":"2016-07-25","text":"私のランドールスゴビ:) \n#abyssrium\nhts:t.co/NcKtQi9lzm ht/t.co/WNgQIxLU05","user":"uw_kyaaaan","uniqueid":1469420239464,"searchtag":"Apple"} 
20160725001730266  {"createdat":"25-Jul-2016 12:17:03","tweet_date":"2016-07-25","text":"2016年7月24日\n8422 Steps\n移動距離 6.485 km\n消費カロリー 467.6 kcal\n\n#M7POPOPO ht/t.co/eFathZXTHD","user":"matsuwichi","uniqueid":1469420239465,"searchtag":"Apple"} 
20160725001730308  {"createdat":"25-Jul-2016 12:17:03","tweet_date":"2016-07-25","text":"RT @JBCrewdotcom: Don't forget to leave a nice review for #Coldwater after purchasing! \niTunes: t.co/p5YKRwPKNw\nGoogle Play: ht\u2026","user":"2016OLLGAndUGRL","uniqueid":1469420239466,"searchtag":"Apple"} 

을 통해 조회 할 수 있어요. 필요한 JAR 파일이 Extra Class Path에 추가되었습니다.

  1. 하이브 HBase를 핸들러-1.1.0.jar
  2. HBase를 클라이언트-1.1.5.jar
  3. HBase를-공통 1.1.5.jar
  4. HBase를-protocal- 1.1.5.jar
  5. HBase를 서버-1.1.5.jar
  6. -1.1.1-standalone.jar 하이브 - JDBC

도와주세요

java.sql.SQLException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.apache.hadoop.hive.hbase.HBaseStorageHandler 
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:296) 
at net.sourceforge.squirrel_sql.client.session.StatementWrapper.execute(StatementWrapper.java:165) 
at net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.processQuery(SQLExecuterTask.java:369) 
at net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.run(SQLExecuterTask.java:212) 
at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82) 
at java.lang.Thread.run(Unknown Source) 

답변

1

나는 이것을 직접 해결했습니다. 다음은 내가해야 할 일을했을 것입니다 :

    --jars 옵션

을 함께 다음 항아리로 시작 thriftServer 시작하는 동안 1.2.2

  • 에 HBase를 업그레이드
  • ./start-thriftserver .sh --hiveconf hive.server2.thrift.port = 10001 - hiveconf hive.server2.thrift.bind.host = xxx.xxx.xxx.xxx - hiveconf spark.cores.max = 2 - 마스터 스파크 : //xxx.xxx.xxx.xxx:7077 --name ThriftServer - jars 파일 : ///home/hadoop/software/apache-hive-1.2.1-bin/ lib/hive-hbase-handler-1.2.1.jar, 파일 : ///home/hadoop/software/hbase-1.2.2/lib/hbase-common-1.2.2.jar,file : /// home/hadoop/software/hbase-1.2.2/lib/hbase-protocol-1.2.2.jar, 파일 : ///home/hadoop/software/hbase-1.2.2/lib/hbase-client-1.2.2.jar , 파일 : ///home/hadoop/software/hbase-1.2.2/lib/guava-12.0.1.jar,file : ///home/hadoop/software/hbase-1.2.2/lib/hbase-server -1.2.2.jar, file : ///home/hadoop/software/hbase-1.2.2/lib/htrace-core-3.1.0-incubating.jar,file : /// home/hadoop/software/hbase -1.2.2/lib/metrics-core-2.2.0.jar