/** * Merge in another tree -no overwrites of global or conf data * (note that metadata does a naive putAll merge/overwrite) * @param that the other tree */ public void mergeWithoutOverwrite(ConfTree that) { getGlobalOptions().mergeWithoutOverwrite(that.global); confTree.metadata.putAll(that.metadata); confTree.credentials.putAll(that.credentials); for (Map.Entry<String, Map<String, String>> entry : that.components.entrySet()) { MapOperations comp = getOrAddComponent(entry.getKey()); comp.mergeWithoutOverwrite(entry.getValue()); } }
/** * Merge in another tree -no overwrites of global or conf data * (note that metadata does a naive putAll merge/overwrite) * @param that the other tree */ public void mergeWithoutOverwrite(ConfTree that) { getGlobalOptions().mergeWithoutOverwrite(that.global); confTree.metadata.putAll(that.metadata); confTree.credentials.putAll(that.credentials); for (Map.Entry<String, Map<String, String>> entry : that.components.entrySet()) { MapOperations comp = getOrAddComponent(entry.getKey()); comp.mergeWithoutOverwrite(entry.getValue()); } }
public void initClusterStatus() { //copy into cluster status. ClusterDescription status = ClusterDescription.copy(clusterStatusTemplate); status.state = STATE_CREATED; MapOperations infoOps = new MapOperations("info", status.info); infoOps.mergeWithoutOverwrite(applicationInfo); SliderUtils.addBuildInfo(infoOps, "status"); long now = now(); status.setInfoTime(StatusKeys.INFO_LIVE_TIME_HUMAN, StatusKeys.INFO_LIVE_TIME_MILLIS, now); SliderUtils.setInfoTime(infoOps, StatusKeys.INFO_LIVE_TIME_HUMAN, StatusKeys.INFO_LIVE_TIME_MILLIS, now); if (0 == status.createTime) { status.createTime = now; SliderUtils.setInfoTime(infoOps, StatusKeys.INFO_CREATE_TIME_HUMAN, StatusKeys.INFO_CREATE_TIME_MILLIS, now); } status.state = STATE_LIVE; //set the app state to this status setClusterStatus(status); }
public void initClusterStatus() { //copy into cluster status. ClusterDescription status = ClusterDescription.copy(clusterStatusTemplate); status.state = STATE_CREATED; MapOperations infoOps = new MapOperations("info", status.info); infoOps.mergeWithoutOverwrite(applicationInfo); SliderUtils.addBuildInfo(infoOps, "status"); long now = now(); status.setInfoTime(StatusKeys.INFO_LIVE_TIME_HUMAN, StatusKeys.INFO_LIVE_TIME_MILLIS, now); SliderUtils.setInfoTime(infoOps, StatusKeys.INFO_LIVE_TIME_HUMAN, StatusKeys.INFO_LIVE_TIME_MILLIS, now); if (0 == status.createTime) { status.createTime = now; SliderUtils.setInfoTime(infoOps, StatusKeys.INFO_CREATE_TIME_HUMAN, StatusKeys.INFO_CREATE_TIME_MILLIS, now); } status.state = STATE_LIVE; //set the app state to this status setClusterStatus(status); }
infoOps.mergeWithoutOverwrite(applicationInfo); SliderUtils.addBuildInfo(infoOps, "status"); cd.statistics = new HashMap<>();
infoOps.mergeWithoutOverwrite(applicationInfo); SliderUtils.addBuildInfo(infoOps, "status"); cd.statistics = new HashMap<>();