hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1373591 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
Date Wed, 15 Aug 2012 19:22:21 GMT
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);
     }
 



Mime
View raw message