Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Who agreed with this solution

avatar
Contributor

Hello All,

 

I went to the mysql command line and used schema create/update  -  able to get the metastore working & also able to get the tables form hive as well as impala.

 

database :mysql 

datastore database: hive 

 

mysql> source hive-schema-0.13.0.mysql.sql;

mysql> use hive
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> source upgrade-0.10.0-to-0.11.0.mysql.sql
+--------------------------------------------------+
| |
+--------------------------------------------------+
| Upgrading MetaStore schema from 0.10.0 to 0.11.0 |
+--------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

+-----------------------------------------------------------+
| |
+-----------------------------------------------------------+
| Finished upgrading MetaStore schema from 0.10.0 to 0.11.0 |
+-----------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> source upgrade-0.11.0-to-0.12.0.mysql.sql
+--------------------------------------------------+
| |
+--------------------------------------------------+
| Upgrading MetaStore schema from 0.11.0 to 0.12.0 |
+--------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

+---------------------------------------------------+
| |
+---------------------------------------------------+
| < HIVE-3255 Master Key and Delegation Token DDL > |
+---------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

+-----------------------------------------------------------+
| |
+-----------------------------------------------------------+
| < HIVE-3764 Support metastore version consistency check > |
+-----------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

ERROR 1062 (23000): Duplicate entry '1' for key 1
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

+-----------------------------------------------------------+
| |
+-----------------------------------------------------------+
| Finished upgrading MetaStore schema from 0.11.0 to 0.12.0 |
+-----------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> source upgrade-0.12.0-to-0.13.0.mysql.sql
+--------------------------------------------------+
| |
+--------------------------------------------------+
| Upgrading MetaStore schema from 0.12.0 to 0.13.0 |
+--------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

+-----------------------------------------------------------------------+
| |
+-----------------------------------------------------------------------+
| < HIVE-5700 enforce single date format for partition column storage > |
+-----------------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0

+--------------------------------------------+
| |
+--------------------------------------------+
| < HIVE-6386: Add owner filed to database > |
+--------------------------------------------+
1 row in set, 1 warning (0.00 sec)

ERROR 1060 (42S21): Duplicate column name 'OWNER_NAME'
ERROR 1060 (42S21): Duplicate column name 'OWNER_TYPE'
+---------------------------------------------------------------------------------------------+
| |
+---------------------------------------------------------------------------------------------+
| <HIVE-6458 Add schema upgrade scripts for metastore changes related to permanent functions> |
+---------------------------------------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

+----------------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------------+
| <HIVE-6757 Remove deprecated parquet classes from outside of org.apache package> |
+----------------------------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)
Rows matched: 0 Changed: 0 Warnings: 0

Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0

Query OK, 0 rows affected (0.01 sec)
Rows matched: 0 Changed: 0 Warnings: 0

ERROR 1050 (42S01): Table 'TXNS' already exists
ERROR 1050 (42S01): Table 'TXN_COMPONENTS' already exists
ERROR 1050 (42S01): Table 'COMPLETED_TXN_COMPONENTS' already exists
ERROR 1050 (42S01): Table 'NEXT_TXN_ID' already exists
Query OK, 1 row affected (0.00 sec)

ERROR 1050 (42S01): Table 'HIVE_LOCKS' already exists
ERROR 1061 (42000): Duplicate key name 'HL_TXNID_IDX'
ERROR 1050 (42S01): Table 'NEXT_LOCK_ID' already exists
Query OK, 1 row affected (0.00 sec)

ERROR 1050 (42S01): Table 'COMPACTION_QUEUE' already exists
ERROR 1050 (42S01): Table 'NEXT_COMPACTION_QUEUE_ID' already exists
Query OK, 1 row affected (0.00 sec)

Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

+-----------------------------------------------------------+
| |
+-----------------------------------------------------------+
| Finished upgrading MetaStore schema from 0.12.0 to 0.13.0 |
+-----------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql>

 

 

View solution in original post

Who agreed with this solution