HBASE-27865 TestThriftServerCmdLine fails with org.apache.hadoop.hbase.SystemExitRule (#5238)
Signed-off-by: Liangjun He <heliangjun@apache.org> Signed-off-by: Xin Sun <ddupgs@gmail.com>
This commit is contained in:
parent
b28feeb989
commit
fd4f984d87
|
@ -833,9 +833,9 @@ public class ThriftServer extends Configured implements Tool {
|
||||||
} else {
|
} else {
|
||||||
setupServer();
|
setupServer();
|
||||||
}
|
}
|
||||||
serviceUGI.doAs(new PrivilegedAction<Object>() {
|
return serviceUGI.doAs(new PrivilegedAction<Integer>() {
|
||||||
@Override
|
@Override
|
||||||
public Object run() {
|
public Integer run() {
|
||||||
try {
|
try {
|
||||||
startInfoServer();
|
startInfoServer();
|
||||||
if (httpEnabled) {
|
if (httpEnabled) {
|
||||||
|
@ -844,15 +844,13 @@ public class ThriftServer extends Configured implements Tool {
|
||||||
} else {
|
} else {
|
||||||
tserver.serve();
|
tserver.serve();
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error(HBaseMarkers.FATAL, "Cannot run ThriftServer", e);
|
LOG.error(HBaseMarkers.FATAL, "Cannot run ThriftServer", e);
|
||||||
|
return -1;
|
||||||
System.exit(-1);
|
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue