You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2008/01/29 05:46:41 UTC
svn commit: r616163 - in /hadoop/core/trunk/src/contrib/hbase: CHANGES.txt
src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
Author: stack
Date: Mon Jan 28 20:46:34 2008
New Revision: 616163
URL: http://svn.apache.org/viewvc?rev=616163&view=rev
Log:
HADOOP-2675 Options not passed to rest/thrift
Modified:
hadoop/core/trunk/src/contrib/hbase/CHANGES.txt
hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
Modified: hadoop/core/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/CHANGES.txt?rev=616163&r1=616162&r2=616163&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ hadoop/core/trunk/src/contrib/hbase/CHANGES.txt Mon Jan 28 20:46:34 2008
@@ -150,6 +150,7 @@
server going down and results in millions of lines of output
HADOOP-2706 HBase Shell crash
HADOOP-2712 under load, regions won't split
+ HADOOP-2675 Options not passed to rest/thrift
IMPROVEMENTS
HADOOP-2401 Add convenience put method that takes writable
Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java?rev=616163&r1=616162&r2=616163&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java Mon Jan 28 20:46:34 2008
@@ -209,23 +209,24 @@
} else if (cmd.equals("--help") || cmd.equals("-h")) {
printUsageAndExit();
} else if (cmd.equals("start")) {
- org.mortbay.jetty.Server webServer = new org.mortbay.jetty.Server();
- SocketListener listener = new SocketListener();
- listener.setPort(port);
- listener.setHost(bindAddress);
- webServer.addListener(listener);
- webServer.addWebApplication("/api", InfoServer.getWebAppDir("rest"));
- webServer.start();
- break;
+ continue;
} else if (cmd.equals("stop")) {
printUsageAndExit("To shutdown the REST server run " +
- "bin/hbase-daemon.sh stop rest or send a kill signal to " +
- "the REST server pid");
+ "bin/hbase-daemon.sh stop rest or send a kill signal to " +
+ "the REST server pid");
}
// Print out usage if we get to here.
printUsageAndExit();
}
+
+ org.mortbay.jetty.Server webServer = new org.mortbay.jetty.Server();
+ SocketListener listener = new SocketListener();
+ listener.setPort(port);
+ listener.setHost(bindAddress);
+ webServer.addListener(listener);
+ webServer.addWebApplication("/api", InfoServer.getWebAppDir("rest"));
+ webServer.start();
}
/**
@@ -235,4 +236,4 @@
public static void main(String [] args) throws Exception {
doMain(args);
}
-}
\ No newline at end of file
+}
Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java?rev=616163&r1=616162&r2=616163&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Mon Jan 28 20:46:34 2008
@@ -615,26 +615,26 @@
} else if (cmd.equals("--help") || cmd.equals("-h")) {
printUsageAndExit();
} else if (cmd.equals("start")) {
- Log LOG = LogFactory.getLog("ThriftServer");
- LOG.info("starting HBase Thrift server on port " +
- Integer.toString(port));
- HBaseHandler handler = new HBaseHandler();
- Hbase.Processor processor = new Hbase.Processor(handler);
- TServerTransport serverTransport = new TServerSocket(port);
- TProtocolFactory protFactory = new TBinaryProtocol.Factory(true, true);
- TServer server = new TThreadPoolServer(processor, serverTransport,
- protFactory);
- server.serve();
- break;
+ continue;
} else if (cmd.equals("stop")) {
printUsageAndExit("To shutdown the thrift server run " +
- "bin/hbase-daemon.sh stop thrift or send a kill signal to " +
- "the thrift server pid");
+ "bin/hbase-daemon.sh stop thrift or send a kill signal to " +
+ "the thrift server pid");
}
// Print out usage if we get to here.
printUsageAndExit();
}
+ Log LOG = LogFactory.getLog("ThriftServer");
+ LOG.info("starting HBase Thrift server on port " +
+ Integer.toString(port));
+ HBaseHandler handler = new HBaseHandler();
+ Hbase.Processor processor = new Hbase.Processor(handler);
+ TServerTransport serverTransport = new TServerSocket(port);
+ TProtocolFactory protFactory = new TBinaryProtocol.Factory(true, true);
+ TServer server = new TThreadPoolServer(processor, serverTransport,
+ protFactory);
+ server.serve();
}
/**
@@ -644,4 +644,4 @@
public static void main(String [] args) throws Exception {
doMain(args);
}
-}
\ No newline at end of file
+}