private void updateHeartbeatInfo( String hostname, String uniqueId, int port, TezAttemptArray tasks) { int updateCount = 0; HashSet<TezTaskAttemptID> attempts = new HashSet<>(); for (Writable w : tasks.get()) { attempts.add((TezTaskAttemptID)w); } String error = ""; for (Map.Entry<String, LlapTaskUmbilicalExternalClient> entry : registeredClients.entrySet()) { LlapTaskUmbilicalExternalClient registeredClient = entry.getValue(); if (doesClientMatchHeartbeat(registeredClient, hostname, uniqueId, port)) { TezTaskAttemptID ta = TezTaskAttemptID.fromString(registeredClient.requestInfo.taskAttemptId); if (attempts.contains(ta)) { registeredClient.setLastHeartbeat(System.currentTimeMillis()); updateCount++; } else { error += (registeredClient.requestInfo.taskAttemptId + ", "); } } } if (!error.isEmpty()) { LOG.info("The tasks we expected to be on the node are not there: " + error); } if (updateCount == 0) { LOG.info("No tasks found for heartbeat from hostname " + hostname + ", port " + port); } }
env.put(ApplicationConstants.Environment.USER.name(), vertex.getUser()); TezTaskAttemptID taskAttemptId = TezTaskAttemptID.fromString(fragmentIdString); int dagIdentifier = taskAttemptId.getTaskID().getVertexID().getDAGId().getId();
private void updateHeartbeatInfo( String hostname, String uniqueId, int port, TezAttemptArray tasks) { int updateCount = 0; HashSet<TezTaskAttemptID> attempts = new HashSet<>(); for (Writable w : tasks.get()) { attempts.add((TezTaskAttemptID)w); } String error = ""; for (Map.Entry<String, LlapTaskUmbilicalExternalClient> entry : registeredClients.entrySet()) { LlapTaskUmbilicalExternalClient registeredClient = entry.getValue(); if (doesClientMatchHeartbeat(registeredClient, hostname, uniqueId, port)) { TezTaskAttemptID ta = TezTaskAttemptID.fromString(registeredClient.requestInfo.taskAttemptId); if (attempts.contains(ta)) { registeredClient.setLastHeartbeat(System.currentTimeMillis()); updateCount++; } else { error += (registeredClient.requestInfo.taskAttemptId + ", "); } } } if (!error.isEmpty()) { LOG.info("The tasks we expected to be on the node are not there: " + error); } if (updateCount == 0) { LOG.info("No tasks found for heartbeat from hostname " + hostname + ", port " + port); } }
public static DataEventDependencyInfo fromProto(DataEventDependencyInfoProto proto) { TezTaskAttemptID taId = null; if(proto.hasTaskAttemptId()) { taId = TezTaskAttemptID.fromString(proto.getTaskAttemptId()); } return new DataEventDependencyInfo(proto.getTimestamp(), taId); } }
public void fromProto(TaskAttemptStartedProto proto) { this.taskAttemptId = TezTaskAttemptID.fromString(proto.getTaskAttemptId()); this.launchTime = proto.getStartTime(); this.containerId = ConverterUtils.toContainerId(proto.getContainerId()); this.nodeId = ConverterUtils.toNodeId(proto.getNodeId()); }
public static EventMetaData convertEventMetaDataFromProto( RecoveryProtos.EventMetaDataProto proto) { TezTaskAttemptID attemptID = null; if (proto.hasTaskAttemptId()) { attemptID = TezTaskAttemptID.fromString(proto.getTaskAttemptId()); } return new EventMetaData( EventMetaData.EventProducerConsumerType.values()[proto.getProducerConsumerType()], proto.getTaskVertexName(), proto.getEdgeVertexName(), attemptID); } }
case Constants.TEZ_TASK_ATTEMPT_ID: String taskAttemptName = entity; TezTaskAttemptID tezAttemptId = TezTaskAttemptID.fromString(taskAttemptName); if (!tezDAGID.equals(tezAttemptId.getTaskID().getVertexID().getDAGId())) { LOG.warn(taskAttemptName + " does not belong to " + tezDAGID);
public void fromProto(TaskFinishedProto proto) { this.taskID = TezTaskID.fromString(proto.getTaskId()); this.finishTime = proto.getFinishTime(); this.state = TaskState.values()[proto.getState()]; if (proto.hasDiagnostics()) { this.diagnostics = proto.getDiagnostics(); } if (proto.hasSuccessfulTaskAttemptId()) { this.successfulAttemptID = TezTaskAttemptID.fromString(proto.getSuccessfulTaskAttemptId()); } }
public void fromProto(TaskAttemptFinishedProto proto) throws IOException { this.taskAttemptId = TezTaskAttemptID.fromString(proto.getTaskAttemptId()); this.state = TaskAttemptState.values()[proto.getState()]; this.creationTime = proto.getCreationTime(); this.creationCausalTA = TezTaskAttemptID.fromString(proto.getCreationCausalTA());
env.put(ApplicationConstants.Environment.USER.name(), vertex.getUser()); TezTaskAttemptID taskAttemptId = TezTaskAttemptID.fromString(fragmentIdString); int dagIdentifier = taskAttemptId.getTaskID().getVertexID().getDAGId().getId();
TezTaskAttemptID taskAttemptId = TezTaskAttemptID.fromString(attemptInfo .getTaskAttemptId()); VertexInfo vertexInfo = dagInfo.getVertexFromId(taskAttemptId.getTaskID()