从昨天开始,我试图弄清楚为什么我的表创建不起作用。由于我无法将Impala链接到我的Hbase,所以无法在我的Twitter流上查询:/
我需要像Hive这样的特殊JAR作为SerDe属性吗?
这是我的命令:
创建外部表HB_IMPALA_TWEETS(id int,id_str字符串,文本字符串,timestamp的created_at时间戳,geo_latitude双精度,geo_longitude双精度,user_screen_name字符串,user_location字符串,user_followers_count字符串,user_profile_image_url字符串),
存储在'org.apache.hadoop'中。
WITH SERDEPROPERTIES(“ hbase.columns.mapping” =“:键,tweet:id_str,tweet:text,tweet:created_at,tweet:geo_latitude,tweet:geo_longitude,用户:screen_name,user:location,user:followers_count,user:profile_image_url “)TBLPROPERTIES(” hbase.table.name“ =” tweets“);
但是我遇到了一个错误:受其支持:
查询:创建外部表HB_IMPALA_TWEETS(id int,id_str字符串,文本字符串,created_at时间戳,geo_latitude double,geo_longitude double,user_screen_name字符串,user_location字符串,user_followers_count字符串,user_profile_image_url字符串)通过'org.apache.hadoop存储。 HBaseStorageHandler'WITH SERDEPROPERTIES(“ hbase.columns.mapping” =“:键,tweet:id_str,tweet:text,tweet:created_at,tweet:geo_latitude,tweet:geo_longitude,用户:screen_name,user:location,user:followers_count,user :profile_image_url“)TBLPROPERTIES(” hbase.table.name“ =” tweets“)错误:AnalysisException:第1行的语法错误:... image_url字符串)由'org.apache.hadoop.hive.h ...存储
遇到:BY
预期:AS
引起原因:异常:语法错误
有关信息,我关注了此页面:https : //github.com/AronMacDonald/Twitter_Hbase_Impala/blob/master/README.md
感谢您的帮助:)
好吧,似乎Impala仍不支持SerDe(序列化/反序列化)。
“您使用Hive外壳在Impala端创建表,因为Impala CREATE TABLE语句当前不支持自定义SerDes和这些表所需的一些其他语法:您可以使用STORED BY'org.apache将其指定为HBase表。 Hive CREATE TABLE语句上的.hadoop.hive.hbase.HBaseStorageHandler'子句。”
因此,只需在hive外壳或hive hive上运行命令,然后在impala中键入“ invalidate metadata”,然后您就可以看到带有“ show table”的表。
因此,对于这一部分,问题似乎已解决。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句