Source:
private SourceStream getStream(Element el) throws Exception { Set<String> enabledSources = new HashSet<String>(); Map<String, Integer> sourceStreams = new HashMap<String, Integer>(); String streamName = el.getAttribute(NAME); String hcatEnabled = el.getAttribute(HCAT_ENABLED_PER_STREAM); boolean isHCatEnabled = false; if (hcatEnabled != null && !hcatEnabled.isEmpty()) { isHCatEnabled = Boolean.parseBoolean(hcatEnabled); if (isHCatEnabled) { logger.info("HCat is enabled for stream " + streamName); } else { logger.info("HCat is not enabled for stream " + streamName); } } NodeList sourceList = el.getElementsByTagName(SOURCE); for (int i = 0; i < sourceList.getLength(); i++) { Element source = (Element) sourceList.item(i); String clusterName = getTextValue(source, NAME); int rententionInHours = getRetention(source, RETENTION_IN_HOURS); String isEnabledStr = source.getAttribute(IS_STREAM_ENABLED); boolean isEnabled = true; if (null != isEnabledStr && !isEnabledStr.isEmpty()) { isEnabled = Boolean.parseBoolean(isEnabledStr); if (isEnabled) { logger.info("isEnabled is enabled for clusterName " + clusterName); } else { logger.info("isEnabled is not enabled for clusterName " + clusterName); } } logger.debug(" StreamSource :: streamname " + streamName + " retentioninhours " + rententionInHours + " " + "clusterName " + clusterName + " isHCatEnabled " + isHCatEnabled+" isEnabled "+isEnabled); if (isEnabled) { enabledSources.add(clusterName); } sourceStreams.put(clusterName, new Integer(rententionInHours)); } readConsumeStreams(streamName, el, isHCatEnabled); return new SourceStream(streamName, sourceStreams, isHCatEnabled, enabledSources); }

Target:
private SourceStream getStream(Element el) throws Exception { Set<String> enabledSources = new HashSet<String>(); Map<String, Integer> sourceStreams = new HashMap<String, Integer>(); String streamName = el.getAttribute(NAME); String hcatEnabled = el.getAttribute(HCAT_ENABLED_PER_STREAM); boolean isHCatEnabled = false; if (hcatEnabled != null && !hcatEnabled.isEmpty()) { isHCatEnabled = Boolean.parseBoolean(hcatEnabled); if (isHCatEnabled) { logger.info("HCat is enabled for stream " + streamName); } else { logger.info("HCat is not enabled for stream " + streamName); } } NodeList sourceList = el.getElementsByTagName(SOURCE); for (int i = 0; i < sourceList.getLength(); i++) { Element source = (Element) sourceList.item(i); String clusterName = getTextValue(source, NAME); int rententionInHours = getRetention(source, RETENTION_IN_HOURS); String isEnabledStr = source.getAttribute(IS_STREAM_ENABLED); boolean isEnabled = true; if (null != isEnabledStr && !isEnabledStr.isEmpty()) { isEnabled = Boolean.parseBoolean(isEnabledStr); } logger.info("isEnabled flag is " + isEnabled + " for localstream for clusterName " + clusterName); logger.debug(" StreamSource :: streamname " + streamName + " retentioninhours " + rententionInHours + " " + "clusterName " + clusterName + " isHCatEnabled " + isHCatEnabled + " isEnabled " + isEnabled); if (isEnabled) { enabledSources.add(clusterName); } sourceStreams.put(clusterName, new Integer(rententionInHours)); } readConsumeStreams(streamName, el, isHCatEnabled); return new SourceStream(streamName, sourceStreams, isHCatEnabled, enabledSources); }