flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [1/3] incubator-flink git commit: [Java API] Fix various warnings
Date Wed, 26 Nov 2014 12:00:24 GMT
Repository: incubator-flink
Updated Branches:
  refs/heads/master 8724bf7c8 -> 87497b723


[Java API] Fix various warnings


Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/606a6d46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/606a6d46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/606a6d46

Branch: refs/heads/master
Commit: 606a6d468972cbc6b16c03e41735bfea883b1b00
Parents: 8724bf7
Author: Stephan Ewen <sewen@apache.org>
Authored: Tue Nov 25 14:48:34 2014 +0100
Committer: Stephan Ewen <sewen@apache.org>
Committed: Tue Nov 25 21:02:01 2014 +0100

----------------------------------------------------------------------
 .../apache/flink/api/java/io/TypeSerializerInputFormat.java | 3 +++
 .../flink/api/java/io/TypeSerializerOutputFormat.java       | 9 ++++++---
 .../apache/flink/api/java/typeutils/GenericTypeInfo.java    | 8 ++------
 .../java/org/apache/flink/test/operators/CoGroupITCase.java | 1 +
 .../java/org/apache/flink/test/operators/CrossITCase.java   | 1 +
 .../java/org/apache/flink/test/operators/JoinITCase.java    | 1 +
 .../java/org/apache/flink/test/operators/MapITCase.java     | 1 +
 .../java/org/apache/flink/test/operators/ReduceITCase.java  | 1 +
 .../java/org/apache/flink/test/operators/UnionITCase.java   | 4 +++-
 .../org/apache/flink/test/operators/UnionSinkITCase.java    | 3 ++-
 10 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerInputFormat.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerInputFormat.java
b/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerInputFormat.java
index bdd54a9..0fca3e2 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerInputFormat.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerInputFormat.java
@@ -29,6 +29,9 @@ import java.io.IOException;
  * @param <T>
  */
 public class TypeSerializerInputFormat<T> extends BinaryInputFormat<T> {
+
+	private static final long serialVersionUID = 2123068581665107480L;
+
 	private TypeSerializer<T> serializer;
 
 	public TypeSerializerInputFormat(TypeSerializer<T> serializer){

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerOutputFormat.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerOutputFormat.java
b/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerOutputFormat.java
index 5c316a3..a9b93ee 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerOutputFormat.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/io/TypeSerializerOutputFormat.java
@@ -30,9 +30,11 @@ import java.io.IOException;
  * Stores elements by serializing them with their type serializer.
  * @param <T> type parameter
  */
-public class TypeSerializerOutputFormat<T> extends BinaryOutputFormat<T> implements
-		InputTypeConfigurable {
-	private TypeSerializer<T> serializer = null;
+public class TypeSerializerOutputFormat<T> extends BinaryOutputFormat<T> implements
InputTypeConfigurable {
+
+	private static final long serialVersionUID = -6653022644629315158L;
+	
+	private TypeSerializer<T> serializer;
 
 	@Override
 	protected void serialize(T record, DataOutputView dataOutput) throws IOException {
@@ -49,6 +51,7 @@ public class TypeSerializerOutputFormat<T> extends BinaryOutputFormat<T>
impleme
 	}
 
 	@Override
+	@SuppressWarnings("unchecked")
 	public void setInputType(TypeInformation<?> type) {
 		serializer = (TypeSerializer<T>) type.createSerializer();
 	}

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-java/src/main/java/org/apache/flink/api/java/typeutils/GenericTypeInfo.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/GenericTypeInfo.java
b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/GenericTypeInfo.java
index 7b0c5bf..8a1406b 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/GenericTypeInfo.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/GenericTypeInfo.java
@@ -28,17 +28,14 @@ import org.apache.flink.api.java.typeutils.runtime.GenericTypeComparator;
 import java.util.Collection;
 
 
-/**
- *
- */
 public class GenericTypeInfo<T> extends TypeInformation<T> implements AtomicType<T>
{
 
 	private final Class<T> typeClass;
-	private final static Class[] unsupportedByAvro = new Class[] {Collection.class};
+	private final static Class<?>[] unsupportedByAvro = new Class[] {Collection.class};
 	
 	public GenericTypeInfo(Class<T> typeClass) {
 		this.typeClass = typeClass;
-		for(Class unsupported: unsupportedByAvro) {
+		for (Class<?> unsupported: unsupportedByAvro) {
 			if(unsupported.isAssignableFrom(typeClass)) {
 				throw new RuntimeException("The type '"+typeClass+"' is currently not supported " +
 						"by the Avro Serializer that Flink is using for serializing " +
@@ -52,7 +49,6 @@ public class GenericTypeInfo<T> extends TypeInformation<T> implements
AtomicType
 		return false;
 	}
 
-
 	@Override
 	public boolean isTupleType() {
 		return false;

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-tests/src/test/java/org/apache/flink/test/operators/CoGroupITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/CoGroupITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/operators/CoGroupITCase.java
index c6b270d..34c8b98 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/CoGroupITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/CoGroupITCase.java
@@ -43,6 +43,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
+@SuppressWarnings("deprecation")
 @RunWith(Parameterized.class)
 public class CoGroupITCase extends RecordAPITestBase {
 

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-tests/src/test/java/org/apache/flink/test/operators/CrossITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/CrossITCase.java b/flink-tests/src/test/java/org/apache/flink/test/operators/CrossITCase.java
index bac631b..dc36349 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/CrossITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/CrossITCase.java
@@ -42,6 +42,7 @@ import java.io.Serializable;
 import java.util.Collection;
 import java.util.LinkedList;
 
+@SuppressWarnings("deprecation")
 @RunWith(Parameterized.class)
 public class CrossITCase extends RecordAPITestBase {
 

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-tests/src/test/java/org/apache/flink/test/operators/JoinITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/JoinITCase.java b/flink-tests/src/test/java/org/apache/flink/test/operators/JoinITCase.java
index 8f9913d..f5fd9db 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/JoinITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/JoinITCase.java
@@ -46,6 +46,7 @@ import java.io.Serializable;
 import java.util.Collection;
 import java.util.LinkedList;
 
+@SuppressWarnings("deprecation")
 @RunWith(Parameterized.class)
 public class JoinITCase extends RecordAPITestBase {
 

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-tests/src/test/java/org/apache/flink/test/operators/MapITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/MapITCase.java b/flink-tests/src/test/java/org/apache/flink/test/operators/MapITCase.java
index 2ca4e1e..0d7bfdf 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/MapITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/MapITCase.java
@@ -45,6 +45,7 @@ import java.io.Serializable;
 import java.util.Collection;
 import java.util.LinkedList;
 
+@SuppressWarnings("deprecation")
 @RunWith(Parameterized.class)
 public class MapITCase extends RecordAPITestBase {
 	

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-tests/src/test/java/org/apache/flink/test/operators/ReduceITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/ReduceITCase.java b/flink-tests/src/test/java/org/apache/flink/test/operators/ReduceITCase.java
index e90ac0b..07c735d 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/ReduceITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/ReduceITCase.java
@@ -48,6 +48,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
 
+@SuppressWarnings("deprecation")
 @RunWith(Parameterized.class)
 public class ReduceITCase extends RecordAPITestBase {
 

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java b/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
index e2a6078..481ae2d 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/UnionITCase.java
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.LinkedList;
+
 import org.apache.flink.api.common.Plan;
 import org.apache.flink.api.java.record.functions.MapFunction;
 import org.apache.flink.api.java.record.io.DelimitedInputFormat;
@@ -43,6 +44,7 @@ import org.junit.runners.Parameterized.Parameters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@SuppressWarnings("deprecation")
 @RunWith(Parameterized.class)
 public class UnionITCase extends RecordAPITestBase {
 	private static final Logger LOG = LoggerFactory.getLogger(UnionITCase.class);
@@ -99,7 +101,7 @@ public class UnionITCase extends RecordAPITestBase {
 		}
 	}
 
-	@SuppressWarnings({ "deprecation", "unchecked" })
+	@SuppressWarnings("unchecked")
 	@Override
 	protected Plan getTestJob() {
 		String input1Path = config.getString("UnionTest#Input1Path", "").equals("empty") ? emptyInPath
: inPath;

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/606a6d46/flink-tests/src/test/java/org/apache/flink/test/operators/UnionSinkITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/operators/UnionSinkITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/operators/UnionSinkITCase.java
index dfbb371..1c7bd0c 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/operators/UnionSinkITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/operators/UnionSinkITCase.java
@@ -44,6 +44,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
+@SuppressWarnings("deprecation")
 @RunWith(Parameterized.class)
 public class UnionSinkITCase extends RecordAPITestBase {
 	
@@ -99,7 +100,7 @@ public class UnionSinkITCase extends RecordAPITestBase {
 		}
 	}
 
-	@SuppressWarnings({ "deprecation", "unchecked" })
+	@SuppressWarnings("unchecked")
 	@Override
 	protected JobGraph getJobGraph() throws Exception {
 		


Mime
View raw message