0

我的机器上有 apache Hive - 0.12.0 和 hadoop - 1.2.1 版本。并将 mysql 用于 hive 元存储。

现在,当我为 Metastore 测试触发 show tables 时,它只显示 20 行/表。

// My Environment
mysql> use metastore_db
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_metastore_db    |
+---------------------------+
| BUCKETING_COLS            | 
| CDS                       | 
| COLUMNS_V2                | 
| DATABASE_PARAMS           | 
| DBS                       | 
| PARTITION_KEYS            | 
| SDS                       | 
| SD_PARAMS                 | 
| SEQUENCE_TABLE            | 
| SERDES                    | 
| SERDE_PARAMS              | 
| SKEWED_COL_NAMES          | 
| SKEWED_COL_VALUE_LOC_MAP  | 
| SKEWED_STRING_LIST        | 
| SKEWED_STRING_LIST_VALUES | 
| SKEWED_VALUES             | 
| SORT_COLS                 | 
| TABLE_PARAMS              | 
| TBLS                      | 
| VERSION                   | 
+---------------------------+
20 rows in set (0.06 sec)

为什么看不到下面的所有表格。我需要为此使用任何其他配置单元版本吗?请建议。

// Need to see all these tables
mysql> show tables;
+ --------------------------- +
| Tables_in_hive_demo  |
+ --------------------------- +
| BUCKETING_COLS |
| CDS |
| COLUMNS_V2 |
| DATABASE_PARAMS |
| DBS |
| DB_PRIVS |
| GLOBAL_PRIVS |
| IDXS |
| INDEX_PARAMS |
| NUCLEUS_TABLES |
| PARTITIONS |
| PARTITION_EVENTS |
| PARTITION_KEYS |
| PARTITION_KEY_VALS |
| PARTITION_PARAMS |
| PART_COL_PRIVS |
| PART_COL_STATS |
| PART_PRIVS |
| ROLES |
| ROLE_MAP |
| SDS |
| SD_PARAMS |
| SEQUENCE_TABLE |
| SERDES |
| SERDE_PARAMS |
| SKEWED_COL_NAMES |
| SKEWED_COL_VALUE_LOC_MAP |
| SKEWED_STRING_LIST |
| SKEWED_STRING_LIST_VALUES |
| SKEWED_VALUES |
| SORT_COLS |
| TABLE_PARAMS |
| TAB_COL_STATS |
| TBLS |
| TBL_COL_PRIVS |
| TBL_PRIVS |
| TYPES |
| TYPE_FIELDS |
| VERSION |
+ --------------------------- +
39 rowsinset (0.00 sec) 
4

1 回答 1

0

尝试通过可用的 sql 脚本(在您的情况下为 mysql)升级配置单元模式。

mysql> use metastore_db
Database changed

mysql> SOURCE $HIVE_HOME/scripts/metastore/upgrade/mysql/hive-schema-0.12.0.mysql.sql;

mysql> CREATE USER 'dbuser'@'%' IDENTIFIED BY 'dbpassword'; 

mysql> GRANT all on *.* to 'dbuser'@localhost identified by 'dbpassword';

mysql> flush privileges;

现在重新查询您的表。它现在应该显示所有表格。

mysql> show tables;
于 2015-07-12T14:48:23.117 回答