Source:
<code>protected GlusterGeoRepSessionDetails getSessionDetails(Map<String, Object> innerMap, GlusterGeoRepSession session) { GlusterGeoRepSessionDetails details = new GlusterGeoRepSessionDetails(); details.setSessionId(session.getId()); Guid masterNodeGlusterId; if(innerMap.containsKey(MASTER_NODE_UUID)) { masterNodeGlusterId = new Guid(innerMap.get(MASTER_NODE_UUID).toString()); } else { <START> log.error("Host Node Id is not available"); <END> return null; } String masterBrickDir = (innerMap.containsKey(MASTER_BRICK)) ? innerMap.get(MASTER_BRICK).toString() : null; GlusterServer glusterServer = getDbUtils().getServerByUuid(masterNodeGlusterId); if (glusterServer != null) { GlusterBrickEntity brick = getDbUtils().getGlusterBrickByServerUuidAndBrickDir(glusterServer.getId(), masterBrickDir); if (brick != null) { details.setMasterBrickId(brick.getId()); } } if (details.getMasterBrickId() == null) { log.errorFormat("Brick information could not be retrieved for gluster host id %1 and brick dir %2", masterNodeGlusterId, masterBrickDir); } String slave = innerMap.containsKey(SLAVE) ? innerMap.get(SLAVE).toString() : null; String[] slaveSplit = (slave != null) ? slave.split("([://]+)") : null; if (slaveSplit != null && slaveSplit.length >= 2) { details.setSlaveHostName(slaveSplit[slaveSplit.length -2]); } details.setStatus(GeoRepSessionStatus.from((String)innerMap.get(STATUS))); details.setCrawlStatus(GeoRepCrawlStatus.from((String)innerMap.get(CRAWL_STATUS))); details.setCheckPointStatus((String)innerMap.get(CHECK_POINT_STATUS)); return details; }</code><technical_language>"Master node UUID is available"</technical_language>

Target:
protected GlusterGeoRepSessionDetails getSessionDetails(Map<String, Object> innerMap, GlusterGeoRepSession session) { GlusterGeoRepSessionDetails details = new GlusterGeoRepSessionDetails(); details.setSessionId(session.getId()); Guid masterNodeGlusterId; if (innerMap.containsKey(MASTER_NODE_UUID)) { masterNodeGlusterId = new Guid(innerMap.get(MASTER_NODE_UUID).toString()); } else { log.error("Master node uuid is not available"); return null; } String masterBrickDir = (innerMap.containsKey(MASTER_BRICK)) ? innerMap.get(MASTER_BRICK).toString() : null; GlusterServer glusterServer = getDbUtils().getServerByUuid(masterNodeGlusterId); if (glusterServer != null) { GlusterBrickEntity brick = getDbUtils().getGlusterBrickByServerUuidAndBrickDir(glusterServer.getId(), masterBrickDir); if (brick != null) { details.setMasterBrickId(brick.getId()); } } if (details.getMasterBrickId() == null) { log.errorFormat("Brick information could not be retrieved for gluster host id %1 and brick dir %2", masterNodeGlusterId, masterBrickDir); } String slave = innerMap.containsKey(SLAVE) ? innerMap.get(SLAVE).toString() : null; String[] slaveSplit = (slave != null) ? slave.split("([://]+)") : null; if (slaveSplit != null && slaveSplit.length >= 2) { details.setSlaveHostName(slaveSplit[slaveSplit.length - 2]); } details.setStatus(GeoRepSessionStatus.from((String) innerMap.get(STATUS))); details.setCrawlStatus(GeoRepCrawlStatus.from((String) innerMap.get(CRAWL_STATUS))); details.setCheckPointStatus((String) innerMap.get(CHECK_POINT_STATUS)); return details; }