HBASE-6263. Use default mode for Thrift gateway if not specified

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1373591 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2012-08-15 19:22:21 +00:00
parent 0875b6873c
commit 7c7b7c9c1e
1 changed files with 6 additions and 3 deletions

View File

@ -202,11 +202,14 @@ public class ThriftServerRunner implements Runnable {
++numChosen;
}
}
if (numChosen != 1) {
if (numChosen < 1) {
LOG.info("Using default thrift server type");
chosenType = DEFAULT;
} else if (numChosen > 1) {
throw new AssertionError("Exactly one option out of " +
Arrays.toString(values()) + " has to be specified");
}
LOG.info("Setting thrift server to " + chosenType.option);
LOG.info("Using thrift server type " + chosenType.option);
conf.set(SERVER_TYPE_CONF_KEY, chosenType.option);
}