hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chl...@apache.org
Subject hama git commit: Add Event, State for state transition.
Date Sat, 24 Feb 2018 15:31:51 GMT
Repository: hama
Updated Branches:
  refs/heads/componentization [created] 4074f091c


Add Event, State for state transition.


Project: http://git-wip-us.apache.org/repos/asf/hama/repo
Commit: http://git-wip-us.apache.org/repos/asf/hama/commit/4074f091
Tree: http://git-wip-us.apache.org/repos/asf/hama/tree/4074f091
Diff: http://git-wip-us.apache.org/repos/asf/hama/diff/4074f091

Branch: refs/heads/componentization
Commit: 4074f091c5cc2ee997b1e96bad0c51d767a689ae
Parents: 2ecb5c9
Author: Chiahung Lin <chl501@apache.org>
Authored: Sat Feb 24 16:30:46 2018 +0100
Committer: Chiahung Lin <chl501@apache.org>
Committed: Sat Feb 24 16:30:46 2018 +0100

----------------------------------------------------------------------
 .../main/scala/org/apache/hama/bsp/Event.scala  | 25 +++++++++++++++++++
 .../main/scala/org/apache/hama/bsp/State.scala  | 26 ++++++++++++++++++++
 2 files changed, 51 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hama/blob/4074f091/core/src/main/scala/org/apache/hama/bsp/Event.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/hama/bsp/Event.scala b/core/src/main/scala/org/apache/hama/bsp/Event.scala
new file mode 100644
index 0000000..a858228
--- /dev/null
+++ b/core/src/main/scala/org/apache/hama/bsp/Event.scala
@@ -0,0 +1,25 @@
+/**
+ * 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.hama.bsp
+
+trait Event 
+case object Start extends Event
+case object Restart extends Event
+case object ShutDown extends Event 
+case object Recover extends Event
+  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hama/blob/4074f091/core/src/main/scala/org/apache/hama/bsp/State.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/hama/bsp/State.scala b/core/src/main/scala/org/apache/hama/bsp/State.scala
new file mode 100644
index 0000000..0ff6776
--- /dev/null
+++ b/core/src/main/scala/org/apache/hama/bsp/State.scala
@@ -0,0 +1,26 @@
+/**
+ * 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.hama.bsp
+
+sealed trait State 
+case object Stopped extends State
+case object Initializing extends State
+case object Running extends State
+case object ShuttingDown extends State
+case object Recovering extends State
+case object Failure extends State
\ No newline at end of file


Mime
View raw message