@Test public void testToProto() throws IOException { TaskInfo taskInfo = createRandom(); assertEquals(taskInfo, new TaskInfo(taskInfo.toProto())); }
public alluxio.grpc.JobInfo toProto() { ByteBuffer result = null; try { result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); } catch (IOException e) { LOG.warn("Failed to serialize {} : {}", mResult, e.getMessage()); LOG.warn("Exception: ", e); } alluxio.grpc.JobInfo.Builder taskInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setParentId(mJobId).setId(mTaskId) .setStatus(mStatus.toProto()).setErrorMessage(mErrorMessage) .setErrorType(mErrorType).setLastUpdated(mLastUpdated).setWorkerHost(mWorkerHost) .setType(JobType.TASK).setDescription(mDescription); if (result != null) { taskInfoBuilder.setResult(ByteString.copyFrom(result)); } return taskInfoBuilder.build(); }
TaskInfo implements JobInfo { public alluxio.grpc.JobInfo toProto() { ByteBuffer result = null; try { result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); } catch (IOException e) { LOG.warn("Failed to serialize {} : {}", mResult, e.getMessage()); LOG.warn("Exception: ", e); } alluxio.grpc.JobInfo.Builder taskInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setParentId(mJobId).setId(mTaskId) .setStatus(mStatus.toProto()).setErrorMessage(mErrorMessage) .setErrorType(mErrorType).setLastUpdated(mLastUpdated).setWorkerHost(mWorkerHost) .setType(JobType.TASK).setDescription(mDescription); if (result != null) { taskInfoBuilder.setResult(ByteString.copyFrom(result)); } return taskInfoBuilder.build(); } }
TaskInfo implements JobInfo { public alluxio.grpc.JobInfo toProto() { ByteBuffer result = null; try { result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); } catch (IOException e) { LOG.warn("Failed to serialize {} : {}", mResult, e.getMessage()); LOG.warn("Exception: ", e); } alluxio.grpc.JobInfo.Builder taskInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setParentId(mJobId).setId(mTaskId) .setStatus(mStatus.toProto()).setErrorMessage(mErrorMessage) .setErrorType(mErrorType).setLastUpdated(mLastUpdated).setWorkerHost(mWorkerHost) .setType(JobType.TASK).setDescription(mDescription); if (result != null) { taskInfoBuilder.setResult(ByteString.copyFrom(result)); } return taskInfoBuilder.build(); } TaskInfo();  TaskInfo(long jobId, long taskId, Status status, WorkerNetAddress workerAddress,
                  Object args);  TaskInfo(alluxio.grpc.JobInfo taskInfo); }
TaskInfo implements JobInfo { public alluxio.grpc.JobInfo toProto() { ByteBuffer result = null; try { result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); } catch (IOException e) { LOG.warn("Failed to serialize {} : {}", mResult, e.getMessage()); LOG.warn("Exception: ", e); } alluxio.grpc.JobInfo.Builder taskInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setParentId(mJobId).setId(mTaskId) .setStatus(mStatus.toProto()).setErrorMessage(mErrorMessage) .setErrorType(mErrorType).setLastUpdated(mLastUpdated).setWorkerHost(mWorkerHost) .setType(JobType.TASK).setDescription(mDescription); if (result != null) { taskInfoBuilder.setResult(ByteString.copyFrom(result)); } return taskInfoBuilder.build(); } TaskInfo();  TaskInfo(long jobId, long taskId, Status status, WorkerNetAddress workerAddress,
                  Object args);  TaskInfo(alluxio.grpc.JobInfo taskInfo); @Override long getId(); long getTaskId(); TaskInfo setTaskId(long taskId); @Override Long getParentId(); long getJobId(); Object getWorkerHost(); TaskInfo setJobId(long jobId); @Override String getName(); @Override String getDescription(); void setDescription(String description); @Override Status getStatus(); TaskInfo setStatus(Status status); @Override long getLastUpdated(); @Override List<JobInfo> getChildren(); @Override String getErrorType(); TaskInfo setErrorType(String errorType); String getErrorMessage(); TaskInfo setErrorMessage(String errorMessage); Serializable getResult(); TaskInfo setResult(Serializable result); TaskInfo setWorkerHost(String workerHost); alluxio.grpc.JobInfo toProto(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
TaskInfo implements JobInfo { public alluxio.grpc.JobInfo toProto() { ByteBuffer result = null; try { result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); } catch (IOException e) { LOG.warn("Failed to serialize {} : {}", mResult, e.getMessage()); LOG.warn("Exception: ", e); } alluxio.grpc.JobInfo.Builder taskInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setParentId(mJobId).setId(mTaskId) .setStatus(mStatus.toProto()).setErrorMessage(mErrorMessage) .setErrorType(mErrorType).setLastUpdated(mLastUpdated).setWorkerHost(mWorkerHost) .setType(JobType.TASK).setDescription(mDescription); if (result != null) { taskInfoBuilder.setResult(ByteString.copyFrom(result)); } return taskInfoBuilder.build(); } TaskInfo();  TaskInfo(long jobId, long taskId, Status status, WorkerNetAddress workerAddress,
                  Object args);  TaskInfo(alluxio.grpc.JobInfo taskInfo); @Override long getId(); long getTaskId(); TaskInfo setTaskId(long taskId); @Override Long getParentId(); long getJobId(); Object getWorkerHost(); TaskInfo setJobId(long jobId); @Override String getName(); @Override String getDescription(); void setDescription(String description); @Override Status getStatus(); TaskInfo setStatus(Status status); @Override long getLastUpdated(); @Override List<JobInfo> getChildren(); @Override String getErrorType(); TaskInfo setErrorType(String errorType); String getErrorMessage(); TaskInfo setErrorMessage(String errorMessage); Serializable getResult(); TaskInfo setResult(Serializable result); TaskInfo setWorkerHost(String workerHost); alluxio.grpc.JobInfo toProto(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }