You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2017/06/03 06:06:04 UTC
[3/6] flink git commit: [FLINK-6824] Activate checkstyle for
runtime/event
[FLINK-6824] Activate checkstyle for runtime/event
This closes #4056.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/9d9732bf
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/9d9732bf
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/9d9732bf
Branch: refs/heads/master
Commit: 9d9732bf7410e36ac29a884d126294b8c753836e
Parents: 22290dd
Author: zentol <ch...@apache.org>
Authored: Thu Jun 1 12:37:45 2017 +0200
Committer: zentol <ch...@apache.org>
Committed: Fri Jun 2 22:22:09 2017 +0200
----------------------------------------------------------------------
flink-runtime/pom.xml | 1 -
.../flink/runtime/event/task/IntegerTaskEvent.java | 17 +++++------------
.../flink/runtime/event/task/StringTaskEvent.java | 11 ++++-------
.../flink/runtime/event/task/TaskEventTest.java | 13 ++++++-------
4 files changed, 15 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/9d9732bf/flink-runtime/pom.xml
----------------------------------------------------------------------
diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml
index 77dfeeb..7ce3de5 100644
--- a/flink-runtime/pom.xml
+++ b/flink-runtime/pom.xml
@@ -428,7 +428,6 @@ under the License.
**/runtime/clusterframework/**,
**/runtime/concurrent/**,
**/runtime/deployment/**,
- **/runtime/event/**,
**/runtime/execution/**,
**/runtime/executiongraph/**,
**/runtime/filecache/**,
http://git-wip-us.apache.org/repos/asf/flink/blob/9d9732bf/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/IntegerTaskEvent.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/IntegerTaskEvent.java b/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/IntegerTaskEvent.java
index cc67482..98a14db 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/IntegerTaskEvent.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/IntegerTaskEvent.java
@@ -16,18 +16,16 @@
* limitations under the License.
*/
-
package org.apache.flink.runtime.event.task;
-import java.io.IOException;
-
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.runtime.event.TaskEvent;
+import java.io.IOException;
+
/**
* This class provides a simple implementation of an event that holds an integer value.
- *
*/
public class IntegerTaskEvent extends TaskEvent {
@@ -46,9 +44,8 @@ public class IntegerTaskEvent extends TaskEvent {
/**
* Constructs a new integer task event.
- *
- * @param value
- * the integer value to be transported inside this integer task event
+ *
+ * @param value the integer value to be transported inside this integer task event
*/
public IntegerTaskEvent(final int value) {
this.value = value;
@@ -56,33 +53,29 @@ public class IntegerTaskEvent extends TaskEvent {
/**
* Returns the stored integer value.
- *
+ *
* @return the stored integer value or <code>-1</code> if no value has been set
*/
public int getInteger() {
return this.value;
}
-
@Override
public void write(final DataOutputView out) throws IOException {
out.writeInt(this.value);
}
-
@Override
public void read(final DataInputView in) throws IOException {
this.value = in.readInt();
}
-
@Override
public int hashCode() {
return this.value;
}
-
@Override
public boolean equals(final Object obj) {
http://git-wip-us.apache.org/repos/asf/flink/blob/9d9732bf/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/StringTaskEvent.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/StringTaskEvent.java b/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/StringTaskEvent.java
index 9095cc2..6e32e19 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/StringTaskEvent.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/StringTaskEvent.java
@@ -18,13 +18,13 @@
package org.apache.flink.runtime.event.task;
-import java.io.IOException;
-
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.runtime.event.TaskEvent;
import org.apache.flink.util.StringUtils;
+import java.io.IOException;
+
/**
* This class provides a simple implementation of an event that holds a string value.
*/
@@ -42,7 +42,7 @@ public class StringTaskEvent extends TaskEvent {
/**
* Constructs a new string task event with the given string message.
- *
+ *
* @param message
* the string message that shall be stored in this event
*/
@@ -52,14 +52,13 @@ public class StringTaskEvent extends TaskEvent {
/**
* Returns the stored string.
- *
+ *
* @return the stored string or <code>null</code> if no string is set
*/
public String getString() {
return this.message;
}
-
@Override
public void write(DataOutputView out) throws IOException {
StringUtils.writeNullableString(this.message, out);
@@ -70,7 +69,6 @@ public class StringTaskEvent extends TaskEvent {
this.message = StringUtils.readNullableString(in);
}
-
@Override
public int hashCode() {
if (this.message == null) {
@@ -80,7 +78,6 @@ public class StringTaskEvent extends TaskEvent {
return this.message.hashCode();
}
-
@Override
public boolean equals(final Object obj) {
if (!(obj instanceof StringTaskEvent)) {
http://git-wip-us.apache.org/repos/asf/flink/blob/9d9732bf/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/TaskEventTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/TaskEventTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/TaskEventTest.java
index 902f0bf..1e9233f 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/TaskEventTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/event/task/TaskEventTest.java
@@ -18,20 +18,19 @@
package org.apache.flink.runtime.event.task;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
import org.apache.flink.util.InstantiationUtil;
import org.junit.Test;
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* This class contains serialization tests concerning task events derived from
* {@link org.apache.flink.runtime.event.AbstractEvent}.
- *
*/
public class TaskEventTest {
/**