helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject [1/2] Fix compile errors, fill out ContainerProvisioningStage
Date Wed, 11 Dec 2013 06:45:38 GMT
Updated Branches:
  refs/heads/helix-provisioning c3aca96f1 -> 1022d0733


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/TestMessagePartitionStateMismatch.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestMessagePartitionStateMismatch.java
b/helix-core/src/test/java/org/apache/helix/integration/TestMessagePartitionStateMismatch.java
index bc7e972..c429bb2 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestMessagePartitionStateMismatch.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestMessagePartitionStateMismatch.java
@@ -85,7 +85,8 @@ public class TestMessagePartitionStateMismatch extends ZkStandAloneCMTestBase
{
             message.setStateModelFactoryName("DEFAULT");
           }
           accessor.setProperty(
-              accessor.keyBuilder().message(instanceName, message.getMessageId().stringify()),
message);
+              accessor.keyBuilder().message(instanceName, message.getMessageId().stringify()),
+              message);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/TestParticipantErrorMessage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestParticipantErrorMessage.java
b/helix-core/src/test/java/org/apache/helix/integration/TestParticipantErrorMessage.java
index 750e2b7..86d09d6 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestParticipantErrorMessage.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestParticipantErrorMessage.java
@@ -57,8 +57,7 @@ public class TestParticipantErrorMessage extends ZkStandAloneCMTestBase
{
     Criteria recipientCriteria = new Criteria();
     recipientCriteria.setRecipientInstanceType(InstanceType.CONTROLLER);
     recipientCriteria.setSessionSpecific(false);
-    _participants[0].getMessagingService().send(recipientCriteria,
-        errorMessage1);
+    _participants[0].getMessagingService().send(recipientCriteria, errorMessage1);
 
     Message errorMessage2 =
         new Message(MessageType.PARTICIPANT_ERROR_REPORT, MessageId.from(UUID.randomUUID()
@@ -72,8 +71,7 @@ public class TestParticipantErrorMessage extends ZkStandAloneCMTestBase
{
     Criteria recipientCriteria2 = new Criteria();
     recipientCriteria2.setRecipientInstanceType(InstanceType.CONTROLLER);
     recipientCriteria2.setSessionSpecific(false);
-    _participants[1].getMessagingService().send(recipientCriteria2,
-        errorMessage2);
+    _participants[1].getMessagingService().send(recipientCriteria2, errorMessage2);
 
     try {
       Thread.sleep(1500);
@@ -87,8 +85,7 @@ public class TestParticipantErrorMessage extends ZkStandAloneCMTestBase
{
     Assert.assertTrue(result);
     Builder kb = _participants[1].getHelixDataAccessor().keyBuilder();
     ExternalView externalView =
-        _participants[1].getHelixDataAccessor().getProperty(
-            kb.externalView("TestDB"));
+        _participants[1].getHelixDataAccessor().getProperty(kb.externalView("TestDB"));
 
     for (String partitionName : externalView.getRecord().getMapFields().keySet()) {
       for (String hostName : externalView.getRecord().getMapField(partitionName).keySet())
{

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
b/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
index af1ef13..5821153 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
@@ -98,8 +98,7 @@ public class TestResetPartitionState extends ZkIntegrationTestBase {
       String instanceName = "localhost_" + (12918 + i);
 
       if (i == 0) {
-        participants[i] =
-            new MockParticipantManager(ZK_ADDR, clusterName, instanceName);
+        participants[i] = new MockParticipantManager(ZK_ADDR, clusterName, instanceName);
         participants[i].setTransition(new ErrTransition(errPartitions));
       } else {
         participants[i] = new MockParticipantManager(ZK_ADDR, clusterName, instanceName);
@@ -189,8 +188,8 @@ public class TestResetPartitionState extends ZkIntegrationTestBase {
     Builder keyBuilder = accessor.keyBuilder();
 
     LiveInstance liveInstance = accessor.getProperty(keyBuilder.liveInstance(instance));
-    accessor.removeProperty(keyBuilder.stateTransitionStatus(instance, liveInstance.getTypedSessionId()
-        .stringify(), resource, partition));
+    accessor.removeProperty(keyBuilder.stateTransitionStatus(instance, liveInstance
+        .getTypedSessionId().stringify(), resource, partition));
 
   }
   // TODO: throw exception in reset()

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/TestSchedulerMessage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestSchedulerMessage.java
b/helix-core/src/test/java/org/apache/helix/integration/TestSchedulerMessage.java
index 30f5807..0f4bbf5 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestSchedulerMessage.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestSchedulerMessage.java
@@ -690,7 +690,6 @@ public class TestSchedulerMessage extends ZkStandAloneCMTestBaseWithPropertyServ
       }
       Assert.assertEquals(messageResultCount, _PARTITIONS * 3 / 5);
 
-
       boolean success = false;
       for (int j = 0; j < 6; j++) {
         int count = 0;
@@ -763,7 +762,8 @@ public class TestSchedulerMessage extends ZkStandAloneCMTestBaseWithPropertyServ
     String crString = sw.toString();
 
     schedulerMessage.getRecord().setSimpleField("Criteria", crString);
-    schedulerMessage.getRecord().setMapField("MessageTemplate", msgTemplate.getRecord().getSimpleFields());
+    schedulerMessage.getRecord().setMapField("MessageTemplate",
+        msgTemplate.getRecord().getSimpleFields());
     schedulerMessage.getRecord().setSimpleField("TIMEOUT", "-1");
     schedulerMessage.getRecord().setSimpleField("WAIT_ALL", "true");
 
@@ -1029,4 +1029,4 @@ public class TestSchedulerMessage extends ZkStandAloneCMTestBaseWithPropertyServ
         ConstraintType.MESSAGE_CONSTRAINT, "constraint1");
 
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMMain.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMMain.java
b/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMMain.java
index 6eb7a8c..7889700 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMMain.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMMain.java
@@ -44,8 +44,7 @@ public class TestStandAloneCMMain extends ZkStandAloneCMTestBase {
     ClusterControllerManager newController = null;
     for (int i = 1; i <= 2; i++) {
       String controllerName = "controller_" + i;
-      newController =
-          new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, controllerName);
+      newController = new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, controllerName);
       newController.syncStart();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
b/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
index 318177a..559d9f4 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
@@ -191,8 +191,7 @@ public class TestStateTransitionTimeout extends ZkStandAloneCMTestBase
{
       _participants[i].syncStart();
     }
     String controllerName = CONTROLLER_PREFIX + "_0";
-    _controller =
-        new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, controllerName);
+    _controller = new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, controllerName);
     _controller.syncStart();
 
     boolean result =

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/ZkStandAloneCMTestBaseWithPropertyServerCheck.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/ZkStandAloneCMTestBaseWithPropertyServerCheck.java
b/helix-core/src/test/java/org/apache/helix/integration/ZkStandAloneCMTestBaseWithPropertyServerCheck.java
index c6fbea6..e065ee3 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/ZkStandAloneCMTestBaseWithPropertyServerCheck.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/ZkStandAloneCMTestBaseWithPropertyServerCheck.java
@@ -58,23 +58,23 @@ public class ZkStandAloneCMTestBaseWithPropertyServerCheck extends ZkStandAloneC
           accessor.getChildValues(kb.stateTransitionStatus(instanceName,
               _participants[i].getSessionId(), TEST_DB));
 
-        for (int j = 0; j < 10; j++) {
-          statusUpdates =
-              accessor.getChildValues(kb.stateTransitionStatus(instanceName,
+      for (int j = 0; j < 10; j++) {
+        statusUpdates =
+            accessor.getChildValues(kb.stateTransitionStatus(instanceName,
                 _participants[i].getSessionId(), TEST_DB));
-          if (statusUpdates.size() == 0) {
-            Thread.sleep(500);
-          } else {
-            break;
-          }
-        }
-        Assert.assertTrue(statusUpdates.size() > 0);
-        for (StatusUpdate update : statusUpdates) {
-          Assert.assertTrue(update.getRecord()
-              .getSimpleField(ZkPropertyTransferClient.USE_PROPERTYTRANSFER).equals("true"));
-          Assert
-              .assertTrue(update.getRecord().getSimpleField(ZKPropertyTransferServer.SERVER)
!= null);
+        if (statusUpdates.size() == 0) {
+          Thread.sleep(500);
+        } else {
+          break;
         }
+      }
+      Assert.assertTrue(statusUpdates.size() > 0);
+      for (StatusUpdate update : statusUpdates) {
+        Assert.assertTrue(update.getRecord()
+            .getSimpleField(ZkPropertyTransferClient.USE_PROPERTYTRANSFER).equals("true"));
+        Assert
+            .assertTrue(update.getRecord().getSimpleField(ZKPropertyTransferServer.SERVER)
!= null);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/integration/manager/ClusterDistributedController.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/manager/ClusterDistributedController.java
b/helix-core/src/test/java/org/apache/helix/integration/manager/ClusterDistributedController.java
index 44d0957..a17ccc1 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/manager/ClusterDistributedController.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/manager/ClusterDistributedController.java
@@ -30,8 +30,7 @@ import org.apache.helix.participant.DistClusterControllerStateModelFactory;
 import org.apache.helix.participant.StateMachineEngine;
 import org.apache.log4j.Logger;
 
-public class ClusterDistributedController extends ZKHelixManager implements Runnable,
-    ZkTestManager {
+public class ClusterDistributedController extends ZKHelixManager implements Runnable, ZkTestManager
{
   private static Logger LOG = Logger.getLogger(ClusterDistributedController.class);
 
   private final CountDownLatch _startCountDown = new CountDownLatch(1);

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKPropertyTransferServer.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKPropertyTransferServer.java
b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKPropertyTransferServer.java
index 50a9a78..e01dd07 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKPropertyTransferServer.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKPropertyTransferServer.java
@@ -40,8 +40,7 @@ public class TestZKPropertyTransferServer extends ZkStandAloneCMTestBaseWithProp
 
     // kill controller, participant should not know about the svc url
     for (int i = 0; i < NODE_NR; i++) {
-      HelixDataAccessor accessor =
-          _participants[i].getHelixDataAccessor();
+      HelixDataAccessor accessor = _participants[i].getHelixDataAccessor();
       ZKHelixDataAccessor zkAccessor = (ZKHelixDataAccessor) accessor;
       Assert.assertTrue(zkAccessor._zkPropertyTransferSvcUrl == null
           || zkAccessor._zkPropertyTransferSvcUrl.equals(""));
@@ -54,8 +53,7 @@ public class TestZKPropertyTransferServer extends ZkStandAloneCMTestBaseWithProp
 
     // create controller again, the svc url is notified to the participants
     for (int i = 0; i < NODE_NR; i++) {
-      HelixDataAccessor accessor =
-          _participants[i].getHelixDataAccessor();
+      HelixDataAccessor accessor = _participants[i].getHelixDataAccessor();
       ZKHelixDataAccessor zkAccessor = (ZKHelixDataAccessor) accessor;
       Assert.assertTrue(zkAccessor._zkPropertyTransferSvcUrl.equals(ZKPropertyTransferServer
           .getInstance().getWebserviceUrl()));

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixParticipant.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixParticipant.java
b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixParticipant.java
index 8658736..466d0b3 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixParticipant.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixParticipant.java
@@ -69,7 +69,7 @@ public class TestZkHelixParticipant extends ZkUnitTestBase {
 
       participants[i] = connection.createParticipant(clusterId, participantId);
       participants[i].getStateMachineEngine().registerStateModelFactory(
-        StateModelDefId.from("MasterSlave"), new TestHelixConnection.MockStateModelFactory());
+          StateModelDefId.from("MasterSlave"), new TestHelixConnection.MockStateModelFactory());
 
       participants[i].startAsync();
     }
@@ -80,7 +80,8 @@ public class TestZkHelixParticipant extends ZkUnitTestBase {
     PropertyKey.Builder keyBuilder = accessor.keyBuilder();
 
     for (int i = 0; i < n; i++) {
-      Assert.assertNotNull(accessor.getProperty(keyBuilder.liveInstance(participants[i].getParticipantId().stringify())));
+      Assert.assertNotNull(accessor.getProperty(keyBuilder.liveInstance(participants[i]
+          .getParticipantId().stringify())));
     }
 
     // stop participant localhost_12918

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
index a62e39d..78d1668 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
@@ -19,7 +19,6 @@ package org.apache.helix.manager.zk;
  * under the License.
  */
 
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZkTestHelper;
 import org.apache.helix.integration.ZkIntegrationTestBase;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/messaging/handling/TestConfigThreadpoolSize.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/messaging/handling/TestConfigThreadpoolSize.java
b/helix-core/src/test/java/org/apache/helix/messaging/handling/TestConfigThreadpoolSize.java
index c71a782..0f8c841 100644
--- a/helix-core/src/test/java/org/apache/helix/messaging/handling/TestConfigThreadpoolSize.java
+++ b/helix-core/src/test/java/org/apache/helix/messaging/handling/TestConfigThreadpoolSize.java
@@ -93,8 +93,8 @@ public class TestConfigThreadpoolSize extends ZkStandAloneCMTestBase {
 
       _participants[i].getMessagingService().registerMessageHandlerFactory("TestMsg",
           new TestMessagingHandlerFactory());
-      _participants[i].getMessagingService()
-          .registerMessageHandlerFactory("TestMsg2", new TestMessagingHandlerFactory2());
+      _participants[i].getMessagingService().registerMessageHandlerFactory("TestMsg2",
+          new TestMessagingHandlerFactory2());
 
     }
 
@@ -102,8 +102,7 @@ public class TestConfigThreadpoolSize extends ZkStandAloneCMTestBase {
       instanceName = PARTICIPANT_PREFIX + "_" + (START_PORT + i);
 
       DefaultMessagingService svc =
-          (DefaultMessagingService) (_participants[i]
-              .getMessagingService());
+          (DefaultMessagingService) (_participants[i].getMessagingService());
       HelixTaskExecutor helixExecutor = svc.getExecutor();
       ThreadPoolExecutor executor =
           (ThreadPoolExecutor) (helixExecutor._executorMap.get("TestMsg"));

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/messaging/handling/TestHelixTaskExecutor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/messaging/handling/TestHelixTaskExecutor.java
b/helix-core/src/test/java/org/apache/helix/messaging/handling/TestHelixTaskExecutor.java
index 43818f7..7ca9b52 100644
--- a/helix-core/src/test/java/org/apache/helix/messaging/handling/TestHelixTaskExecutor.java
+++ b/helix-core/src/test/java/org/apache/helix/messaging/handling/TestHelixTaskExecutor.java
@@ -58,7 +58,8 @@ public class TestHelixTaskExecutor {
       @Override
       public HelixTaskResult handleMessage() throws InterruptedException {
         HelixTaskResult result = new HelixTaskResult();
-        _processedMsgIds.put(_message.getMessageId().stringify(), _message.getMessageId().stringify());
+        _processedMsgIds.put(_message.getMessageId().stringify(), _message.getMessageId()
+            .stringify());
         Thread.sleep(100);
         result.setSuccess(true);
         return result;
@@ -125,7 +126,8 @@ public class TestHelixTaskExecutor {
         if (_message.getRecord().getSimpleFields().containsKey("Cancelcount")) {
           sleepTimes = 10;
         }
-        _processingMsgIds.put(_message.getMessageId().stringify(), _message.getMessageId().stringify());
+        _processingMsgIds.put(_message.getMessageId().stringify(), _message.getMessageId()
+            .stringify());
         try {
           for (int i = 0; i < sleepTimes; i++) {
             Thread.sleep(100);
@@ -142,7 +144,8 @@ public class TestHelixTaskExecutor {
           }
           throw e;
         }
-        _processedMsgIds.put(_message.getMessageId().stringify(), _message.getMessageId().stringify());
+        _processedMsgIds.put(_message.getMessageId().stringify(), _message.getMessageId()
+            .stringify());
         result.setSuccess(true);
         return result;
       }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/1022d073/helix-core/src/test/java/org/apache/helix/tools/TestHelixAdminCli.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/tools/TestHelixAdminCli.java b/helix-core/src/test/java/org/apache/helix/tools/TestHelixAdminCli.java
index 4d7f93c..1d9198b 100644
--- a/helix-core/src/test/java/org/apache/helix/tools/TestHelixAdminCli.java
+++ b/helix-core/src/test/java/org/apache/helix/tools/TestHelixAdminCli.java
@@ -388,8 +388,7 @@ public class TestHelixAdminCli extends ZkIntegrationTestBase {
 
   private void setupCluster(String clusterName, String grandClusterName, final int n,
       MockParticipantManager[] participants, ClusterDistributedController[] controllers)
-      throws Exception,
-      InterruptedException {
+      throws Exception, InterruptedException {
     // add cluster
     String command = "-zkSvr " + ZK_ADDR + " -addCluster " + clusterName;
     ClusterSetup.processCommandLineArgs(command.split("\\s+"));


Mime
View raw message