try {
if ("local".equals(host)) {
LOG.info("Connecting to local environment.");
mExecEnv = new LocalEnvironment(mConf);
} else if ("none".equals(host)) {
mExecEnv = new DummyExecEnv();
} else {
int portIndex = host.indexOf(':');
int port = mConf.getInt(ServerMain.THRIFT_SERVER_PORT_KEY,
ServerMain.DEFAULT_THRIFT_SERVER_PORT);
String hostname = host;