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> (cherry picked from commit fd4f984d87dc189f7afc6ddc50d5373e23b46ad5)
This commit is contained in:
parent
dcb81d0c20
commit
b2e4d3bb8d
@ -833,9 +833,9 @@ public class ThriftServer extends Configured implements Tool {
|
||||
} else {
|
||||
setupServer();
|
||||
}
|
||||
serviceUGI.doAs(new PrivilegedAction<Object>() {
|
||||
return serviceUGI.doAs(new PrivilegedAction<Integer>() {
|
||||
@Override
|
||||
public Object run() {
|
||||
public Integer run() {
|
||||
try {
|
||||
startInfoServer();
|
||||
if (httpEnabled) {
|
||||
@ -844,15 +844,13 @@ public class ThriftServer extends Configured implements Tool {
|
||||
} else {
|
||||
tserver.serve();
|
||||
}
|
||||
return 0;
|
||||
} catch (Exception e) {
|
||||
LOG.error(HBaseMarkers.FATAL, "Cannot run ThriftServer", e);
|
||||
|
||||
System.exit(-1);
|
||||
return -1;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
Loading…
x
Reference in New Issue
Block a user