YARN-7565. Addendum to fix an incompatible change. Contributed by Wangda Tan.

This commit is contained in:
Vinod Kumar Vavilapalli (I am also known as @tshooter.) 2017-12-14 17:07:17 -08:00
parent 17ba74be29
commit 95d4ec7fc0
2 changed files with 5 additions and 4 deletions

View File

@ -539,7 +539,5 @@ public interface CallbackHandler {
* @param e * @param e
*/ */
void onError(Throwable e); void onError(Throwable e);
void onContainersReceivedFromPreviousAttempts(List<Container> containers);
} }
} }

View File

@ -360,8 +360,11 @@ public void run() {
} }
if (!response.getContainersFromPreviousAttempts().isEmpty()) { if (!response.getContainersFromPreviousAttempts().isEmpty()) {
handler.onContainersReceivedFromPreviousAttempts( if (handler instanceof AMRMClientAsync.AbstractCallbackHandler) {
response.getContainersFromPreviousAttempts()); ((AMRMClientAsync.AbstractCallbackHandler) handler)
.onContainersReceivedFromPreviousAttempts(
response.getContainersFromPreviousAttempts());
}
} }
progress = handler.getProgress(); progress = handler.getProgress();
} catch (Throwable ex) { } catch (Throwable ex) {