We noticed there are old many ncmconfigbucket files in the $SPECROOT/tomcat/mysql/data/reporting directory on the Spectrum Report Manager (SRM) system.
We ran the following mysql query on the SRM system to see if there were any ncm bucket tables where the destroy time was null:
select * from bucketactivitylog where destroy_time is null and bucket_table_name like "ncm%";
However, the response was an empty set.
Can these ncmconfigbucket file be removed?
Version: Any
Component: Spectrum Report Manager (SRM)
We verified there were no unprocessed ncmconfigbucket files by running the following command:
select * from bucketactivitylog where destroy_time is null and bucket_table_name like "ncm%";
After verifying an ncmconfigbucket file has been processed, you can drop the table by doing the following:
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<PASSWD> reporting -A
drop table <NCM>;
This will need to be done for all the ncmconfigbucket file in the $SPECROOT/mysql/data/reporting directory that have been verified to be processed.
If there are too many ncmconfigbucket files to process one at a time, the following script run from the $SPECROOT/mysql/bin directory will find all ncmconfigbucket files in the $SPECROOT/mysql/data/reporting directory and drop the table for each. You will need to replace <PASSWD> with the mysql root password for your environment.
#!/bin/sh
for NCM in `ls -al ../data/reporting/ncmconfigbucket* | awk '{ print $9 }' | awk -F/ '{ print $4}' | awk -F. '{print $1}'`
do
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<PASSWD> reporting -e "drop table $NCM;"
done