This topic provides answers to some commonly asked questions about metadata management in EMR.
- What do I do if an error indicating that the oss://yourbucket/***/***/*** or hdfs://yourhost:9000/***/***/*** directory is not found is reported?
- What do I do if the error "java.lang.IllegalArgumentException: java.net.UnknownHostException: *****" is reported when I delete a Hive database?
- How do I log on to the built-in MySQL service of a cluster?
What do I do if an error indicating that the oss://yourbucket/***/***/*** or hdfs://yourhost:9000/***/***/*** directory is not found is reported?
Cause: The data of a table in OSS has been deleted or moved to another path, but the schema of the table still exists.
alter table test set location 'oss://your_bucket/your_folder'
What do I do if the error "java.lang.IllegalArgumentException: java.net.UnknownHostException: *****" is reported when I delete a Hive database?
Cause: A Hive database is created in HDFS of a cluster, and it is not deleted when the cluster is released. As a result, the database cannot be accessed after another cluster is created. When you release a cluster, you must delete the databases and tables that you manually created for the cluster from HDFS.
- Log on to the master node of the cluster. Find the URL, username, and password of
the Hive database in the $HIVE_CONF_DIR/hivemetastore-site.xml file.
javax.jdo.option.ConnectionUserName // The username of the database javax.jdo.option.ConnectionPassword // The password of the database javax.jdo.option.ConnectionURL // The database access URL and database name
- On the master node of the cluster, enter the following command and enter the password
as prompted to log on to the created Hive database:
mysql -h ${DBConnectionURL} -u ${ConnectionUserName} -p
- Change the value of the DB_LOCATION_URI parameter to an existing OSS path in the region.
How do I log on to the built-in MySQL service of a cluster?
- Log on to the master node of your cluster in SSH mode.
For more information, see Log on to a cluster.
- Run the following command to log on to the built-in MySQL:
mysql -uroot -pEMRroot1234
The username that is used to log on to the built-in MySQL is root and the password is EMRroot1234.