|
@@ -32,6 +32,7 @@ import java.util.concurrent.Executors;
|
|
import java.util.concurrent.FutureTask;
|
|
import java.util.concurrent.FutureTask;
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
+import java.util.concurrent.CancellationException;
|
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
import javax.ws.rs.core.MediaType;
|
|
import javax.ws.rs.core.MultivaluedMap;
|
|
import javax.ws.rs.core.MultivaluedMap;
|
|
@@ -575,9 +576,11 @@ public class TimelineV2ClientImpl extends TimelineV2Client {
|
|
} catch (ExecutionException e) {
|
|
} catch (ExecutionException e) {
|
|
throw new YarnException("Failed while publishing entity",
|
|
throw new YarnException("Failed while publishing entity",
|
|
e.getCause());
|
|
e.getCause());
|
|
- } catch (InterruptedException e) {
|
|
|
|
|
|
+ } catch (InterruptedException | CancellationException e) {
|
|
Thread.currentThread().interrupt();
|
|
Thread.currentThread().interrupt();
|
|
throw new YarnException("Interrupted while publishing entity", e);
|
|
throw new YarnException("Interrupted while publishing entity", e);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new YarnException("Encountered error while publishing entity", e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|