Skip to content

Commit 5043450

Browse files
committed
Address SonarQube - 2
1 parent 1eddf6a commit 5043450

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezExternalSessionState.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.io.IOException;
2222
import java.util.concurrent.TimeUnit;
2323

24+
import com.google.protobuf.ServiceException;
2425
import org.apache.hadoop.conf.Configuration;
2526
import org.apache.hadoop.hive.conf.HiveConf;
2627
import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -230,7 +231,7 @@ private void tryKillRunningDAGs(TezClient session) throws TezException {
230231
}
231232

232233
private void waitForDagTerminal(DAGClientAMProtocolBlockingPB proxy, String dagId, long timeoutMs)
233-
throws Exception {
234+
throws TezException, ServiceException {
234235
long startTimeMs = System.currentTimeMillis();
235236
long pollIntervalMs = conf.getTimeVar(ConfVars.TEZ_DAG_STATUS_CHECK_INTERVAL, TimeUnit.MILLISECONDS);
236237
while (System.currentTimeMillis() - startTimeMs < timeoutMs) {
@@ -253,8 +254,8 @@ && isTerminalDagState(response.getDagStatus().getState())) {
253254

254255
private static boolean isTerminalDagState(DAGProtos.DAGStatusStateProto state) {
255256
return switch (state) {
256-
case DAG_SUCCEEDED, DAG_KILLED, DAG_FAILED, DAG_ERROR -> true;
257-
default -> false;
257+
case DAG_SUCCEEDED, DAG_KILLED, DAG_FAILED, DAG_ERROR -> true;
258+
default -> false;
258259
};
259260
}
260261
}

0 commit comments

Comments
 (0)