In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what to do if the order of HBase fields in Impala query is incorrect". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Exception description
Create a table associated with HBase in Hive according to the official document, and then query it with Impala in Hue. The order of the fields in the query results is not consistent with the order of table creation in Hive. The fields queried by Impala in Hue are sorted alphabetically.
Problem reappearance and explanation
Create a table to associate with HBase in Hive
CREATE EXTERNAL TABLE `hbasestringids` (|
| | `id`string COMMENT 'from deserializer', |
| | `bool_ col`boolean COMMENT 'from deserializer', |
| | `tinyint_ col`tinyint COMMENT 'from deserializer', |
| | `smallint_ col`smallint COMMENT 'from deserializer', |
| | `int_ col`int COMMENT 'from deserializer', |
| | `bigint_ col`bigint COMMENT 'from deserializer', |
| | `float_ col`float COMMENT 'from deserializer', |
| | `double_ col`double COMMENT 'from deserializer', |
| | `date_string_ col`string COMMENT 'from deserializer', |
| | `string_ col`string COMMENT 'from deserializer', |
| | `timestamp_ col`timestamp COMMENT 'from deserializer') |
| | ROW FORMAT SERDE |
| | 'org.apache.hadoop.hive.hbase.HBaseSerDe' |
| | STORED BY |
| | 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' |
| | WITH SERDEPROPERTIES (| |
| | 'hbase.columns.mapping'=':key,boolsCF:bool_col,intsCF:tinyint_col,intsCF:smallint_col,intsCF:int_col,intsCF:bigint_col,floatsCF:float_col,floatsCF:double_col,stringsCF:date_string_col,stringsCF:string_col,stringsCF:timestamp_col', |
| | 'serialization.format'='1') |
| | TBLPROPERTIES (| |
| | 'hbase.table.name'='hbasealltypessmall', |
| 'transient_lastDdlTime'='1585032011')
The order of table creation in Hive is as follows
The order of table fields queried in Impala-shell is as follows, which is not consistent with the order of table creation in Hive.
The order of the table fields queried in Hue is as follows, which is consistent with the query results in Impala-shell, but not consistent with the order of table creation in Hive.
It has been confirmed that this problem is a bug in Impala and is currently being repaired. At present, there is a Jira tracking this problem, and the link is as follows. If you want to keep the order of the fields, you can write them in the order you want after select.
This is the end of the content of "what if the abnormal order of Impala query HBase table fields is incorrect". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.