Skip to content

Commit

Permalink
HBASE-27865 TestThriftServerCmdLine fails with org.apache.hadoop.hbas…
Browse files Browse the repository at this point in the history
…e.SystemExitRule (#5238)

Signed-off-by: Liangjun He <heliangjun@apache.org>
Signed-off-by: Xin Sun <ddupgs@gmail.com>
(cherry picked from commit fd4f984)
  • Loading branch information
Apache9 committed May 15, 2023
1 parent dcb81d0 commit b2e4d3b
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,9 @@ public int run(String[] strings) throws Exception {
} else {
setupServer();
}
serviceUGI.doAs(new PrivilegedAction<Object>() {
return serviceUGI.doAs(new PrivilegedAction<Integer>() {
@Override
public Object run() {
public Integer run() {
try {
startInfoServer();
if (httpEnabled) {
Expand All @@ -844,15 +844,13 @@ public Object run() {
} 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 {
Expand Down

0 comments on commit b2e4d3b

Please sign in to comment.