ConnectionMXBean.class, false);
for (String node : connectionBean.getEphemeralNodes()) {
if (node.endsWith("/instances/" + controller.getRunId().getId())) {
// This is the AM, expire the session.
LOG.info("Kill AM session {}", connectionBean.getSessionId());
connectionBean.terminateSession();
return true;
}
}
}
} while (stopwatch.elapsedTime(timeoutUnit) < timeout);