HADOOP-2675 Options not passed to rest/thrift
git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk/src/contrib/hbase@616163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
73d71a09a8
commit
2f06f08d95
|
@ -150,6 +150,7 @@ Trunk (unreleased changes)
|
|||
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
|
||||
|
|
|
@ -209,23 +209,24 @@ implements javax.servlet.Servlet {
|
|||
} 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 @@ implements javax.servlet.Servlet {
|
|||
public static void main(String [] args) throws Exception {
|
||||
doMain(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -615,26 +615,26 @@ public class ThriftServer {
|
|||
} 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 class ThriftServer {
|
|||
public static void main(String [] args) throws Exception {
|
||||
doMain(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue