This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DELETE A TABLE IN THE HIVE METASTORE | |
# BE CAREFUL! BACKUP THE DB BEFORE PROCEEDING! | |
set @table_name = ''; | |
SELECT @tbl_id := TBl_ID FROM TBLS WHERE TBL_NAME = @table_name; | |
-- Delete partition key vals | |
DELETE pvk | |
FROM PARTITION_KEY_VALS pvk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DEPLOYMENT=$1 | |
for p in $(kubectl get pods | grep ^${DEPLOYMENT}- | cut -f 1 -d ' '); do | |
echo --------------------------- | |
echo $p | |
echo --------------------------- | |
kubectl logs $p | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are the steps that you need to follow in order to migrate scm database from PostgreSQL to MySQL - let me know if you need assistance or have any further questions. | |
1. Stop all cluster services including the Cloudera Manager monitoring services and Agents on all hosts, using the Cloudera Manager UI. | |
2. Invoke the API call to /api/v4/cm/deployment. Example that directs the resulting output to a file for later use: | |
$ curl -v -u admin:password http://your_cloudera_manager_host:7180/api/v4/cm/deployment > path/to/file | |
Note: It is critical this file be retained and protected as it will be needed to re-import the functional configuration into the new database. | |
3. Take a fail-safe database backup from the embedded postgres database or make a tarball (or other copy) of the /var/lib/cloudera-scm-server-db/ directory to a safe location. Either will accomplish the needed outcome, just pick the most convenient for your environment. And backup contents of the directory /etc/cloudera-scm-server/* | |
4. On the serv |