You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/28 19:00:23 UTC

[GitHub] [helix] alirezazamani opened a new pull request #1329: Continue task pipeline if currentState is null

alirezazamani opened a new pull request #1329:
URL: https://github.com/apache/helix/pull/1329


   ### Issues
   
   - [x] My PR addresses the following Helix issues and references them in the PR description:
   Fixes #1322 
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI changes:
   In this PR, if controller encounters null currentStates, it will continue the pipeline and TaskSchedulingStage. Also such currentState would not count toward the quota.
   
   
   ### Tests
   
   - [x] The following tests are written for this issue:
   TestTaskCurrentStateNull
   
   - [x] The following is the result of the "mvn test" command on the appropriate module:
   
   Helix-Core:
   ```
   [INFO] Results:
   [INFO] 
   [ERROR] Failures: 
   [ERROR]   TestEnableCompression.testEnableCompressionResource:117 expected:<true> but was:<false>
   [ERROR]   TestEnqueueJobs.testQueueParallelJobs ยป ThreadTimeout Method org.testng.intern...
   [INFO] 
   [ERROR] Tests run: 1175, Failures: 2, Errors: 0, Skipped: 0
   [INFO] 
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  01:22 h
   [INFO] Finished at: 2020-08-28T11:46:15-07:00
   [INFO] ------------------------------------------------------------------------
   ```
   
   The failed test passed when run individually.
   mvn test -Dtest="TestEnableCompression,TestEnqueueJobs"
   ```
   [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 79.623 s - in TestSuite
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
   [INFO] 
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  01:25 min
   [INFO] Finished at: 2020-08-28T11:48:05-07:00
   [INFO] ------------------------------------------------------------------------
   ```
   
   ### Commits
   
   - My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   - My diff has been formatted using helix-style.xml 
   (helix-style-intellij.xml if IntelliJ IDE is used)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] NealSun96 commented on a change in pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
NealSun96 commented on a change in pull request #1329:
URL: https://github.com/apache/helix/pull/1329#discussion_r479556236



##########
File path: helix-core/src/test/java/org/apache/helix/integration/task/TestTaskCurrentStateNull.java
##########
@@ -0,0 +1,122 @@
+package org.apache.helix.integration.task;
+
+/*
+ * 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.
+ */
+
+import java.util.Map;
+import org.apache.helix.AccessOption;
+import org.apache.helix.HelixDataAccessor;
+import org.apache.helix.TestHelper;
+import org.apache.helix.ZkTestHelper;
+import org.apache.helix.model.CurrentState;
+import org.apache.helix.task.JobConfig;
+import org.apache.helix.task.TaskState;
+import org.apache.helix.task.TaskUtil;
+import org.apache.helix.task.Workflow;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.helix.zookeeper.impl.client.ZkClient;
+import org.apache.zookeeper.data.Stat;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * This test makes sure that controller will not be blocked if there exists null current states.
+ */
+public class TestTaskCurrentStateNull extends TaskTestBase {

Review comment:
       I understand that this is meant to be like an Integration test, but would it make more sense to stay in TestAssignableInstanceManager? Or should there be a unit test in TestAssignableInstanceManager?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] alirezazamani commented on a change in pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
alirezazamani commented on a change in pull request #1329:
URL: https://github.com/apache/helix/pull/1329#discussion_r479558415



##########
File path: helix-core/src/test/java/org/apache/helix/integration/task/TestTaskCurrentStateNull.java
##########
@@ -0,0 +1,122 @@
+package org.apache.helix.integration.task;
+
+/*
+ * 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.
+ */
+
+import java.util.Map;
+import org.apache.helix.AccessOption;
+import org.apache.helix.HelixDataAccessor;
+import org.apache.helix.TestHelper;
+import org.apache.helix.ZkTestHelper;
+import org.apache.helix.model.CurrentState;
+import org.apache.helix.task.JobConfig;
+import org.apache.helix.task.TaskState;
+import org.apache.helix.task.TaskUtil;
+import org.apache.helix.task.Workflow;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.helix.zookeeper.impl.client.ZkClient;
+import org.apache.zookeeper.data.Stat;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * This test makes sure that controller will not be blocked if there exists null current states.
+ */
+public class TestTaskCurrentStateNull extends TaskTestBase {

Review comment:
       Your point is somehow valid. But I prefer to keep as integration test and make sure pipeline runs no matter what currentState is. This way we can make sure null currentState will not effect any other stage as well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] alirezazamani commented on a change in pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
alirezazamani commented on a change in pull request #1329:
URL: https://github.com/apache/helix/pull/1329#discussion_r479558415



##########
File path: helix-core/src/test/java/org/apache/helix/integration/task/TestTaskCurrentStateNull.java
##########
@@ -0,0 +1,122 @@
+package org.apache.helix.integration.task;
+
+/*
+ * 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.
+ */
+
+import java.util.Map;
+import org.apache.helix.AccessOption;
+import org.apache.helix.HelixDataAccessor;
+import org.apache.helix.TestHelper;
+import org.apache.helix.ZkTestHelper;
+import org.apache.helix.model.CurrentState;
+import org.apache.helix.task.JobConfig;
+import org.apache.helix.task.TaskState;
+import org.apache.helix.task.TaskUtil;
+import org.apache.helix.task.Workflow;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.helix.zookeeper.impl.client.ZkClient;
+import org.apache.zookeeper.data.Stat;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * This test makes sure that controller will not be blocked if there exists null current states.
+ */
+public class TestTaskCurrentStateNull extends TaskTestBase {

Review comment:
       I prefer to keep as integration test and make sure pipeline runs no matter what currentState is. This way we can make sure null currentState will not effect any other stage as well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] alirezazamani commented on pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
alirezazamani commented on pull request #1329:
URL: https://github.com/apache/helix/pull/1329#issuecomment-683301756


   This PR is ready to be merged.
   
   Final commit message:
   Continue pipeline if currentState is null
   
   In this commit, if controller encounters null currentStates, it will
   continue the pipeline and TaskSchedulingStage. Also such 
   currentState would not count toward the quota.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] NealSun96 commented on a change in pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
NealSun96 commented on a change in pull request #1329:
URL: https://github.com/apache/helix/pull/1329#discussion_r479555816



##########
File path: helix-core/src/test/java/org/apache/helix/integration/task/TestTaskCurrentStateNull.java
##########
@@ -0,0 +1,122 @@
+package org.apache.helix.integration.task;
+
+/*
+ * 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.
+ */
+
+import java.util.Map;
+import org.apache.helix.AccessOption;
+import org.apache.helix.HelixDataAccessor;
+import org.apache.helix.TestHelper;
+import org.apache.helix.ZkTestHelper;
+import org.apache.helix.model.CurrentState;
+import org.apache.helix.task.JobConfig;
+import org.apache.helix.task.TaskState;
+import org.apache.helix.task.TaskUtil;
+import org.apache.helix.task.Workflow;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.helix.zookeeper.impl.client.ZkClient;
+import org.apache.zookeeper.data.Stat;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * This test makes sure that controller will not be blocked if there exists null current states.
+ */
+public class TestTaskCurrentStateNull extends TaskTestBase {
+  protected HelixDataAccessor _accessor;
+
+  @BeforeClass
+  public void beforeClass() throws Exception {
+    _numPartitions = 1;
+    _numNodes = 1;
+    super.beforeClass();
+  }
+
+  @AfterClass()
+  public void afterClass() throws Exception {
+    super.afterClass();
+  }
+
+  @Test
+  public void testCurrentStateNull() throws Exception {
+    String workflowName1 = TestHelper.getTestMethodName() + "_1";
+    String workflowName2 = TestHelper.getTestMethodName() + "_2";
+
+    Workflow.Builder builder1 = new Workflow.Builder(workflowName1);
+    Workflow.Builder builder2 = new Workflow.Builder(workflowName2);
+
+    JobConfig.Builder jobBuilder1 = new JobConfig.Builder().setWorkflow(workflowName1)
+        .setNumberOfTasks(5).setNumConcurrentTasksPerInstance(100).setCommand(MockTask.TASK_COMMAND)
+        .setJobCommandConfigMap(ImmutableMap.of(MockTask.JOB_DELAY, "10000"));
+
+    JobConfig.Builder jobBuilder2 = new JobConfig.Builder().setWorkflow(workflowName2)
+        .setNumberOfTasks(1).setNumConcurrentTasksPerInstance(100).setCommand(MockTask.TASK_COMMAND)
+        .setJobCommandConfigMap(ImmutableMap.of(MockTask.JOB_DELAY, "10000"));
+
+    builder1.addJob("JOB0", jobBuilder1);
+    builder2.addJob("JOB0", jobBuilder2);
+
+    _driver.start(builder1.build());
+    _driver.start(builder2.build());
+
+    String namespacedJobName1 = TaskUtil.getNamespacedJobName(workflowName1, "JOB0");
+    String namespacedJobName2 = TaskUtil.getNamespacedJobName(workflowName2, "JOB0");
+
+    _driver.pollForJobState(workflowName1, namespacedJobName1, TaskState.IN_PROGRESS);
+    _driver.pollForJobState(workflowName2, namespacedJobName2, TaskState.IN_PROGRESS);
+
+    // Get the current states of Participant0
+    String instanceP0 = PARTICIPANT_PREFIX + "_" + (_startPort + 0);
+    ZkClient clientP0 = (ZkClient) _participants[0].getZkClient();
+    String sessionIdP0 = ZkTestHelper.getSessionId(clientP0);
+    String jobCurrentStatePath1 = "/" + CLUSTER_NAME + "/INSTANCES/" + instanceP0
+        + "/CURRENTSTATES/" + sessionIdP0 + "/" + namespacedJobName1;
+    String jobCurrentStatePath2 = "/" + CLUSTER_NAME + "/INSTANCES/" + instanceP0
+        + "/CURRENTSTATES/" + sessionIdP0 + "/" + namespacedJobName2;
+
+    // Read the current states of Participant0 and make sure they have been created
+    boolean isCurrentStateCreated = TestHelper.verify(() -> {
+      ZNRecord recordJob1 = _manager.getHelixDataAccessor().getBaseDataAccessor()
+          .get(jobCurrentStatePath1, new Stat(), AccessOption.PERSISTENT);
+      ZNRecord recordJob2 = _manager.getHelixDataAccessor().getBaseDataAccessor()
+          .get(jobCurrentStatePath2, new Stat(), AccessOption.PERSISTENT);
+      ZNRecord recordTask = _manager.getHelixDataAccessor().getBaseDataAccessor()

Review comment:
       This is the same as recordJob2?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] alirezazamani commented on a change in pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
alirezazamani commented on a change in pull request #1329:
URL: https://github.com/apache/helix/pull/1329#discussion_r479558415



##########
File path: helix-core/src/test/java/org/apache/helix/integration/task/TestTaskCurrentStateNull.java
##########
@@ -0,0 +1,122 @@
+package org.apache.helix.integration.task;
+
+/*
+ * 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.
+ */
+
+import java.util.Map;
+import org.apache.helix.AccessOption;
+import org.apache.helix.HelixDataAccessor;
+import org.apache.helix.TestHelper;
+import org.apache.helix.ZkTestHelper;
+import org.apache.helix.model.CurrentState;
+import org.apache.helix.task.JobConfig;
+import org.apache.helix.task.TaskState;
+import org.apache.helix.task.TaskUtil;
+import org.apache.helix.task.Workflow;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.helix.zookeeper.impl.client.ZkClient;
+import org.apache.zookeeper.data.Stat;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * This test makes sure that controller will not be blocked if there exists null current states.
+ */
+public class TestTaskCurrentStateNull extends TaskTestBase {

Review comment:
       I prefer to keep as integration test and make sure pipeline runs no matter what currentState is.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] alirezazamani merged pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
alirezazamani merged pull request #1329:
URL: https://github.com/apache/helix/pull/1329


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] alirezazamani commented on a change in pull request #1329: Continue task pipeline if currentState is null

Posted by GitBox <gi...@apache.org>.
alirezazamani commented on a change in pull request #1329:
URL: https://github.com/apache/helix/pull/1329#discussion_r479561523



##########
File path: helix-core/src/test/java/org/apache/helix/integration/task/TestTaskCurrentStateNull.java
##########
@@ -0,0 +1,122 @@
+package org.apache.helix.integration.task;
+
+/*
+ * 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.
+ */
+
+import java.util.Map;
+import org.apache.helix.AccessOption;
+import org.apache.helix.HelixDataAccessor;
+import org.apache.helix.TestHelper;
+import org.apache.helix.ZkTestHelper;
+import org.apache.helix.model.CurrentState;
+import org.apache.helix.task.JobConfig;
+import org.apache.helix.task.TaskState;
+import org.apache.helix.task.TaskUtil;
+import org.apache.helix.task.Workflow;
+import org.apache.helix.zookeeper.datamodel.ZNRecord;
+import org.apache.helix.zookeeper.impl.client.ZkClient;
+import org.apache.zookeeper.data.Stat;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * This test makes sure that controller will not be blocked if there exists null current states.
+ */
+public class TestTaskCurrentStateNull extends TaskTestBase {
+  protected HelixDataAccessor _accessor;
+
+  @BeforeClass
+  public void beforeClass() throws Exception {
+    _numPartitions = 1;
+    _numNodes = 1;
+    super.beforeClass();
+  }
+
+  @AfterClass()
+  public void afterClass() throws Exception {
+    super.afterClass();
+  }
+
+  @Test
+  public void testCurrentStateNull() throws Exception {
+    String workflowName1 = TestHelper.getTestMethodName() + "_1";
+    String workflowName2 = TestHelper.getTestMethodName() + "_2";
+
+    Workflow.Builder builder1 = new Workflow.Builder(workflowName1);
+    Workflow.Builder builder2 = new Workflow.Builder(workflowName2);
+
+    JobConfig.Builder jobBuilder1 = new JobConfig.Builder().setWorkflow(workflowName1)
+        .setNumberOfTasks(5).setNumConcurrentTasksPerInstance(100).setCommand(MockTask.TASK_COMMAND)
+        .setJobCommandConfigMap(ImmutableMap.of(MockTask.JOB_DELAY, "10000"));
+
+    JobConfig.Builder jobBuilder2 = new JobConfig.Builder().setWorkflow(workflowName2)
+        .setNumberOfTasks(1).setNumConcurrentTasksPerInstance(100).setCommand(MockTask.TASK_COMMAND)
+        .setJobCommandConfigMap(ImmutableMap.of(MockTask.JOB_DELAY, "10000"));
+
+    builder1.addJob("JOB0", jobBuilder1);
+    builder2.addJob("JOB0", jobBuilder2);
+
+    _driver.start(builder1.build());
+    _driver.start(builder2.build());
+
+    String namespacedJobName1 = TaskUtil.getNamespacedJobName(workflowName1, "JOB0");
+    String namespacedJobName2 = TaskUtil.getNamespacedJobName(workflowName2, "JOB0");
+
+    _driver.pollForJobState(workflowName1, namespacedJobName1, TaskState.IN_PROGRESS);
+    _driver.pollForJobState(workflowName2, namespacedJobName2, TaskState.IN_PROGRESS);
+
+    // Get the current states of Participant0
+    String instanceP0 = PARTICIPANT_PREFIX + "_" + (_startPort + 0);
+    ZkClient clientP0 = (ZkClient) _participants[0].getZkClient();
+    String sessionIdP0 = ZkTestHelper.getSessionId(clientP0);
+    String jobCurrentStatePath1 = "/" + CLUSTER_NAME + "/INSTANCES/" + instanceP0
+        + "/CURRENTSTATES/" + sessionIdP0 + "/" + namespacedJobName1;
+    String jobCurrentStatePath2 = "/" + CLUSTER_NAME + "/INSTANCES/" + instanceP0
+        + "/CURRENTSTATES/" + sessionIdP0 + "/" + namespacedJobName2;
+
+    // Read the current states of Participant0 and make sure they have been created
+    boolean isCurrentStateCreated = TestHelper.verify(() -> {
+      ZNRecord recordJob1 = _manager.getHelixDataAccessor().getBaseDataAccessor()
+          .get(jobCurrentStatePath1, new Stat(), AccessOption.PERSISTENT);
+      ZNRecord recordJob2 = _manager.getHelixDataAccessor().getBaseDataAccessor()
+          .get(jobCurrentStatePath2, new Stat(), AccessOption.PERSISTENT);
+      ZNRecord recordTask = _manager.getHelixDataAccessor().getBaseDataAccessor()

Review comment:
       Correct. Fixed. Thanks.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org