1
嘗試了一個處理hbase中的表的示例。java.io.IOException:java.lang.ClassCastException:org.apache.hadoop.hbase.client.Result無法轉換爲org.apache.hadoop.io.Writable
創建外部TABLE命令是成功的,但select語句給出了一個類轉換異常
ENV: 蜂巢0.12.0,HBase的0.96.1,Hadoop的2.2,Ubuntu的12.04虛擬框
hive> SHOW TABLES;
OK
hbatablese_myhive
Time taken: 0.309 seconds, Fetched: 1 row(s)
hive> SELECT * FROM hbatablese_myhive;
OK
**失敗,出現異常
java.io.IOException:java.lang.ClassCastException: org.apache.hadoop.hbase.client.Result cannot be cast to org.apache.hadoop.io.Writable**
Time taken: 1.179 seconds
hive>
The same table on HBASE console:
hbase(main):002:0> scan 'myhive'
ROW COLUMN+CELL
row1 column=ratings:userid, timestamp=1392886585074, value=user1
row2 column=ratings:userid, timestamp=1392886606457, value=user2
2 row(s) in 0.0520 seconds