Guest User

cloudera manager patch

a guest
Mar 20th, 2014
356
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. patch for 00007_cmon_schema.mysql.ddl:
  2.  
  3. --- 00007_cmon_schema.mysql.ddl 2014-03-20 13:13:55.797696430 -0700
  4. +++ 00007_cmon_schema.mysql.ddl.new 2014-03-20 13:13:36.252976729 -0700
  5. @@ -22,7 +22,9 @@
  6.  
  7. -- Tables used for partition have YYYY_MM_DD suffix'ed to them, so we need to
  8. -- rename them too so that overall name doesn't exceed 30 chars.
  9. -com.cloudera.cmon.firehose.db.ShortenMySQLTableNames
  10. +/* PRH */
  11. +-- com.cloudera.cmon.firehose.db.ShortenMySQLTableNames
  12. +/* PRH */
  13.  
  14. -- Rename all the tables having more than 30 characters to bring them within
  15. -- limit. Then to maintain consistent naming scheme, we rename all other tables
  16. @@ -32,6 +34,12 @@
  17. RENAME TABLE CMON_LONG_LIVED_TIME_SERIES_ATTRIBUTE TO CMON_LL_TIME_SERIES_ATTRIBUTE;
  18. RENAME TABLE CMON_LONG_LIVED_TIME_SERIES_ID TO CMON_LL_TIME_SERIES_ID;
  19. RENAME TABLE CMON_ACTIVITY_DATA_POINTS TO CMON_ACTIVITY_DP;
  20. +/* PRH */
  21. +RENAME TABLE CMON_LONG_LIVED_DATA_POINTS TO CMON_LL_DP;
  22. +RENAME TABLE CMON_LONG_LIVED_DATA_POINTS_HOURLY TO CMON_LL_DP_HR;
  23. +RENAME TABLE CMON_ACTIVITY_LAST_METRIC_VAL TO CMON_ACT_LMV;
  24. +RENAME TABLE CMON_ATTEMPT_LAST_METRIC_VAL TO CMON_ATT_LMV;
  25. +/* PRH */
  26.  
  27. --
  28. -- Add foreign key constraint to CMON_LONG_LIVED_DATA_POINTS that inadvertently
  29.  
  30. patch for 00012_cmon_schema.mysql.ddl:
  31.  
  32. --- 00012_cmon_schema.mysql.ddl 2014-03-20 13:19:35.222194452 -0700
  33. +++ 00012_cmon_schema.mysql.ddl.new 2014-03-20 13:18:43.804301132 -0700
  34. @@ -19,7 +19,19 @@
  35. -- For some reason this does not use a sequence. Let's fix it as it will
  36. -- make our life when creating partitions easier.
  37.  
  38. +/* PRH */
  39. +
  40. +ALTER TABLE CMON_ATTEMPT DROP FOREIGN KEY `FK_ATTEMPT_ACTIVITY`;
  41. +ALTER TABLE CMON_ATT_LMV DROP FOREIGN KEY `FK_ATTEMPT_LMV_ATTEMPT`;
  42. +
  43. +/* PRH */
  44. +
  45. ALTER TABLE CMON_ATTEMPT MODIFY COLUMN ID BIGINT(20) NOT NULL AUTO_INCREMENT;
  46.  
  47. +/* PRH */
  48. +ALTER TABLE CMON_ATTEMPT ADD CONSTRAINT `FK_ATTEMPT_ACTIVITY` FOREIGN KEY (`ACTIVITY_ID`) REFERENCES `CMON_ACTIVITY` (`ID`) ON DELETE CASCADE;
  49. +ALTER TABLE CMON_ATT_LMV ADD CONSTRAINT `FK_ATTEMPT_LMV_ATTEMPT` FOREIGN KEY (`ATTEMPT_ID`) REFERENCES `CMON_ATTEMPT` (`ID`) ON DELETE CASCADE;
  50. +/* PRH */
  51. +
  52. -- Partition old data if necessary.
  53. -com.cloudera.cmon.firehose.db.PartitionOldAmonData
  54. +-- PRH com.cloudera.cmon.firehose.db.PartitionOldAmonData
RAW Paste Data