You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2012/08/15 21:22:21 UTC
svn commit: r1373591 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
Author: apurtell
Date: Wed Aug 15 19:22:21 2012
New Revision: 1373591
URL: http://svn.apache.org/viewvc?rev=1373591&view=rev
Log:
HBASE-6263. Use default mode for Thrift gateway if not specified
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java?rev=1373591&r1=1373590&r2=1373591&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java Wed Aug 15 19:22:21 2012
@@ -202,11 +202,14 @@ public class ThriftServerRunner implemen
++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);
}