You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/11/15 16:37:36 UTC

[flink] branch master updated (1edce4e -> e745bf1)

This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from 1edce4e  [hotfix] Skip log verification for the heavy deployment e2e test
     new efc3786  [hotfix] Log SlotReport in SlotManager#reportSlotStatus
     new e745bf1  [hotfix] Fix checkstyle violations in SlotReport and SlotStatus

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../runtime/resourcemanager/ResourceManager.java   | 19 +++++--------
 .../resourcemanager/slotmanager/SlotManager.java   |  2 +-
 .../flink/runtime/taskexecutor/SlotReport.java     |  9 +++++-
 .../flink/runtime/taskexecutor/SlotStatus.java     | 33 ++++++++++++++--------
 4 files changed, 37 insertions(+), 26 deletions(-)


[flink] 02/02: [hotfix] Fix checkstyle violations in SlotReport and SlotStatus

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit e745bf1ffaf770e12ac84e5a3a8daa8aca8a9682
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Thu Nov 15 14:58:05 2018 +0100

    [hotfix] Fix checkstyle violations in SlotReport and SlotStatus
---
 .../apache/flink/runtime/taskexecutor/SlotReport.java    |  2 +-
 .../apache/flink/runtime/taskexecutor/SlotStatus.java    | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java
index f59af99..9d8437a 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java
@@ -34,7 +34,7 @@ public class SlotReport implements Serializable, Iterable<SlotStatus> {
 
 	private static final long serialVersionUID = -3150175198722481689L;
 
-	/** The slots status of the TaskManager */
+	/** The slots status of the TaskManager. */
 	private final Collection<SlotStatus> slotsStatus;
 
 	public SlotReport() {
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java
index 3e996b6..83345c3 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java
@@ -34,16 +34,16 @@ public class SlotStatus implements Serializable {
 
 	private static final long serialVersionUID = 5099191707339664493L;
 
-	/** slotID to identify a slot */
+	/** SlotID to identify a slot. */
 	private final SlotID slotID;
 
-	/** the resource profile of the slot */
+	/** The resource profile of the slot. */
 	private final ResourceProfile resourceProfile;
 
-	/** if the slot is allocated, allocationId identify its allocation; else, allocationId is null */
+	/** If the slot is allocated, allocationId identify its allocation; else, allocationId is null. */
 	private final AllocationID allocationID;
 
-	/** if the slot is allocated, jobId identify which job this slot is allocated to; else, jobId is null */
+	/** If the slot is allocated, jobId identify which job this slot is allocated to; else, jobId is null. */
 	private final JobID jobID;
 
 	public SlotStatus(SlotID slotID, ResourceProfile resourceProfile) {
@@ -62,7 +62,7 @@ public class SlotStatus implements Serializable {
 	}
 
 	/**
-	 * Get the unique identification of this slot
+	 * Get the unique identification of this slot.
 	 *
 	 * @return The slot id
 	 */
@@ -71,7 +71,7 @@ public class SlotStatus implements Serializable {
 	}
 
 	/**
-	 * Get the resource profile of this slot
+	 * Get the resource profile of this slot.
 	 *
 	 * @return The resource profile
 	 */
@@ -80,7 +80,7 @@ public class SlotStatus implements Serializable {
 	}
 
 	/**
-	 * Get the allocation id of this slot
+	 * Get the allocation id of this slot.
 	 *
 	 * @return The allocation id if this slot is allocated, otherwise null
 	 */
@@ -89,7 +89,7 @@ public class SlotStatus implements Serializable {
 	}
 
 	/**
-	 * Get the job id of the slot allocated for
+	 * Get the job id of the slot allocated for.
 	 *
 	 * @return The job id if this slot is allocated, otherwise null
 	 */


[flink] 01/02: [hotfix] Log SlotReport in SlotManager#reportSlotStatus

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit efc378616d99ade39ca487c31dc85fb31d87b3e0
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Thu Nov 15 14:56:49 2018 +0100

    [hotfix] Log SlotReport in SlotManager#reportSlotStatus
---
 .../runtime/resourcemanager/ResourceManager.java      | 19 +++++++------------
 .../resourcemanager/slotmanager/SlotManager.java      |  2 +-
 .../apache/flink/runtime/taskexecutor/SlotReport.java |  7 +++++++
 .../apache/flink/runtime/taskexecutor/SlotStatus.java | 17 +++++++++++++----
 4 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java b/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
index cd4281e..f90f63a 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
@@ -1145,20 +1145,15 @@ public abstract class ResourceManager<WorkerType extends ResourceIDRetrievable>
 
 		@Override
 		public void reportPayload(final ResourceID resourceID, final SlotReport slotReport) {
-			runAsync(new Runnable() {
-				@Override
-				public void run() {
-					log.debug("Received new slot report from TaskManager {}.", resourceID);
-
-					final WorkerRegistration<WorkerType> workerRegistration = taskExecutors.get(resourceID);
+			runAsync(() -> {
+				final WorkerRegistration<WorkerType> workerRegistration = taskExecutors.get(resourceID);
 
-					if (workerRegistration == null) {
-						log.debug("Received slot report from TaskManager {} which is no longer registered.", resourceID);
-					} else {
-						InstanceID instanceId = workerRegistration.getInstanceID();
+				if (workerRegistration == null) {
+					log.debug("Received slot report from TaskManager {} which is no longer registered.", resourceID);
+				} else {
+					InstanceID instanceId = workerRegistration.getInstanceID();
 
-						slotManager.reportSlotStatus(instanceId, slotReport);
-					}
+					slotManager.reportSlotStatus(instanceId, slotReport);
 				}
 			});
 		}
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java b/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
index 2ef2b2f..1dd1693 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
@@ -402,7 +402,7 @@ public class SlotManager implements AutoCloseable {
 	public boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport) {
 		checkInit();
 
-		LOG.debug("Received slot report from instance {}.", instanceId);
+		LOG.debug("Received slot report from instance {}: {}.", instanceId, slotReport);
 
 		TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(instanceId);
 
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java
index 94ecaff..f59af99 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotReport.java
@@ -53,4 +53,11 @@ public class SlotReport implements Serializable, Iterable<SlotStatus> {
 	public Iterator<SlotStatus> iterator() {
 		return slotsStatus.iterator();
 	}
+
+	@Override
+	public String toString() {
+		return "SlotReport{" +
+			"slotsStatus=" + slotsStatus +
+			'}';
+	}
 }
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java
index a3bc4a6..3e996b6 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/SlotStatus.java
@@ -51,10 +51,10 @@ public class SlotStatus implements Serializable {
 	}
 
 	public SlotStatus(
-			SlotID slotID,
-			ResourceProfile resourceProfile,
-			JobID jobID,
-			AllocationID allocationID) {
+		SlotID slotID,
+		ResourceProfile resourceProfile,
+		JobID jobID,
+		AllocationID allocationID) {
 		this.slotID = checkNotNull(slotID, "slotID cannot be null");
 		this.resourceProfile = checkNotNull(resourceProfile, "profile cannot be null");
 		this.allocationID = allocationID;
@@ -130,4 +130,13 @@ public class SlotStatus implements Serializable {
 		return result;
 	}
 
+	@Override
+	public String toString() {
+		return "SlotStatus{" +
+			"slotID=" + slotID +
+			", resourceProfile=" + resourceProfile +
+			", allocationID=" + allocationID +
+			", jobID=" + jobID +
+			'}';
+	}
 }