Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.rest.messages.job;
import org.apache.flink.runtime.jobgraph.JobVertexID;
import org.apache.flink.runtime.jobgraph.OperatorID;
import org.apache.flink.runtime.rest.messages.ResponseBody;
import org.apache.flink.runtime.rest.messages.job.metrics.IOMetricsInfo;
import org.apache.flink.runtime.rest.messages.json.JobVertexIDDeserializer;
import org.apache.flink.runtime.rest.messages.json.JobVertexIDSerializer;
import org.apache.flink.runtime.rest.messages.json.JobVertexOperatorIDDeserializer;
import org.apache.flink.runtime.rest.messages.json.JobVertexOperatorIDSerializer;
import org.apache.flink.util.Preconditions;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
/**
* Details of all Vertices about a job.
*/
public class JobVerticesInfo implements ResponseBody {
public static final String FIELD_NAME_JOB_VERTICES = "vertices";
public static final String FIELD_NAME_JOB_OPERATOR = "operators";
@JsonProperty(FIELD_NAME_JOB_VERTICES)
private final Collection jobVertices;
@JsonProperty(FIELD_NAME_JOB_OPERATOR)
private final Collection jobOperators;
@JsonCreator
public JobVerticesInfo(
@JsonProperty(FIELD_NAME_JOB_VERTICES) Collection jobVertices,
@JsonProperty(FIELD_NAME_JOB_OPERATOR) Collection jobOperators) {
this.jobVertices = Preconditions.checkNotNull(jobVertices);
this.jobOperators = Preconditions.checkNotNull(jobOperators);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JobVerticesInfo that = (JobVerticesInfo) o;
return Objects.equals(jobVertices, that.jobVertices) &&
Objects.equals(jobOperators, that.jobOperators);
}
@Override
public int hashCode() {
return Objects.hash(jobVertices, jobOperators);
}
@JsonIgnore
public Collection getJobVertices() {
return jobVertices;
}
@JsonIgnore
public Collection getJobOperators() {
return jobOperators;
}
// ---------------------------------------------------
// Static inner classes
// ---------------------------------------------------
/**
* Detailed information about a job vertex.
*/
public static final class JobVertex {
public static final String FIELD_NAME_JOB_VERTEX_ID = "id";
public static final String FIELD_NAME_JOB_VERTEX_NAME = "name";
public static final String FIELD_NAME_TOPOLOGY_ID = "topology-id";
public static final String FIELD_NAME_JOB_VERTEX_PARALLELISM = "parallelism";
public static final String FIELD_NAME_JOB_VERTEX_SUBTASK_METRICS = "subtask_metrics";
public static final String FIELD_NAME_JOB_VERTEX_METRICS = "metrics";
@JsonProperty(FIELD_NAME_JOB_VERTEX_ID)
@JsonSerialize(using = JobVertexIDSerializer.class)
private final JobVertexID jobVertexID;
@JsonProperty(FIELD_NAME_TOPOLOGY_ID)
private final int topologyID;
@JsonProperty(FIELD_NAME_JOB_VERTEX_NAME)
private final String name;
@JsonProperty(FIELD_NAME_JOB_VERTEX_PARALLELISM)
private final int parallelism;
@JsonProperty(FIELD_NAME_JOB_VERTEX_SUBTASK_METRICS)
private final Collection