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.jobmaster;
import org.apache.flink.api.common.JobID;
import org.apache.flink.api.common.time.Time;
import org.apache.flink.runtime.blob.TransientBlobKey;
import org.apache.flink.runtime.checkpoint.CheckpointOptions;
import org.apache.flink.runtime.clusterframework.ApplicationStatus;
import org.apache.flink.runtime.deployment.TaskDeploymentDescriptor;
import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
import org.apache.flink.runtime.executiongraph.PartitionInfo;
import org.apache.flink.runtime.instance.InstanceID;
import org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway;
import org.apache.flink.runtime.messages.Acknowledge;
import org.apache.flink.runtime.messages.StackTrace;
import org.apache.flink.runtime.messages.StackTraceSampleResponse;
import org.apache.flink.runtime.taskexecutor.TaskExecutorGateway;
import org.apache.flink.util.Preconditions;
import java.util.concurrent.CompletableFuture;
/**
* Implementation of the {@link TaskManagerGateway} for Flink's RPC system
*/
public class RpcTaskManagerGateway implements TaskManagerGateway {
private final TaskExecutorGateway taskExecutorGateway;
private final JobMasterId jobMasterId;
public RpcTaskManagerGateway(TaskExecutorGateway taskExecutorGateway, JobMasterId jobMasterId) {
this.taskExecutorGateway = Preconditions.checkNotNull(taskExecutorGateway);
this.jobMasterId = Preconditions.checkNotNull(jobMasterId);
}
@Override
public String getAddress() {
return taskExecutorGateway.getAddress();
}
@Override
public void disconnectFromJobManager(InstanceID instanceId, Exception cause) {
// taskExecutorGateway.disconnectFromJobManager(instanceId, cause);
throw new UnsupportedOperationException("Operation is not yet supported.");
}
@Override
public void stopCluster(ApplicationStatus applicationStatus, String message) {
// taskExecutorGateway.stopCluster(applicationStatus, message);
throw new UnsupportedOperationException("Operation is not yet supported.");
}
@Override
public CompletableFuture requestStackTrace(Time timeout) {
// return taskExecutorGateway.requestStackTrace(timeout);
throw new UnsupportedOperationException("Operation is not yet supported.");
}
@Override
public CompletableFuture requestStackTraceSample(
ExecutionAttemptID executionAttemptID,
int sampleId,
int numSamples,
Time delayBetweenSamples,
int maxStackTraceDepth,
Time timeout) {
throw new UnsupportedOperationException("Operation is not yet supported.");
}
@Override
public CompletableFuture submitTask(TaskDeploymentDescriptor tdd, Time timeout) {
return taskExecutorGateway.submitTask(tdd, jobMasterId, timeout);
}
@Override
public CompletableFuture stopTask(ExecutionAttemptID executionAttemptID, Time timeout) {
return taskExecutorGateway.stopTask(executionAttemptID, timeout);
}
@Override
public CompletableFuture cancelTask(ExecutionAttemptID executionAttemptID, Time timeout) {
return taskExecutorGateway.cancelTask(executionAttemptID, timeout);
}
@Override
public CompletableFuture updatePartitions(ExecutionAttemptID executionAttemptID, Iterable partitionInfos, Time timeout) {
return taskExecutorGateway.updatePartitions(executionAttemptID, partitionInfos, timeout);
}
@Override
public void failPartition(ExecutionAttemptID executionAttemptID) {
taskExecutorGateway.failPartition(executionAttemptID);
}
@Override
public void notifyCheckpointComplete(ExecutionAttemptID executionAttemptID, JobID jobId, long checkpointId, long timestamp) {
// taskExecutorGateway.notifyCheckpointComplete(executionAttemptID, jobId, checkpointId, timestamp);
throw new UnsupportedOperationException("Operation is not yet supported.");
}
@Override
public void triggerCheckpoint(ExecutionAttemptID executionAttemptID, JobID jobId, long checkpointId, long timestamp, CheckpointOptions checkpointOptions) {
// taskExecutorGateway.triggerCheckpoint(executionAttemptID, jobId, checkpointId, timestamp);
throw new UnsupportedOperationException("Operation is not yet supported.");
}
@Override
public CompletableFuture requestTaskManagerLog(Time timeout) {
// return taskExecutorGateway.requestTaskManagerLog(timeout);
throw new UnsupportedOperationException("Operation is not yet supported.");
}
@Override
public CompletableFuture requestTaskManagerStdout(Time timeout) {
// return taskExecutorGateway.requestTaskManagerStdout(timeout);
throw new UnsupportedOperationException("Operation is not yet supported.");
}
}