@Test public void testToProto() throws IOException { PlanInfo planInfo = new PlanInfo(1, "test", Status.COMPLETED, 10, null); PlanInfo otherPlanInfo = new PlanInfo(planInfo.toProto()); assertEquals(planInfo, otherPlanInfo); }
@Override public alluxio.grpc.JobInfo toProto() throws IOException { List<alluxio.grpc.JobInfo> taskInfos = new ArrayList<>(); for (JobInfo taskInfo : mChildren) { taskInfos.add(taskInfo.toProto()); } alluxio.grpc.JobInfo.Builder jobInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setId(mId) .setErrorMessage(mErrorMessage).addAllChildren(taskInfos).setStatus(mStatus.toProto()) .setName(mName).setDescription(mDescription).addAllAffectedPaths(mAffectedPaths) .setErrorType(mErrorType).setType(JobType.PLAN); if (mResult != null && !mResult.isEmpty()) { ByteBuffer result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); jobInfoBuilder.setResult(ByteString.copyFrom(result)); } jobInfoBuilder.setLastUpdated(mLastUpdated); return jobInfoBuilder.build(); }
PlanInfo implements JobInfo { @Override public alluxio.grpc.JobInfo toProto() throws IOException { List<alluxio.grpc.JobInfo> taskInfos = new ArrayList<>(); for (JobInfo taskInfo : mChildren) { taskInfos.add(taskInfo.toProto()); } alluxio.grpc.JobInfo.Builder jobInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setId(mId) .setErrorMessage(mErrorMessage).addAllChildren(taskInfos).setStatus(mStatus.toProto()) .setName(mName).setDescription(mDescription).addAllAffectedPaths(mAffectedPaths) .setErrorType(mErrorType).setType(JobType.PLAN); if (mResult != null && !mResult.isEmpty()) { ByteBuffer result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); jobInfoBuilder.setResult(ByteString.copyFrom(result)); } jobInfoBuilder.setLastUpdated(mLastUpdated); return jobInfoBuilder.build(); } }
PlanInfo implements JobInfo { @Override public alluxio.grpc.JobInfo toProto() throws IOException { List<alluxio.grpc.JobInfo> taskInfos = new ArrayList<>(); for (JobInfo taskInfo : mChildren) { taskInfos.add(taskInfo.toProto()); } alluxio.grpc.JobInfo.Builder jobInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setId(mId) .setErrorMessage(mErrorMessage).addAllChildren(taskInfos).setStatus(mStatus.toProto()) .setName(mName).setDescription(mDescription).addAllAffectedPaths(mAffectedPaths) .setErrorType(mErrorType).setType(JobType.PLAN); if (mResult != null && !mResult.isEmpty()) { ByteBuffer result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); jobInfoBuilder.setResult(ByteString.copyFrom(result)); } jobInfoBuilder.setLastUpdated(mLastUpdated); return jobInfoBuilder.build(); } PlanInfo(long id, String name, Status status, long lastUpdated,
                  @Nullable String errorMessage);  PlanInfo(alluxio.job.plan.meta.PlanInfo planInfo, boolean verbose);  PlanInfo(alluxio.grpc.JobInfo jobInfo); }
PlanInfo implements JobInfo { @Override public alluxio.grpc.JobInfo toProto() throws IOException { List<alluxio.grpc.JobInfo> taskInfos = new ArrayList<>(); for (JobInfo taskInfo : mChildren) { taskInfos.add(taskInfo.toProto()); } alluxio.grpc.JobInfo.Builder jobInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setId(mId) .setErrorMessage(mErrorMessage).addAllChildren(taskInfos).setStatus(mStatus.toProto()) .setName(mName).setDescription(mDescription).addAllAffectedPaths(mAffectedPaths) .setErrorType(mErrorType).setType(JobType.PLAN); if (mResult != null && !mResult.isEmpty()) { ByteBuffer result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); jobInfoBuilder.setResult(ByteString.copyFrom(result)); } jobInfoBuilder.setLastUpdated(mLastUpdated); return jobInfoBuilder.build(); } PlanInfo(long id, String name, Status status, long lastUpdated,
                  @Nullable String errorMessage);  PlanInfo(alluxio.job.plan.meta.PlanInfo planInfo, boolean verbose);  PlanInfo(alluxio.grpc.JobInfo jobInfo); @Override Long getParentId(); @Override long getId(); @Override String getName(); @Override String getDescription(); @Override String getResult(); @Override Status getStatus(); @Override List<JobInfo> getChildren(); @Override String getErrorType(); @Override String getErrorMessage(); @Override long getLastUpdated(); List<String> getAffectedPaths(); @Override alluxio.grpc.JobInfo toProto(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
PlanInfo implements JobInfo { @Override public alluxio.grpc.JobInfo toProto() throws IOException { List<alluxio.grpc.JobInfo> taskInfos = new ArrayList<>(); for (JobInfo taskInfo : mChildren) { taskInfos.add(taskInfo.toProto()); } alluxio.grpc.JobInfo.Builder jobInfoBuilder = alluxio.grpc.JobInfo.newBuilder().setId(mId) .setErrorMessage(mErrorMessage).addAllChildren(taskInfos).setStatus(mStatus.toProto()) .setName(mName).setDescription(mDescription).addAllAffectedPaths(mAffectedPaths) .setErrorType(mErrorType).setType(JobType.PLAN); if (mResult != null && !mResult.isEmpty()) { ByteBuffer result = mResult == null ? null : ByteBuffer.wrap(SerializationUtils.serialize(mResult)); jobInfoBuilder.setResult(ByteString.copyFrom(result)); } jobInfoBuilder.setLastUpdated(mLastUpdated); return jobInfoBuilder.build(); } PlanInfo(long id, String name, Status status, long lastUpdated,
                  @Nullable String errorMessage);  PlanInfo(alluxio.job.plan.meta.PlanInfo planInfo, boolean verbose);  PlanInfo(alluxio.grpc.JobInfo jobInfo); @Override Long getParentId(); @Override long getId(); @Override String getName(); @Override String getDescription(); @Override String getResult(); @Override Status getStatus(); @Override List<JobInfo> getChildren(); @Override String getErrorType(); @Override String getErrorMessage(); @Override long getLastUpdated(); List<String> getAffectedPaths(); @Override alluxio.grpc.JobInfo toProto(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }