public static void decorateMasterConfiguration(Configuration conf) {
    if (!isBackupEnabled(conf)) {
      return;
    }
    // Add WAL archive cleaner plug-in
    String plugins = conf.get(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS);
    String cleanerClass = BackupLogCleaner.class.getCanonicalName();
    if (!plugins.contains(cleanerClass)) {
      conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + "," + cleanerClass);
    }

    String classes = conf.get(ProcedureManagerHost.MASTER_PROCEDURE_CONF_KEY);
    String masterProcedureClass = LogRollMasterProcedureManager.class.getName();
    if (classes == null) {
      conf.set(ProcedureManagerHost.MASTER_PROCEDURE_CONF_KEY, masterProcedureClass);
    } else if (!classes.contains(masterProcedureClass)) {
      conf.set(ProcedureManagerHost.MASTER_PROCEDURE_CONF_KEY,
        classes + "," + masterProcedureClass);
    }

    plugins = conf.get(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS);
    conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS,
      (plugins == null ? "" : plugins + ",") + BackupHFileCleaner.class.getName());

    String observerClass = BackupMasterObserver.class.getName();
    String masterCoProc = conf.get(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY);
    conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY,
      (masterCoProc == null ? "" : masterCoProc + ",") + observerClass);

    if (LOG.isDebugEnabled()) {
      LOG.debug(
        "Added log cleaner: {}. Added master procedure manager: {}."
          + " Added master procedure manager: {}. Added master observer: {}",
        cleanerClass, masterProcedureClass, BackupHFileCleaner.class.getName(), observerClass);
    }
  }
This method modifies the master's configuration in order to inject backup-related features
(TESTs only)
@param conf configuration
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManager.java