提交 7a5e3e40 编写于 作者: S Stephan Ewen

Fix various deprecation warnings in tests

上级 624fe959
......@@ -275,7 +275,6 @@ public class JavaApiPostPass implements OptimizerPostPass {
throw new RuntimeException("Wrong operator type found in post pass.");
}
}
private static <T> TypeSerializerFactory<?> createSerializer(TypeInformation<T> typeInfo) {
TypeSerializer<T> serializer = typeInfo.createSerializer();
......@@ -287,8 +286,6 @@ public class JavaApiPostPass implements OptimizerPostPass {
}
}
@SuppressWarnings("unchecked")
private static <T> TypeComparatorFactory<?> createComparator(TypeInformation<T> typeInfo, FieldList keys, boolean[] sortOrder) {
TypeComparator<T> comparator;
......
......@@ -43,7 +43,7 @@ import org.junit.Test;
* Tests that validate optimizer choices when using operators that are requesting certain specific execution
* strategies.
*/
@SuppressWarnings("serial")
@SuppressWarnings({"serial", "deprecation"})
public class AdditionalOperatorsTest extends CompilerTestBase {
@Test
......
......@@ -58,7 +58,7 @@ import org.apache.flink.compiler.util.IdentityReduce;
import org.apache.flink.types.IntValue;
import org.apache.flink.types.LongValue;
@SuppressWarnings("serial")
@SuppressWarnings({"serial", "deprecation"})
public class BranchingPlansCompilerTest extends CompilerTestBase {
......@@ -358,7 +358,7 @@ public class BranchingPlansCompilerTest extends CompilerTestBase {
}
}
@SuppressWarnings({ "unchecked", "deprecation" })
@SuppressWarnings("unchecked")
@Test
public void testBranchEachContractType() {
try {
......
......@@ -44,6 +44,7 @@ import org.junit.Before;
/**
*
*/
@SuppressWarnings("deprecation")
public abstract class CompilerTestBase implements java.io.Serializable {
private static final long serialVersionUID = 1L;
......
......@@ -20,7 +20,6 @@
package org.apache.flink.compiler;
import org.junit.Assert;
import org.apache.flink.api.common.Plan;
import org.apache.flink.api.java.record.operators.FileDataSink;
import org.apache.flink.api.java.record.operators.FileDataSource;
......@@ -52,7 +51,7 @@ import org.junit.Test;
* parallelism between tasks is increased or decreased.
* </ul>
*/
@SuppressWarnings("serial")
@SuppressWarnings({"serial", "deprecation"})
public class DOPChangeTest extends CompilerTestBase {
/**
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.compiler;
import static org.junit.Assert.fail;
......@@ -48,13 +47,12 @@ import org.apache.flink.types.StringValue;
import org.junit.Assert;
import org.junit.Test;
/**
* This test case has been created to validate that correct strategies are used if orders within groups are
* requested.
*/
@SuppressWarnings("serial")
public class GroupOrderTest extends CompilerTestBase {
@SuppressWarnings({"serial", "deprecation"})
public class GroupOrderTest extends CompilerTestBase {
@Test
public void testReduceWithGroupOrder() {
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.compiler;
import org.apache.flink.api.common.Plan;
......@@ -41,9 +40,8 @@ import org.junit.Test;
* <li> Ticket 158
* </ul>
*/
@SuppressWarnings("serial")
public class HardPlansCompilationTest extends CompilerTestBase
{
@SuppressWarnings({"serial", "deprecation"})
public class HardPlansCompilationTest extends CompilerTestBase {
/**
* Source -> Map -> Reduce -> Cross -> Reduce -> Cross -> Reduce ->
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.compiler;
import static org.junit.Assert.fail;
......@@ -37,7 +36,7 @@ import org.junit.Test;
* This test case has been created to validate a bug that occurred when
* the ReduceOperator was used without a grouping key.
*/
@SuppressWarnings("serial")
@SuppressWarnings({"serial", "deprecation"})
public class ReduceAllTest extends CompilerTestBase {
@Test
......
......@@ -49,10 +49,10 @@ import org.apache.flink.compiler.util.DummyOutputFormat;
import org.apache.flink.compiler.util.IdentityReduce;
@SuppressWarnings("serial")
@SuppressWarnings({"serial", "deprecation"})
public class UnionPropertyPropagationTest extends CompilerTestBase {
@SuppressWarnings({ "deprecation", "unchecked" })
@SuppressWarnings("unchecked")
@Test
public void testUnionPropertyOldApiPropagation() {
// construct the plan
......
......@@ -51,6 +51,7 @@ import org.junit.Test;
* Tests that validate optimizer choices when using operators that are requesting certain specific execution
* strategies.
*/
@SuppressWarnings("deprecation")
public class WorksetIterationsRecordApiCompilerTest extends CompilerTestBase {
private static final long serialVersionUID = 1L;
......
......@@ -25,6 +25,7 @@ import org.apache.flink.api.java.record.functions.CoGroupFunction;
import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
public class DummyCoGroupStub extends CoGroupFunction implements Serializable {
private static final long serialVersionUID = 1L;
......
......@@ -21,6 +21,7 @@ package org.apache.flink.compiler.util;
import org.apache.flink.api.java.record.functions.CrossFunction;
import org.apache.flink.types.Record;
@SuppressWarnings("deprecation")
public class DummyCrossStub extends CrossFunction {
private static final long serialVersionUID = 1L;
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.compiler.util;
import org.apache.flink.api.common.io.statistics.BaseStatistics;
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.compiler.util;
import java.io.Serializable;
......@@ -26,6 +25,7 @@ import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFie
import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
@ConstantFieldsFirstExcept({})
public class DummyMatchStub extends JoinFunction implements Serializable {
private static final long serialVersionUID = 1L;
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.compiler.util;
import java.io.Serializable;
......@@ -25,7 +24,7 @@ import org.apache.flink.api.java.record.functions.JoinFunction;
import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
public class DummyNonPreservingMatchStub extends JoinFunction implements Serializable {
private static final long serialVersionUID = 1L;
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.compiler.util;
import java.io.Serializable;
......@@ -26,6 +25,7 @@ import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFie
import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
@ConstantFieldsExcept({})
public final class IdentityMap extends MapFunction implements Serializable {
private static final long serialVersionUID = 1L;
......
......@@ -26,6 +26,7 @@ import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFie
import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
@ConstantFieldsExcept({})
public final class IdentityReduce extends ReduceFunction implements Serializable {
private static final long serialVersionUID = 1L;
......
......@@ -45,6 +45,7 @@ import org.junit.runners.Parameterized.Parameters;
/**
* To be finished !!! Didn't test with iterations yet;-(
*/
@SuppressWarnings("deprecation")
@RunWith(Parameterized.class)
public class AccumulatorIterativeITCase extends RecordAPITestBase {
......
......@@ -36,6 +36,7 @@ import org.apache.flink.types.Record;
import org.apache.flink.types.StringValue;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
public class BroadcastBranchingITCase extends RecordAPITestBase {
private static final String SC1_ID_ABC = "1 61 6 29\n2 7 13 10\n3 8 13 27\n";
......
......@@ -53,6 +53,7 @@ import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
import org.junit.Assert;
@SuppressWarnings("deprecation")
public class BroadcastVarsNepheleITCase extends RecordAPITestBase {
private static final long SEED_POINTS = 0xBADC0FFEEBEEFL;
......
......@@ -31,6 +31,7 @@ import org.apache.flink.test.recordJobs.util.InfiniteIntegerInputFormat;
import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
public class MapCancelingITCase extends CancellingTestBase {
private static final int DOP = 4;
......
......@@ -35,6 +35,7 @@ import org.apache.flink.types.IntValue;
import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
public class MatchJoinCancelingITCase extends CancellingTestBase {
private static final int DOP = 4;
......
......@@ -37,7 +37,7 @@ import org.apache.flink.test.recordJobs.kmeans.KMeansSingleStep;
import org.junit.Assert;
import org.junit.Test;
@SuppressWarnings("deprecation")
public class KMeansSingleStepTest extends CompilerTestBase {
private static final String DATAPOINTS = "Data Points";
......
......@@ -41,6 +41,7 @@ import org.junit.Test;
/**
* Tests TPCH Q3 (simplified) under various input conditions.
*/
@SuppressWarnings("deprecation")
public class RelationalQueryCompilerTest extends CompilerTestBase {
private static final String ORDERS = "Orders";
......
......@@ -47,9 +47,7 @@ import org.apache.flink.types.StringValue;
import org.junit.Assert;
import org.junit.Test;
/**
*
*/
@SuppressWarnings("deprecation")
public class WordCountCompilerTest extends CompilerTestBase {
/**
......
......@@ -55,9 +55,7 @@ import org.apache.flink.util.Collector;
import org.junit.Assert;
import org.junit.Test;
/**
*
*/
@SuppressWarnings("deprecation")
public class ConnectedComponentsTest extends CompilerTestBase {
private static final String VERTEX_SOURCE = "Vertices";
......
......@@ -42,7 +42,7 @@ import org.apache.flink.test.recordJobs.kmeans.KMeansBroadcast;
import org.junit.Assert;
import org.junit.Test;
@SuppressWarnings("deprecation")
public class IterativeKMeansTest extends CompilerTestBase {
private static final String DATAPOINTS = "Data Points";
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.test.distributedCache;
import java.io.BufferedReader;
......@@ -42,10 +41,10 @@ import org.apache.flink.types.Record;
import org.apache.flink.types.StringValue;
import org.apache.flink.util.Collector;
/**
* Test the distributed cache via using the cache file to do a selection on the input
*/
@SuppressWarnings("deprecation")
public class DistributedCacheTest extends RecordAPITestBase {
public static final String cacheData = "machen\n" + "zeit\n" + "heerscharen\n" + "keiner\n" + "meine\n"
......
......@@ -30,7 +30,7 @@ import org.apache.flink.util.Collector;
import java.io.Serializable;
import java.util.Date;
@SuppressWarnings("serial")
public class WordCountNestedPOJOITCase extends JavaProgramTestBase implements Serializable {
private static final long serialVersionUID = 1L;
protected String textPath;
......
......@@ -16,7 +16,6 @@
* limitations under the License.
*/
package org.apache.flink.test.failingPrograms;
import org.apache.flink.api.common.Plan;
......@@ -40,6 +39,7 @@ import org.apache.flink.util.Collector;
/**
* Tests whether the system recovers from a runtime exception from the user code.
*/
@SuppressWarnings("deprecation")
public class TaskFailureITCase extends FailingTestBase {
private static final int DOP = 4;
......
......@@ -43,6 +43,7 @@ import org.apache.flink.types.Record;
import org.apache.flink.util.Collector;
@SuppressWarnings("deprecation")
public class CoGroupConnectedComponentsITCase extends RecordAPITestBase {
private static final long SEED = 0xBADC0FFEEBEEFL;
......
......@@ -47,6 +47,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@SuppressWarnings("deprecation")
@RunWith(Parameterized.class)
public class ConnectedComponentsWithDeferredUpdateITCase extends RecordAPITestBase {
......
......@@ -45,6 +45,7 @@ import org.apache.flink.util.Collector;
/**
* Tests a bug that prevented that the solution set can be on both sides of the match/cogroup function.
*/
@SuppressWarnings("deprecation")
public class ConnectedComponentsWithSolutionSetFirstITCase extends RecordAPITestBase {
private static final long SEED = 0xBADC0FFEEBEEFL;
......
......@@ -37,6 +37,7 @@ import org.apache.flink.types.StringValue;
import org.apache.flink.util.Collector;
import org.junit.Assert;
@SuppressWarnings("deprecation")
public class IterationTerminationWithTerminationTail extends RecordAPITestBase {
private static final String INPUT = "1\n" + "2\n" + "3\n" + "4\n" + "5\n";
......
......@@ -37,7 +37,7 @@ import org.apache.flink.types.StringValue;
import org.apache.flink.util.Collector;
import org.junit.Assert;
@SuppressWarnings("deprecation")
public class IterationTerminationWithTwoTails extends RecordAPITestBase {
private static final String INPUT = "1\n" + "2\n" + "3\n" + "4\n" + "5\n";
......
......@@ -35,7 +35,7 @@ import org.apache.flink.types.StringValue;
import org.apache.flink.util.Collector;
import org.junit.Assert;
@SuppressWarnings("deprecation")
public class IterationWithAllReducerITCase extends RecordAPITestBase {
private static final String INPUT = "1\n" + "1\n" + "1\n" + "1\n" + "1\n" + "1\n" + "1\n" + "1\n";
......
......@@ -41,6 +41,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@SuppressWarnings("deprecation")
@RunWith(Parameterized.class)
public class IterationWithChainingITCase extends RecordAPITestBase {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册