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:
parent
0875b6873c
commit
7c7b7c9c1e
|
@ -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");
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue