提交 b0acd979 编写于 作者: R Robert Metzger

[FLINK-3129] Fix breaking changes in flink-core

上级 6c079360
......@@ -112,6 +112,26 @@ under the License.
</execution>
</executions>
</plugin>
<!-- Exclude removed CONFIG_KEY from ccheck -->
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<configuration>
<parameter>
<excludes combine.children="append">
<exclude>org.apache.flink.api.common.ExecutionConfig#CONFIG_KEY</exclude>
</excludes>
</parameter>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>cmp</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
......@@ -82,10 +82,6 @@ public class ExecutionConfig implements Serializable {
private static final long DEFAULT_RESTART_DELAY = 10000L;
// This field was used as a key for storing the EC in the Job Configuration
@Deprecated
public static final String CONFIG_KEY = "runtime.config";
// --------------------------------------------------------------------------------------------
/** Defines how data exchange happens - batch or pipelined */
......
......@@ -64,6 +64,7 @@ public interface RuntimeContext {
*
* @return The metric group for this parallel subtask.
*/
@PublicEvolving
MetricGroup getMetricGroup();
/**
......
......@@ -355,6 +355,12 @@ public final class ConfigConstants {
@Deprecated
public static final String YARN_APPLICATION_MASTER_ENV_PREFIX = "yarn.application-master.env.";
// these default values are not used anymore, but remain here until Flink 2.0
@Deprecated
public static final String DEFAULT_YARN_APPLICATION_MASTER_PORT = "deprecated";
@Deprecated
public static final int DEFAULT_YARN_MIN_HEAP_CUTOFF = -1;
/**
* Similar to the {@see YARN_APPLICATION_MASTER_ENV_PREFIX}, this configuration prefix allows
* setting custom environment variables.
......
......@@ -30,7 +30,7 @@ import org.apache.flink.core.memory.DataOutputView;
* type {@code double}.
*/
@Public
public class DoubleValue implements Comparable<DoubleValue>, ResettableValue<DoubleValue>, CopyableValue<DoubleValue> {
public class DoubleValue implements Comparable<DoubleValue>, ResettableValue<DoubleValue>, CopyableValue<DoubleValue>, Key<DoubleValue> {
private static final long serialVersionUID = 1L;
private double value;
......
......@@ -30,7 +30,7 @@ import org.apache.flink.core.memory.DataOutputView;
* type {@code float}.
*/
@Public
public class FloatValue implements Comparable<FloatValue>, ResettableValue<FloatValue>, CopyableValue<FloatValue> {
public class FloatValue implements Comparable<FloatValue>, ResettableValue<FloatValue>, CopyableValue<FloatValue>, Key<FloatValue> {
private static final long serialVersionUID = 1L;
private float value;
......
/*
* 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.types;
import org.apache.flink.annotation.PublicEvolving;
/**
* This interface has to be implemented by all data types that act as key. Keys are used to establish
* relationships between values. A key must always be {@link java.lang.Comparable} to other keys of
* the same type. In addition, keys must implement a correct {@link java.lang.Object#hashCode()} method
* and {@link java.lang.Object#equals(Object)} method to ensure that grouping on keys works properly.
* <p>
* This interface extends {@link org.apache.flink.types.Value} and requires to implement
* the serialization of its value.
*
* @see org.apache.flink.types.Value
* @see org.apache.flink.core.io.IOReadableWritable
* @see java.lang.Comparable
*
* @deprecated The Key type is a relict of a deprecated and removed API and will be removed
* in future (2.0) versions as well.
*/
@Deprecated
@PublicEvolving
public interface Key<T> extends Value, Comparable<T> {
/**
* All keys must override the hash-code function to generate proper deterministic hash codes,
* based on their contents.
*
* @return The hash code of the key
*/
public int hashCode();
/**
* Compares the object on equality with another object.
*
* @param other The other object to compare against.
*
* @return True, iff this object is identical to the other object, false otherwise.
*/
public boolean equals(Object other);
}
\ No newline at end of file
......@@ -36,7 +36,7 @@ import org.apache.flink.core.memory.MemorySegment;
* key length.
*/
@Public
public interface NormalizableKey<T> extends Comparable<T> {
public interface NormalizableKey<T> extends Comparable<T>, Key<T> {
/**
* Gets the maximal length of normalized keys that the data type would produce to determine
......
......@@ -221,7 +221,6 @@ under the License.
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.7.0</version>
<configuration>
<parameter>
<excludes>
......
......@@ -744,7 +744,6 @@ under the License.
<build>
<plugins>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册