hbase-9226: Thrift host and port are hardcoded in thrift2 DemoClient.java
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1514425 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
00c3eb1a0e
commit
72eacc89f3
|
@ -38,10 +38,20 @@ import org.apache.thrift.transport.TTransport;
|
|||
public class DemoClient {
|
||||
public static void main(String[] args) throws TIOError, TException {
|
||||
System.out.println("Thrift2 Demo");
|
||||
System.out.println("Usage: DemoClient [host=localhost] [port=9090]");
|
||||
System.out.println("This demo assumes you have a table called \"example\" with a column family called \"family1\"");
|
||||
|
||||
String host = "localhost";
|
||||
int port = 9090;
|
||||
|
||||
// use passed in arguments instead of defaults
|
||||
if (args.length >= 1) {
|
||||
host = args[0];
|
||||
}
|
||||
if (args.length >= 2) {
|
||||
port = Integer.parseInt(args[1]);
|
||||
}
|
||||
|
||||
int timeout = 10000;
|
||||
boolean framed = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue