}
// handle from the command line as two strings <catalog> <filename>
else if (arg.equals("port")) {
String portStr = args[++i];
if (portStr.indexOf(':') != -1) {
HostAndPort hap = MiscUtils.getHostAndPortFromHostnameColonPort(portStr, m_port);
m_clientInterface = hap.getHostText();
m_port = hap.getPort();
} else {
m_port = Integer.parseInt(portStr);
}
} else if (arg.equals("adminport")) {
String portStr = args[++i];
if (portStr.indexOf(':') != -1) {
HostAndPort hap = MiscUtils.getHostAndPortFromHostnameColonPort(portStr, VoltDB.DEFAULT_ADMIN_PORT);
m_adminInterface = hap.getHostText();
m_adminPort = hap.getPort();
} else {
m_adminPort = Integer.parseInt(portStr);
}
} else if (arg.equals("internalport")) {
String portStr = args[++i];
if (portStr.indexOf(':') != -1) {
HostAndPort hap = MiscUtils.getHostAndPortFromHostnameColonPort(portStr, m_internalPort);
m_internalPortInterface = hap.getHostText();
m_internalPort = hap.getPort();
} else {
m_internalPort = Integer.parseInt(portStr);
}
} else if (arg.equals("replicationport")) {
String portStr = args[++i];
if (portStr.indexOf(':') != -1) {
HostAndPort hap = MiscUtils.getHostAndPortFromHostnameColonPort(portStr, VoltDB.DEFAULT_DR_PORT);
m_drInterface = hap.getHostText();
m_drAgentPortStart = hap.getPort();
} else {
m_drAgentPortStart = Integer.parseInt(portStr);
}
} else if (arg.equals("httpport")) {
String portStr = args[++i];
if (portStr.indexOf(':') != -1) {
HostAndPort hap = MiscUtils.getHostAndPortFromHostnameColonPort(portStr, VoltDB.DEFAULT_HTTP_PORT);
m_httpPortInterface = hap.getHostText();
m_httpPort = hap.getPort();
} else {
m_httpPort = Integer.parseInt(portStr);
}
} else if (arg.startsWith("zkport")) {
//zkport should be default to loopback but for openshift needs to be specified as loopback is unavalable.
String portStr = args[++i];
if (portStr.indexOf(':') != -1) {
HostAndPort hap = MiscUtils.getHostAndPortFromHostnameColonPort(portStr, VoltDB.DEFAULT_ZK_PORT);
m_zkInterface = hap.getHostText() + ":" + hap.getPort();
} else {
m_zkInterface = "127.0.0.1:" + portStr.trim();
}
} else if (arg.equals("externalinterface")) {
m_externalInterface = args[++i].trim();