@Override public boolean equals(Object o) { if (!super.equals(o)) return false; TezDAGID that = (TezDAGID)o; return this.applicationId.equals(that.applicationId); }
public Set<ApplicationId> getOtherApplicationIds() { if (getAllApplicationIds() == null || getAllApplicationIds().isEmpty()) { return ImmutableSet.of(); } return getAllApplicationIds() .stream() .filter(appId -> !appId.equals(getCurrentApplicationId())) .collect(Collectors.toSet()); }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof DumpHistoryCommand) { DumpHistoryCommand that = (DumpHistoryCommand) o; return (this.clientId.equals(that.clientId())) && (this.applicationId.equals(that.applicationId())) && (this.logBucket.equals(that.logBucket())); } return false; }
/** * Finds the current application report. * * @param client the Yarn client * @param applicationId Yarn app application id * @return Current application report or <code>NULL</code> if not found */ private ApplicationReport findApplicationReport(YarnClient client, ApplicationId applicationId) { for (ApplicationReport report : client.listApplications()) { if (report.getApplicationId().equals(applicationId)) { return report; } } return null; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof DumpLogsCommand) { DumpLogsCommand that = (DumpLogsCommand) o; return (this.clientId.equals(that.clientId())) && (this.applicationId.equals(that.applicationId())) && (this.username.equals(that.username())) && (this.logBucket.equals(that.logBucket())); } return false; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; JobId other = (JobId) obj; if (!this.getAppId().equals(other.getAppId())) return false; if (this.getId() != other.getId()) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ApplicationAttemptId other = (ApplicationAttemptId) obj; if (!this.getApplicationId().equals(other.getApplicationId())) return false; if (this.getAttemptId() != other.getAttemptId()) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ApplicationAttemptId other = (ApplicationAttemptId) obj; if (!this.getApplicationId().equals(other.getApplicationId())) return false; if (this.getAttemptId() != other.getAttemptId()) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ApplicationAttemptId other = (ApplicationAttemptId) obj; if (!this.getApplicationId().equals(other.getApplicationId())) return false; if (this.getAttemptId() != other.getAttemptId()) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ApplicationAttemptId other = (ApplicationAttemptId) obj; if (!this.getApplicationId().equals(other.getApplicationId())) return false; if (this.getAttemptId() != other.getAttemptId()) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; JobId other = (JobId) obj; if (!this.getAppId().equals(other.getAppId())) return false; if (this.getId() != other.getId()) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; JobId other = (JobId) obj; if (!this.getAppId().equals(other.getAppId())) return false; if (this.getId() != other.getId()) return false; return true; }
protected void validateIds(ApplicationId appId, ApplicationAttemptId appAttemptId, ContainerId containerId) { if (!appAttemptId.getApplicationId().equals(appId)) { throw new NotFoundException("appId and appAttemptId don't match"); } if (containerId != null && !containerId.getApplicationAttemptId().equals(appAttemptId)) { throw new NotFoundException("appAttemptId and containerId don't match"); } }
protected void validateIds(ApplicationId appId, ApplicationAttemptId appAttemptId, ContainerId containerId) { if (!appAttemptId.getApplicationId().equals(appId)) { throw new NotFoundException("appId and appAttemptId don't match"); } if (containerId != null && !containerId.getApplicationAttemptId().equals(appAttemptId)) { throw new NotFoundException("appAttemptId and containerId don't match"); } }
protected void validateIds(ApplicationId appId, ApplicationAttemptId appAttemptId, ContainerId containerId) { if (!appAttemptId.getApplicationId().equals(appId)) { throw new NotFoundException("appId and appAttemptId don't match"); } if (containerId != null && !containerId.getApplicationAttemptId().equals(appAttemptId)) { throw new NotFoundException("appAttemptId and containerId don't match"); } }
private void waitForAppCleanupMessageRecved(MockNM nm, ApplicationId appId) throws Exception { while (true) { NodeHeartbeatResponse response = nm.nodeHeartbeat(true); if (response.getApplicationsToCleanup() != null && response.getApplicationsToCleanup().size() == 1 && appId.equals(response.getApplicationsToCleanup().get(0))) { return; } LOG.info("Haven't got application=" + appId.toString() + " in cleanup list from node heartbeat response, " + "sleep for a while before next heartbeat"); Thread.sleep(1000); } }
private void waitForAppCleanupMessageRecved(MockNM nm, ApplicationId appId) throws Exception { while (true) { NodeHeartbeatResponse response = nm.nodeHeartbeat(true); if (response.getApplicationsToCleanup() != null && response.getApplicationsToCleanup().size() == 1 && appId.equals(response.getApplicationsToCleanup().get(0))) { return; } LOG.info("Haven't got application=" + appId.toString() + " in cleanup list from node heartbeat response, " + "sleep for a while before next heartbeat"); Thread.sleep(1000); } }
private ApplicationStateData createApplicationState(String appIdStr, byte[] data) throws IOException { ApplicationId appId = ApplicationId.fromString(appIdStr); ApplicationStateDataPBImpl appState = new ApplicationStateDataPBImpl( ApplicationStateDataProto.parseFrom(data)); if (!appId.equals( appState.getApplicationSubmissionContext().getApplicationId())) { throw new YarnRuntimeException("The database entry for " + appId + " contains data for " + appState.getApplicationSubmissionContext().getApplicationId()); } return appState; }
private ApplicationStateData createApplicationState(String appIdStr, byte[] data) throws IOException { ApplicationId appId = ConverterUtils.toApplicationId(appIdStr); ApplicationStateDataPBImpl appState = new ApplicationStateDataPBImpl( ApplicationStateDataProto.parseFrom(data)); if (!appId.equals( appState.getApplicationSubmissionContext().getApplicationId())) { throw new YarnRuntimeException("The database entry for " + appId + " contains data for " + appState.getApplicationSubmissionContext().getApplicationId()); } return appState; }
private ApplicationStateData createApplicationState(String appIdStr, byte[] data) throws IOException { ApplicationId appId = ConverterUtils.toApplicationId(appIdStr); ApplicationStateDataPBImpl appState = new ApplicationStateDataPBImpl( ApplicationStateDataProto.parseFrom(data)); if (!appId.equals( appState.getApplicationSubmissionContext().getApplicationId())) { throw new YarnRuntimeException("The database entry for " + appId + " contains data for " + appState.getApplicationSubmissionContext().getApplicationId()); } return appState; }