flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject incubator-flink git commit: Fixes FLINK-1276
Date Tue, 25 Nov 2014 12:38:16 GMT
Repository: incubator-flink
Updated Branches:
  refs/heads/master 6dfb3fad9 -> 4838efe56


Fixes FLINK-1276

Closes #229


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

Branch: refs/heads/master
Commit: 4838efe562da51848cd4a18c6b45de4024a14b35
Parents: 6dfb3fa
Author: Suneel Marthi <suneel.marthi@gmail.com>
Authored: Mon Nov 24 20:17:51 2014 -0500
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Tue Nov 25 13:37:37 2014 +0100

----------------------------------------------------------------------
 .../apache/flink/runtime/instance/Instance.java | 20 ++++++-------
 .../runtime/jobmanager/scheduler/Scheduler.java |  2 +-
 .../scheduler/SlotAvailabilityListener.java     | 30 ++++++++++++++++++++
 .../scheduler/SlotAvailablilityListener.java    | 30 --------------------
 4 files changed, 41 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/4838efe5/flink-runtime/src/main/java/org/apache/flink/runtime/instance/Instance.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/instance/Instance.java b/flink-runtime/src/main/java/org/apache/flink/runtime/instance/Instance.java
index 0cafcec..ff9a87d 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/instance/Instance.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/instance/Instance.java
@@ -29,7 +29,7 @@ import java.util.Set;
 
 import org.apache.flink.runtime.ipc.RPC;
 import org.apache.flink.runtime.jobgraph.JobID;
-import org.apache.flink.runtime.jobmanager.scheduler.SlotAvailablilityListener;
+import org.apache.flink.runtime.jobmanager.scheduler.SlotAvailabilityListener;
 import org.apache.flink.runtime.net.NetUtils;
 import org.apache.flink.runtime.protocols.TaskOperationProtocol;
 import org.eclipse.jetty.util.log.Log;
@@ -54,7 +54,7 @@ public class Instance {
 	/** The number of task slots available on the node */
 	private final int numberOfSlots;
 
-	/** A list of available slot positons */
+	/** A list of available slot positions */
 	private final Queue<Integer> availableSlots;
 	
 	/** Allocated slots on this instance */
@@ -62,7 +62,7 @@ public class Instance {
 
 	
 	/** A listener to be notified upon new slot availability */
-	private SlotAvailablilityListener slotListener;
+	private SlotAvailabilityListener slotAvailabilityListener;
 	
 	
 	/** The RPC proxy to send calls to the task manager represented by this instance */
@@ -140,7 +140,7 @@ public class Instance {
 		synchronized (instanceLock) {
 			
 			// no more notifications for the slot releasing
-			this.slotListener = null;
+			this.slotAvailabilityListener = null;
 			
 			for (AllocatedSlot slot : allocatedSlots) {
 				slot.releaseSlot();
@@ -267,8 +267,8 @@ public class Instance {
 				if (this.allocatedSlots.remove(slot)) {
 					this.availableSlots.add(slot.getSlotNumber());
 					
-					if (this.slotListener != null) {
-						this.slotListener.newSlotAvailable(this);
+					if (this.slotAvailabilityListener != null) {
+						this.slotAvailabilityListener.newSlotAvailable(this);
 					}
 					
 					return true;
@@ -309,19 +309,19 @@ public class Instance {
 	// Listeners
 	// --------------------------------------------------------------------------------------------
 	
-	public void setSlotAvailabilityListener(SlotAvailablilityListener slotListener) {
+	public void setSlotAvailabilityListener(SlotAvailabilityListener slotAvailabilityListener)
{
 		synchronized (instanceLock) {
-			if (this.slotListener != null) {
+			if (this.slotAvailabilityListener != null) {
 				throw new IllegalStateException("Instance has already a slot listener.");
 			} else {
-				this.slotListener = slotListener;
+				this.slotAvailabilityListener = slotAvailabilityListener;
 			}
 		}
 	}
 	
 	public void removeSlotListener() {
 		synchronized (instanceLock) {
-			this.slotListener = null;
+			this.slotAvailabilityListener = null;
 		}
 	}
 	

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/4838efe5/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
index 9f6e590..7807b73 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
@@ -41,7 +41,7 @@ import org.apache.flink.util.ExceptionUtils;
  * The scheduler is responsible for distributing the ready-to-run tasks and assigning them
to instances and
  * slots.
  */
-public class Scheduler implements InstanceListener, SlotAvailablilityListener {
+public class Scheduler implements InstanceListener, SlotAvailabilityListener {
 
 	static final Logger LOG = LoggerFactory.getLogger(Scheduler.class);
 	

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/4838efe5/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailabilityListener.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailabilityListener.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailabilityListener.java
new file mode 100644
index 0000000..639d2b7
--- /dev/null
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailabilityListener.java
@@ -0,0 +1,30 @@
+/*
+ * 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.runtime.jobmanager.scheduler;
+
+import org.apache.flink.runtime.instance.Instance;
+
+/**
+ * A SlotAvailabilityListener can be notified when new {@link org.apache.flink.runtime.instance.AllocatedSlot}s
become available
+ * on an {@link org.apache.flink.runtime.instance.Instance}.
+ */
+public interface SlotAvailabilityListener {
+
+	void newSlotAvailable(Instance instance);
+}

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/4838efe5/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailablilityListener.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailablilityListener.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailablilityListener.java
deleted file mode 100644
index 61d826d..0000000
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotAvailablilityListener.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.runtime.jobmanager.scheduler;
-
-import org.apache.flink.runtime.instance.Instance;
-
-/**
- * A SlotAvailablilityListener can be notified when new {@link org.apache.flink.runtime.instance.AllocatedSlot}s
become available
- * on an {@link org.apache.flink.runtime.instance.Instance}.
- */
-public interface SlotAvailablilityListener {
-
-	void newSlotAvailable(Instance instance);
-}


Mime
View raw message