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 (apache#5238)

Signed-off-by: Liangjun He <heliangjun@apache.org>
Signed-off-by: Xin Sun <ddupgs@gmail.com>
(cherry picked from commit fd4f984)
(cherry picked from commit 4169b61)
Change-Id: Ic916377969fb3501b15fd18215f34a69b9bcb5bd
  • Loading branch information
Apache9 authored and Jenkins committed May 18, 2023
1 parent c96e7cf commit ef2891e
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,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 @@ -843,15 +843,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 ef2891e

Please sign in to comment.