This is an automated email from the ASF dual-hosted git repository. yaniv pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-amaterasu.git
commit 02c3d87a08c5983937050ce6106f2bee7f9f859f Author: Yaniv Rodenski <[email protected]> AuthorDate: Tue Apr 23 13:05:55 2019 +1000 testing requeued actions --- .../dist/amaterasu_pandas-0.2.0-incubating-rc4.zip | Bin 8304 -> 8304 bytes .../dist/amaterasu_python-0.2.0-incubating-rc4.zip | Bin 6167 -> 6167 bytes .../dist/amaterasu_pyspark-0.2.0-incubating-rc4.zip | Bin 14488 -> 14488 bytes .../amaterasu/leader/common/execution/JobManager.kt | 2 +- .../common/execution/JobExecutionTests.scala | 17 +++++++++++++++++ .../dist/amaterasu-sdk-0.2.0-incubating-rc4.zip | Bin 14921 -> 14921 bytes 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/frameworks/python/pandas_runtime/dist/amaterasu_pandas-0.2.0-incubating-rc4.zip b/frameworks/python/pandas_runtime/dist/amaterasu_pandas-0.2.0-incubating-rc4.zip index cb05407..99eaab4 100644 Binary files a/frameworks/python/pandas_runtime/dist/amaterasu_pandas-0.2.0-incubating-rc4.zip and b/frameworks/python/pandas_runtime/dist/amaterasu_pandas-0.2.0-incubating-rc4.zip differ diff --git a/frameworks/python/python_runtime/dist/amaterasu_python-0.2.0-incubating-rc4.zip b/frameworks/python/python_runtime/dist/amaterasu_python-0.2.0-incubating-rc4.zip index d3ac8a3..e326067 100644 Binary files a/frameworks/python/python_runtime/dist/amaterasu_python-0.2.0-incubating-rc4.zip and b/frameworks/python/python_runtime/dist/amaterasu_python-0.2.0-incubating-rc4.zip differ diff --git a/frameworks/spark/pyspark_runtime/dist/amaterasu_pyspark-0.2.0-incubating-rc4.zip b/frameworks/spark/pyspark_runtime/dist/amaterasu_pyspark-0.2.0-incubating-rc4.zip index 5972ee1..4d22afe 100644 Binary files a/frameworks/spark/pyspark_runtime/dist/amaterasu_pyspark-0.2.0-incubating-rc4.zip and b/frameworks/spark/pyspark_runtime/dist/amaterasu_pyspark-0.2.0-incubating-rc4.zip differ diff --git a/leader-common/src/main/kotlin/org/apache/amaterasu/leader/common/execution/JobManager.kt b/leader-common/src/main/kotlin/org/apache/amaterasu/leader/common/execution/JobManager.kt index 1c69ee7..1853e8c 100644 --- a/leader-common/src/main/kotlin/org/apache/amaterasu/leader/common/execution/JobManager.kt +++ b/leader-common/src/main/kotlin/org/apache/amaterasu/leader/common/execution/JobManager.kt @@ -77,7 +77,7 @@ data class JobManager(var name: String = "", log.info("requeing action $actionId") registeredActions.forEach { log.info("key ${it.key}") } - val action: Action = registeredActions[actionId] ?: throw IllegalAccessException() + val action: Action = registeredActions[actionId] ?: throw IllegalAccessException( ) executionQueue.put(action.data) registeredActions[actionId]!!.announceQueued() diff --git a/leader/src/test/scala/org/apache/amaterasu/common/execution/JobExecutionTests.scala b/leader/src/test/scala/org/apache/amaterasu/common/execution/JobExecutionTests.scala index eb9c1dc..28b1ce3 100755 --- a/leader/src/test/scala/org/apache/amaterasu/common/execution/JobExecutionTests.scala +++ b/leader/src/test/scala/org/apache/amaterasu/common/execution/JobExecutionTests.scala @@ -75,6 +75,23 @@ class JobExecutionTests extends FlatSpec with Matchers { job.getOutOfActions should be(false) } + it should "be requeued correctly" in { + job.reQueueAction("0000000000") + val actionStatus = client.getData.forPath(s"/$jobId/task-0000000000") + new String(new String(actionStatus)) should be("Queued") + } + + it should "should be able to restart" in { + + val data = job.getNextActionData + + data.getName should be("start") + + // making sure that the status is reflected in zk + val actionStatus = client.getData.forPath(s"/$jobId/task-0000000000") + new String(actionStatus) should be("Started") + } + it should "be marked as Complete when the actionComplete method is called" in { job.actionComplete("0000000000") diff --git a/sdk_python/dist/amaterasu-sdk-0.2.0-incubating-rc4.zip b/sdk_python/dist/amaterasu-sdk-0.2.0-incubating-rc4.zip index 08611c8..6e7ccc1 100644 Binary files a/sdk_python/dist/amaterasu-sdk-0.2.0-incubating-rc4.zip and b/sdk_python/dist/amaterasu-sdk-0.2.0-incubating-rc4.zip differ
