You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by hy...@apache.org on 2013/05/04 09:09:21 UTC

git commit: TAJO-37: Remove obsolete classes WorkerEventDispatcher, WorkerEvent and WorkerEventType. (sunny.1324 via hyunsik)

Updated Branches:
  refs/heads/master 44b0d2232 -> 6628017a5


TAJO-37: Remove obsolete classes WorkerEventDispatcher, WorkerEvent and WorkerEventType. (sunny.1324 via hyunsik)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tajo/commit/6628017a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/6628017a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/6628017a

Branch: refs/heads/master
Commit: 6628017a56d836d2ec67a89f5ae44014dcad8083
Parents: 44b0d22
Author: Hyunsik Choi <hy...@apache.org>
Authored: Sat May 4 15:59:58 2013 +0900
Committer: Hyunsik Choi <hy...@apache.org>
Committed: Sat May 4 15:59:58 2013 +0900

----------------------------------------------------------------------
 CHANGES.txt                                        |    3 +
 .../src/main/java/tajo/master/TajoMaster.java      |   21 --------
 .../tajo/master/cluster/event/WorkerEvent.java     |   37 ---------------
 .../tajo/master/cluster/event/WorkerEventType.java |   29 -----------
 4 files changed, 3 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/6628017a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 413be47..1a6a6db 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,9 @@ Release 0.2.0 - unreleased
 
   IMPROVEMENTS
 
+    TAJO-37: Remove obsolete classes WorkerEventDispatcher, WorkerEvent and 
+	WorkerEventType. (sunny.1324 via hyunsik)
+
     TAJO-50: Cleanup SubQuery. (hyunsik)
 
     TAJO-44: Adopt AMRMClient to RMContainerAllocator, RMCommunicator. (hyunsik)

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/6628017a/tajo-core/tajo-core-backend/src/main/java/tajo/master/TajoMaster.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/tajo/master/TajoMaster.java b/tajo-core/tajo-core-backend/src/main/java/tajo/master/TajoMaster.java
index 08cc735..66f4446 100644
--- a/tajo-core/tajo-core-backend/src/main/java/tajo/master/TajoMaster.java
+++ b/tajo-core/tajo-core-backend/src/main/java/tajo/master/TajoMaster.java
@@ -51,7 +51,6 @@ import tajo.engine.MasterWorkerProtos.TaskStatusProto;
 import tajo.engine.function.Country;
 import tajo.engine.function.InCountry;
 import tajo.engine.function.builtin.*;
-import tajo.master.cluster.event.WorkerEvent;
 import tajo.master.event.QueryEvent;
 import tajo.master.event.QueryEventType;
 import tajo.storage.StorageManager;
@@ -265,26 +264,6 @@ public class TajoMaster extends CompositeService {
     return this.context;
   }
 
-
-  static class WorkerEventDispatcher implements EventHandler<WorkerEvent> {
-    List<EventHandler<WorkerEvent>> listofHandlers;
-
-    public WorkerEventDispatcher() {
-      listofHandlers = new ArrayList<EventHandler<WorkerEvent>>();
-    }
-
-    @Override
-    public void handle(WorkerEvent event) {
-      for (EventHandler<WorkerEvent> handler: listofHandlers) {
-        handler.handle(event);
-      }
-    }
-
-    public void addHandler(EventHandler<WorkerEvent> handler) {
-      listofHandlers.add(handler);
-    }
-  }
-
   protected void addIfService(Object object) {
     if (object instanceof Service) {
       addService((Service) object);

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/6628017a/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEvent.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEvent.java b/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEvent.java
deleted file mode 100644
index 545eb45..0000000
--- a/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEvent.java
+++ /dev/null
@@ -1,37 +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 tajo.master.cluster.event;
-
-import org.apache.hadoop.yarn.event.AbstractEvent;
-
-import java.util.Collection;
-
-public class WorkerEvent extends AbstractEvent<WorkerEventType> {
-  private Collection<String> workerName;
-
-  public WorkerEvent(WorkerEventType workerEventType,
-                     Collection<String> workerNames) {
-    super(workerEventType);
-    this.workerName = workerNames;
-  }
-
-  public Collection<String> getWorkerNames() {
-    return workerName;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/6628017a/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEventType.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEventType.java b/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEventType.java
deleted file mode 100644
index 8a9d69c..0000000
--- a/tajo-core/tajo-core-backend/src/main/java/tajo/master/cluster/event/WorkerEventType.java
+++ /dev/null
@@ -1,29 +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 tajo.master.cluster.event;
-
-/**
- * Event Types handled by WorkerCommunicator and ClusterManager
- */
-public enum WorkerEventType {
-
-  // Producer: WorkerTracker
-  JOIN,
-  LEAVE
-}