Return-Path: X-Original-To: apmail-helix-commits-archive@minotaur.apache.org Delivered-To: apmail-helix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1024710BA3 for ; Wed, 8 May 2013 22:03:15 +0000 (UTC) Received: (qmail 14426 invoked by uid 500); 8 May 2013 22:03:15 -0000 Delivered-To: apmail-helix-commits-archive@helix.apache.org Received: (qmail 14393 invoked by uid 500); 8 May 2013 22:03:14 -0000 Mailing-List: contact commits-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.apache.org Delivered-To: mailing list commits@helix.apache.org Received: (qmail 14385 invoked by uid 99); 8 May 2013 22:03:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 May 2013 22:03:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 May 2013 22:03:05 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CBF6F2388B46; Wed, 8 May 2013 22:02:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1480483 [11/12] - in /incubator/helix/site-content: ./ apidocs/reference/ apidocs/reference/org/apache/helix/ apidocs/reference/org/apache/helix/messaging/handling/ apidocs/reference/org/apache/helix/model/ apidocs/reference/org/apache/hel... Date: Wed, 08 May 2013 22:02:11 -0000 To: commits@helix.incubator.apache.org From: slu@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130508220221.CBF6F2388B46@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/helix/site-content/releasing.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/releasing.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/releasing.html (original) +++ incubator/helix/site-content/releasing.html Wed May 8 22:02:10 2013 @@ -181,11 +181,9 @@
-

Helix release process

  1. Post to the dev list a few days before you plan to do an Helix release
  2. Your maven setting must contains the entry to be able to deploy.
       <server>
    -     <id>apache.releases.https</id>
    -     <username></username>
    -     <password></password>
    -   </server>
  3. Release Helix You should have a GPG agent running (preferred), and confirm it works by running "gpg -ab" (type some text and press Ctrl-D). If you do not have a GPG agent running, make sure that you have the "apache-release" profile set in your settings.xml as shown below.

    Run the release

    mvn release:prepare release:perform -B

    GPG configuration

    <profile>
    +            

    Helix release process

    1. Post to the dev list a few days before you plan to do an Helix release
    2. Your maven setting must contains the entry to be able to deploy.

      ~/.m2/settings.xml +------------- server idapache.releases.https/id username/username password/password /server +-------------

    3. Apache DAV passwords
       Add the following info into your ~/.netrc
      + machine git-wip-us.apache.org login <apache username> <password>
      +
    4. Release Helix You should have a GPG agent running in the session you will run the maven release commands(preferred), and confirm it works by running "gpg -ab" (type some text and press Ctrl-D). If you do not have a GPG agent running, make sure that you have the "apache-release" profile set in your settings.xml as shown below.

      Run the release

      mvn release:prepare release:perform -B

      GPG configuration in maven settings xml:

      <profile>
         <id>apache-release</id>
         <properties>
           <gpg.passphrase>[GPG_PASSWORD]</gpg.passphrase>
      @@ -193,7 +191,7 @@
       </profile>
    5. go to https://repository.apache.org and close your staged repository. Note the repository url (format https://repository.apache.org/content/repositories/orgapachehelix-019/org/apache/helix/helix/0.6-incubating/)
      svn co https://dist.apache.org/repos/dist/dev/incubator/helix helix-dev-release
       cd helix-dev-release
       sh ./release-script-svn.sh version stagingRepoUrl
      -then svn add new directory
      +then svn add <new directory created with new version as name>
       then svn ci 
    6. Call for a vote in the dev list and wait for 72 hrs. for the vote results. 3 binding votes are necessary for the release to be finalized. example After the vote has passed, move the files from dist dev to dist release: svn mv https://dist.apache.org/repos/dist/dev/incubator/helix/version to https://dist.apache.org/repos/dist/release/incubator/helix/
    7. Prepare release note. Add a page in src/site/apt/releasenotes/ and change value of <currentRelease> in parent pom.
    8. Send out an announcement of the release to:
      • users@helix.incubator.apache.org
      • dev@helix.incubator.apache.org
    9. Celebrate !
Modified: incubator/helix/site-content/xref-test/allclasses-frame.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/allclasses-frame.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref-test/allclasses-frame.html (original) +++ incubator/helix/site-content/xref-test/allclasses-frame.html Wed May 8 22:02:10 2013 @@ -264,7 +264,7 @@ TestArrivingParticipantStats
  • - TestAsyncCallback + TestAsyncCallback
  • TestAsyncCallbackSvc Modified: incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html (original) +++ incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html Wed May 8 22:02:10 2013 @@ -174,9 +174,9 @@ 164 165 } 166 -167 public static class TestAsyncCallback extends AsyncCallback +167 public static class TestAsyncCallback extends AsyncCallback 168 { -169 public TestAsyncCallback(long timeout) +169 public TestAsyncCallback(long timeout) 170 { 171 super(timeout); 172 } @@ -240,7 +240,7 @@ 230 cr.setRecipientInstanceType(InstanceType.PARTICIPANT); 231 cr.setSessionSpecific(false); 232 -233 TestAsyncCallback callback = new TestAsyncCallback(60000); +233 TestAsyncCallback callback = new TestAsyncCallback(60000); 234 235 _startCMResultMap.get(hostSrc)._manager.getMessagingService().send(cr, msg, callback, 60000); 236 @@ -250,7 +250,7 @@ 240 .contains("TestReplyMessage")); 241 AssertJUnit.assertTrue(callback.getMessageReplied().size() == 1); 242 -243 TestAsyncCallback callback2 = new TestAsyncCallback(500); +243 TestAsyncCallback callback2 = new TestAsyncCallback(500); 244 _startCMResultMap.get(hostSrc)._manager.getMessagingService().send(cr, msg, callback2, 500); 245 246 Thread.sleep(3000); @@ -263,7 +263,7 @@ 253 cr.setSessionSpecific(false); 254 cr.setDataSource(DataSource.IDEALSTATES); 255 -256 callback = new TestAsyncCallback(60000); +256 callback = new TestAsyncCallback(60000); 257 258 _startCMResultMap.get(hostSrc)._manager.getMessagingService().send(cr, msg, callback, 60000); 259 @@ -273,7 +273,7 @@ 263 .contains("TestReplyMessage")); 264 AssertJUnit.assertTrue(callback.getMessageReplied().size() == 1); 265 -266 callback2 = new TestAsyncCallback(500); +266 callback2 = new TestAsyncCallback(500); 267 _startCMResultMap.get(hostSrc)._manager.getMessagingService().send(cr, msg, callback2, 500); 268 269 Thread.sleep(3000); Modified: incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallback.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallback.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallback.html (original) +++ incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallback.html Wed May 8 22:02:10 2013 @@ -40,7 +40,7 @@ 30 import org.testng.annotations.Test; 31 32 -33 public class TestAsyncCallback +33 public class TestAsyncCallback 34 { 35 class AsyncCallbackSample extends AsyncCallback 36 { Modified: incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallbackSvc.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallbackSvc.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallbackSvc.html (original) +++ incubator/helix/site-content/xref-test/org/apache/helix/messaging/TestAsyncCallbackSvc.html Wed May 8 22:02:10 2013 @@ -61,7 +61,7 @@ 51 } 52 } 53 -54 class TestAsyncCallback extends AsyncCallback +54 class TestAsyncCallback extends AsyncCallback 55 { 56 HashSet<String> _repliedMessageId = new HashSet<String>(); 57 @Override @@ -119,9 +119,9 @@ 109 AssertJUnit.assertTrue(e.getMessage().indexOf(msg3.getMsgId())!= -1); 110 } 111 -112 TestAsyncCallback callback = new TestAsyncCallback(); +112 TestAsyncCallback callback = new TestAsyncCallback(); 113 String corrId = UUID.randomUUID().toString(); -114 svc.registerAsyncCallback(corrId, new TestAsyncCallback()); +114 svc.registerAsyncCallback(corrId, new TestAsyncCallback()); 115 svc.registerAsyncCallback(corrId, callback); 116 117 List<Message> msgSent = new ArrayList<Message>(); Modified: incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-frame.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-frame.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-frame.html (original) +++ incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-frame.html Wed May 8 22:02:10 2013 @@ -25,7 +25,7 @@ MockHelixManager
  • - TestAsyncCallback + TestAsyncCallback
  • TestAsyncCallbackSvc Modified: incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-summary.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-summary.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-summary.html (original) +++ incubator/helix/site-content/xref-test/org/apache/helix/messaging/package-summary.html Wed May 8 22:02:10 2013 @@ -52,7 +52,7 @@ - TestAsyncCallback + TestAsyncCallback Modified: incubator/helix/site-content/xref/allclasses-frame.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/allclasses-frame.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/allclasses-frame.html (original) +++ incubator/helix/site-content/xref/allclasses-frame.html Wed May 8 22:02:10 2013 @@ -69,7 +69,7 @@ AlertsHolder
  • - AlertsProperty + AlertsProperty
  • AnalyticsTaskFactory @@ -1287,7 +1287,7 @@ Tuple
  • - Type + Type
  • Verifier Modified: incubator/helix/site-content/xref/org/apache/helix/NotificationContext.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/NotificationContext.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/NotificationContext.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/NotificationContext.html Wed May 8 22:02:10 2013 @@ -44,7 +44,7 @@ 34 private Map<String, Object> _map; 35 36 private HelixManager _manager; -37 private Type _type; +37 private Type _type; 38 private String _pathChanged; 39 private String _eventName; 40 @@ -74,7 +74,7 @@ 64 return _map; 65 } 66 -67 public Type getType() +67 public Type getType() 68 { 69 return _type; 70 } @@ -94,7 +94,7 @@ 84 this._map = map; 85 } 86 -87 public void setType(Type type) +87 public void setType(Type type) 88 { 89 this._type = type; 90 } @@ -104,7 +104,7 @@ 94 return _map.get(key); 95 } 96 -97 public enum Type +97 public enum Type 98 { 99 INIT, CALLBACK, FINALIZE 100 } Modified: incubator/helix/site-content/xref/org/apache/helix/PropertyType.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/PropertyType.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/PropertyType.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/PropertyType.html Wed May 8 22:02:10 2013 @@ -29,7 +29,7 @@ 19 * under the License. 20 */ 21 -22 enum Type +22 enum Type 23 { 24 CLUSTER, INSTANCE, CONTROLLER, RESOURCE; 25 } @@ -70,7 +70,7 @@ 60 61 // @formatter:on 62 -63 Type type; +63 Type type; 64 65 boolean isPersistent; 66 @@ -88,12 +88,12 @@ 78 79 boolean usePropertyTransferServer; 80 -81 private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate) +81 private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate) 82 { 83 this(type, isPersistent, mergeOnUpdate, false); 84 } 85 -86 private PropertyType(Type type, +86 private PropertyType(Type type, 87 boolean isPersistent, 88 boolean mergeOnUpdate, 89 boolean updateOnlyOnExists) @@ -101,7 +101,7 @@ 91 this(type, isPersistent, mergeOnUpdate, false, false); 92 } 93 -94 private PropertyType(Type type, +94 private PropertyType(Type type, 95 boolean isPersistent, 96 boolean mergeOnUpdate, 97 boolean updateOnlyOnExists, @@ -110,7 +110,7 @@ 100 this(type, isPersistent, mergeOnUpdate, updateOnlyOnExists, createOnlyIfAbsent, false); 101 } 102 -103 private PropertyType(Type type, +103 private PropertyType(Type type, 104 boolean isPersistent, 105 boolean mergeOnUpdate, 106 boolean updateOnlyOnExists, @@ -126,7 +126,7 @@ 116 false); 117 } 118 -119 private PropertyType(Type type, +119 private PropertyType(Type type, 120 boolean isPersistent, 121 boolean mergeOnUpdate, 122 boolean updateOnlyOnExists, @@ -153,12 +153,12 @@ 143 this.createOnlyIfAbsent = createIfAbsent; 144 } 145 -146 public Type getType() +146 public Type getType() 147 { 148 return type; 149 } 150 -151 public void setType(Type type) +151 public void setType(Type type) 152 { 153 this.type = type; 154 } Modified: incubator/helix/site-content/xref/org/apache/helix/model/AlertStatus.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/model/AlertStatus.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/model/AlertStatus.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/model/AlertStatus.html Wed May 8 22:02:10 2013 @@ -40,7 +40,7 @@ 30 31 public final static String nodeName = "AlertStatus"; 32 -33 public enum AlertsProperty +33 public enum AlertsProperty 34 { 35 SESSION_ID, FIELDS 36 } Modified: incubator/helix/site-content/xref/org/apache/helix/model/Alerts.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/model/Alerts.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/model/Alerts.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/model/Alerts.html Wed May 8 22:02:10 2013 @@ -42,7 +42,7 @@ 32 33 public final static String nodeName = "Alerts"; 34 -35 public enum AlertsProperty +35 public enum AlertsProperty 36 { 37 SESSION_ID, FIELDS 38 } Modified: incubator/helix/site-content/xref/org/apache/helix/model/package-frame.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/model/package-frame.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/model/package-frame.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/model/package-frame.html Wed May 8 22:02:10 2013 @@ -25,7 +25,7 @@ Alerts
  • - AlertsProperty + AlertsProperty
  • Attributes Modified: incubator/helix/site-content/xref/org/apache/helix/model/package-summary.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/model/package-summary.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/model/package-summary.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/model/package-summary.html Wed May 8 22:02:10 2013 @@ -52,7 +52,7 @@ - AlertsProperty + AlertsProperty Modified: incubator/helix/site-content/xref/org/apache/helix/package-frame.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/package-frame.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/package-frame.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/package-frame.html Wed May 8 22:02:10 2013 @@ -193,7 +193,7 @@ StopThread
  • - Type + Type
  • ZNRecord Modified: incubator/helix/site-content/xref/org/apache/helix/package-summary.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/package-summary.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/package-summary.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/package-summary.html Wed May 8 22:02:10 2013 @@ -332,7 +332,7 @@ - Type + Type Modified: incubator/helix/site-content/xref/org/apache/helix/taskexecution/TaskCluster.html URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/taskexecution/TaskCluster.html?rev=1480483&r1=1480482&r2=1480483&view=diff ============================================================================== --- incubator/helix/site-content/xref/org/apache/helix/taskexecution/TaskCluster.html (original) +++ incubator/helix/site-content/xref/org/apache/helix/taskexecution/TaskCluster.html Wed May 8 22:02:10 2013 @@ -30,75 +30,73 @@ 20 */ 21 22 import org.apache.helix.ConfigAccessor; -23 import org.apache.helix.model.ConfigScope; -24 import org.apache.helix.model.builder.ConfigScopeBuilder; -25 import org.apache.helix.manager.zk.ZKHelixAdmin; -26 import org.apache.helix.manager.zk.ZNRecordSerializer; -27 import org.apache.helix.manager.zk.ZkClient; -28 import org.apache.helix.model.HelixConfigScope; -29 import org.apache.helix.model.StateModelDefinition; -30 import org.apache.helix.model.HelixConfigScope.ConfigScopeProperty; -31 import org.apache.helix.model.IdealState.IdealStateModeProperty; -32 import org.apache.helix.model.builder.HelixConfigScopeBuilder; -33 import org.apache.helix.tools.StateModelConfigGenerator; -34 -35 public class TaskCluster { -36 public static final String DEFAULT_CLUSTER_NAME = "task-cluster"; -37 static final String DEFAULT_STATE_MODEL = "OnlineOffline"; -38 -39 ZkClient _zkclient = null; -40 ZKHelixAdmin _admin = null; -41 private final String _clusterName; -42 -43 public TaskCluster(String zkAddr, String clusterName) throws Exception { -44 _clusterName = clusterName; -45 _zkclient = new ZkClient(zkAddr, ZkClient.DEFAULT_SESSION_TIMEOUT, -46 ZkClient.DEFAULT_CONNECTION_TIMEOUT, new ZNRecordSerializer()); -47 _admin = new ZKHelixAdmin(_zkclient); -48 } -49 -50 public void setup() throws Exception { -51 // add cluster -52 _admin.addCluster(_clusterName, true); -53 -54 // add state model definition -55 // StateModelConfigGenerator generator = new StateModelConfigGenerator(); -56 _admin.addStateModelDef( -57 _clusterName, -58 DEFAULT_STATE_MODEL, -59 new StateModelDefinition(StateModelConfigGenerator -60 .generateConfigForOnlineOffline())); +23 import org.apache.helix.manager.zk.ZKHelixAdmin; +24 import org.apache.helix.manager.zk.ZNRecordSerializer; +25 import org.apache.helix.manager.zk.ZkClient; +26 import org.apache.helix.model.HelixConfigScope; +27 import org.apache.helix.model.StateModelDefinition; +28 import org.apache.helix.model.HelixConfigScope.ConfigScopeProperty; +29 import org.apache.helix.model.IdealState.IdealStateModeProperty; +30 import org.apache.helix.model.builder.HelixConfigScopeBuilder; +31 import org.apache.helix.tools.StateModelConfigGenerator; +32 +33 public class TaskCluster { +34 public static final String DEFAULT_CLUSTER_NAME = "task-cluster"; +35 static final String DEFAULT_STATE_MODEL = "OnlineOffline"; +36 +37 ZkClient _zkclient = null; +38 ZKHelixAdmin _admin = null; +39 private final String _clusterName; +40 +41 public TaskCluster(String zkAddr, String clusterName) throws Exception { +42 _clusterName = clusterName; +43 _zkclient = new ZkClient(zkAddr, ZkClient.DEFAULT_SESSION_TIMEOUT, +44 ZkClient.DEFAULT_CONNECTION_TIMEOUT, new ZNRecordSerializer()); +45 _admin = new ZKHelixAdmin(_zkclient); +46 } +47 +48 public void setup() throws Exception { +49 // add cluster +50 _admin.addCluster(_clusterName, true); +51 +52 // add state model definition +53 // StateModelConfigGenerator generator = new StateModelConfigGenerator(); +54 _admin.addStateModelDef( +55 _clusterName, +56 DEFAULT_STATE_MODEL, +57 new StateModelDefinition(StateModelConfigGenerator +58 .generateConfigForOnlineOffline())); +59 +60 } 61 -62 } -63 -64 public void disconnect() throws Exception { -65 _zkclient.close(); -66 } -67 -68 public void submitDag(String dagJson) throws Exception { -69 Dag dag = Dag.fromJson(dagJson); -70 submitDag(dag); -71 } -72 -73 public void submitDag(Dag dag) throws Exception { -74 ConfigAccessor clusterConfig = new ConfigAccessor(_zkclient); -75 HelixConfigScope clusterScope = new HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER) -76 .forCluster(_clusterName) -77 .build(); -78 for (String id : dag.getNodeIds()) { -79 Dag.Node node = dag.getNode(id); -80 clusterConfig.set(clusterScope, node.getId(), node.toJson()); -81 _admin.addResource(_clusterName, node.getId(), -82 node.getNumPartitions(), DEFAULT_STATE_MODEL, -83 IdealStateModeProperty.AUTO_REBALANCE.toString()); +62 public void disconnect() throws Exception { +63 _zkclient.close(); +64 } +65 +66 public void submitDag(String dagJson) throws Exception { +67 Dag dag = Dag.fromJson(dagJson); +68 submitDag(dag); +69 } +70 +71 public void submitDag(Dag dag) throws Exception { +72 ConfigAccessor clusterConfig = new ConfigAccessor(_zkclient); +73 HelixConfigScope clusterScope = new HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER) +74 .forCluster(_clusterName) +75 .build(); +76 for (String id : dag.getNodeIds()) { +77 Dag.Node node = dag.getNode(id); +78 clusterConfig.set(clusterScope, node.getId(), node.toJson()); +79 _admin.addResource(_clusterName, node.getId(), +80 node.getNumPartitions(), DEFAULT_STATE_MODEL, +81 IdealStateModeProperty.AUTO_REBALANCE.toString()); +82 +83 } 84 -85 } -86 -87 for (String id : dag.getNodeIds()) { -88 _admin.rebalance(_clusterName, id, 1); -89 } -90 } -91 } +85 for (String id : dag.getNodeIds()) { +86 _admin.rebalance(_clusterName, id, 1); +87 } +88 } +89 }