Search in sources :

Example 1 with KvStateLocationRegistry

use of org.apache.flink.runtime.query.KvStateLocationRegistry in project flink by apache.

the class JobMaster method lookupKvStateLocation.

@RpcMethod
public KvStateLocation lookupKvStateLocation(final String registrationName) throws Exception {
    if (log.isDebugEnabled()) {
        log.debug("Lookup key-value state for job {} with registration " + "name {}.", jobGraph.getJobID(), registrationName);
    }
    final KvStateLocationRegistry registry = executionGraph.getKvStateLocationRegistry();
    final KvStateLocation location = registry.getKvStateLocation(registrationName);
    if (location != null) {
        return location;
    } else {
        throw new UnknownKvStateLocation(registrationName);
    }
}
Also used : UnknownKvStateLocation(org.apache.flink.runtime.query.UnknownKvStateLocation) KvStateLocationRegistry(org.apache.flink.runtime.query.KvStateLocationRegistry) UnknownKvStateLocation(org.apache.flink.runtime.query.UnknownKvStateLocation) KvStateLocation(org.apache.flink.runtime.query.KvStateLocation) RpcMethod(org.apache.flink.runtime.rpc.RpcMethod)

Aggregations

KvStateLocation (org.apache.flink.runtime.query.KvStateLocation)1 KvStateLocationRegistry (org.apache.flink.runtime.query.KvStateLocationRegistry)1 UnknownKvStateLocation (org.apache.flink.runtime.query.UnknownKvStateLocation)1 RpcMethod (org.apache.flink.runtime.rpc.RpcMethod)1