All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.flink.runtime.state.DummyKeyedStateBackend Maven / Gradle / Ivy

There is a newer version: 1.5.1
Show newest version
/*
 * 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.state;

import org.apache.flink.api.common.ExecutionConfig;
import org.apache.flink.api.common.state.AggregatingStateDescriptor;
import org.apache.flink.api.common.state.FoldingStateDescriptor;
import org.apache.flink.api.common.state.ListStateDescriptor;
import org.apache.flink.api.common.state.MapStateDescriptor;
import org.apache.flink.api.common.state.ReducingStateDescriptor;
import org.apache.flink.api.common.state.ValueStateDescriptor;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.runtime.checkpoint.CheckpointOptions;
import org.apache.flink.runtime.query.TaskKvStateRegistry;
import org.apache.flink.runtime.state.internal.InternalAggregatingState;
import org.apache.flink.runtime.state.internal.InternalFoldingState;
import org.apache.flink.runtime.state.internal.InternalListState;
import org.apache.flink.runtime.state.internal.InternalMapState;
import org.apache.flink.runtime.state.internal.InternalReducingState;
import org.apache.flink.runtime.state.internal.InternalValueState;

import java.util.Collection;
import java.util.concurrent.RunnableFuture;

import java.util.stream.Stream;

/**
 * Dummy Keyed StateBackend.
 */
public class DummyKeyedStateBackend extends AbstractKeyedStateBackend {

	public DummyKeyedStateBackend(TaskKvStateRegistry kvStateRegistry, TypeSerializer keySerializer, ClassLoader userCodeClassLoader, int numberOfKeyGroups, KeyGroupRange keyGroupRange, ExecutionConfig executionConfig) {
		super(kvStateRegistry, keySerializer, userCodeClassLoader, numberOfKeyGroups, keyGroupRange, executionConfig);
	}

	@Override
	protected  InternalValueState createValueState(TypeSerializer namespaceSerializer, ValueStateDescriptor stateDesc) throws Exception {
		return null;
	}

	@Override
	protected  InternalListState createListState(TypeSerializer namespaceSerializer, ListStateDescriptor stateDesc) throws Exception {
		return null;
	}

	@Override
	protected  InternalReducingState createReducingState(TypeSerializer namespaceSerializer, ReducingStateDescriptor stateDesc) throws Exception {
		return null;
	}

	@Override
	protected  InternalAggregatingState createAggregatingState(TypeSerializer namespaceSerializer, AggregatingStateDescriptor stateDesc) throws Exception {
		return null;
	}

	@Override
	protected  InternalFoldingState createFoldingState(TypeSerializer namespaceSerializer, FoldingStateDescriptor stateDesc) throws Exception {
		return null;
	}

	@Override
	protected  InternalMapState createMapState(TypeSerializer namespaceSerializer, MapStateDescriptor stateDesc) throws Exception {
		return null;
	}

	@Override
	public int numStateEntries() {
		return 0;
	}

	@Override
	public void notifyCheckpointComplete(long checkpointId) throws Exception {

	}

	@Override
	public  Stream getKeys(String state, N namespace) {
		return null;
	}

	@Override
	public RunnableFuture> snapshot(long checkpointId, long timestamp, CheckpointStreamFactory streamFactory, CheckpointOptions checkpointOptions) throws Exception {
		return DoneFuture.of(SnapshotResult.empty());
	}

	@Override
	public void restore(Collection state) throws Exception {

	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy