if (nodes != null && nodes.size() > 0) {
String nameNodeIP = nodes.get(0).fetchMgtIp();
setNameNode(nameNodeIP);
hasHDFS = true;
} else {
throw new CliRestException("no name node available");
}
}
if ("hadoop_jobtracker".equals(role)) {
List<NodeRead> nodes = nodeGroup.getInstances();
if (nodes != null && nodes.size() > 0) {
String jobTrackerIP = nodes.get(0).fetchMgtIp();
setJobTracker(jobTrackerIP);
} else {
throw new CliRestException(
"no job tracker available");
}
}
if ("hive_server".equals(role)) {
List<NodeRead> nodes = nodeGroup.getInstances();
if (nodes != null && nodes.size() > 0) {
String hiveServerIP = nodes.get(0).fetchMgtIp();
setHiveServerAddress(hiveServerIP);
hasHiveServer = true;
} else {
throw new CliRestException(
"no hive server available");
}
}
}
}