You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by zz...@apache.org on 2013/04/10 20:18:01 UTC
git commit: fix testng dependency issues in recipe pom.xml
Updated Branches:
refs/heads/master 5160f0746 -> a590a18ae
fix testng dependency issues in recipe pom.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-helix/commit/a590a18a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/a590a18a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/a590a18a
Branch: refs/heads/master
Commit: a590a18aecdcfc6f1eb8c7554e7ed0b8492ee508
Parents: 5160f07
Author: zzhang <zz...@uci.edu>
Authored: Wed Apr 10 11:17:55 2013 -0700
Committer: zzhang <zz...@uci.edu>
Committed: Wed Apr 10 11:17:55 2013 -0700
----------------------------------------------------------------------
recipes/distributed-lock-manager/pom.xml | 5 +++
.../src/test/conf/testng.xml | 27 +++++++++++++++
recipes/rabbitmq-consumer-group/pom.xml | 5 +++
.../src/test/conf/testng.xml | 27 +++++++++++++++
recipes/rsync-replicated-file-system/pom.xml | 5 +++
.../src/test/conf/testng.xml | 27 +++++++++++++++
recipes/task-execution/pom.xml | 5 +++
.../apache/helix/taskexecution/TaskCluster.java | 13 ++++---
.../apache/helix/taskexecution/TaskStateModel.java | 9 +++--
recipes/task-execution/src/test/conf/testng.xml | 27 +++++++++++++++
10 files changed, 142 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/distributed-lock-manager/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/distributed-lock-manager/pom.xml b/recipes/distributed-lock-manager/pom.xml
index d7996e7..700c633 100644
--- a/recipes/distributed-lock-manager/pom.xml
+++ b/recipes/distributed-lock-manager/pom.xml
@@ -33,6 +33,11 @@ under the License.
<dependencies>
<dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.0.1</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.helix</groupId>
<artifactId>helix-core</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/distributed-lock-manager/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/recipes/distributed-lock-manager/src/test/conf/testng.xml b/recipes/distributed-lock-manager/src/test/conf/testng.xml
new file mode 100644
index 0000000..58f0803
--- /dev/null
+++ b/recipes/distributed-lock-manager/src/test/conf/testng.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="Suite" parallel="none">
+ <test name="Test" preserve-order="false">
+ <packages>
+ <package name="org.apache.helix"/>
+ </packages>
+ </test>
+</suite>
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/rabbitmq-consumer-group/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/pom.xml b/recipes/rabbitmq-consumer-group/pom.xml
index 3c5b65a..ae950a3 100644
--- a/recipes/rabbitmq-consumer-group/pom.xml
+++ b/recipes/rabbitmq-consumer-group/pom.xml
@@ -39,6 +39,11 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.0.1</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.helix</groupId>
<artifactId>helix-core</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/rabbitmq-consumer-group/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/src/test/conf/testng.xml b/recipes/rabbitmq-consumer-group/src/test/conf/testng.xml
new file mode 100644
index 0000000..58f0803
--- /dev/null
+++ b/recipes/rabbitmq-consumer-group/src/test/conf/testng.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="Suite" parallel="none">
+ <test name="Test" preserve-order="false">
+ <packages>
+ <package name="org.apache.helix"/>
+ </packages>
+ </test>
+</suite>
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/rsync-replicated-file-system/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/rsync-replicated-file-system/pom.xml b/recipes/rsync-replicated-file-system/pom.xml
index 82607a3..75ebc2a 100644
--- a/recipes/rsync-replicated-file-system/pom.xml
+++ b/recipes/rsync-replicated-file-system/pom.xml
@@ -38,6 +38,11 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.0.1</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.helix</groupId>
<artifactId>helix-core</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/rsync-replicated-file-system/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/recipes/rsync-replicated-file-system/src/test/conf/testng.xml b/recipes/rsync-replicated-file-system/src/test/conf/testng.xml
new file mode 100644
index 0000000..58f0803
--- /dev/null
+++ b/recipes/rsync-replicated-file-system/src/test/conf/testng.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="Suite" parallel="none">
+ <test name="Test" preserve-order="false">
+ <packages>
+ <package name="org.apache.helix"/>
+ </packages>
+ </test>
+</suite>
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/task-execution/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/task-execution/pom.xml b/recipes/task-execution/pom.xml
index f604c42..5ee14a6 100644
--- a/recipes/task-execution/pom.xml
+++ b/recipes/task-execution/pom.xml
@@ -33,6 +33,11 @@ under the License.
<dependencies>
<dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.0.1</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.helix</groupId>
<artifactId>helix-core</artifactId>
<version>0.6.1-incubating-SNAPSHOT</version>
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskCluster.java
----------------------------------------------------------------------
diff --git a/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskCluster.java b/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskCluster.java
index 313770f..c49659e 100644
--- a/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskCluster.java
+++ b/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskCluster.java
@@ -20,13 +20,14 @@ package org.apache.helix.taskexecution;
*/
import org.apache.helix.ConfigAccessor;
-import org.apache.helix.ConfigScope;
-import org.apache.helix.ConfigScopeBuilder;
import org.apache.helix.manager.zk.ZKHelixAdmin;
import org.apache.helix.manager.zk.ZNRecordSerializer;
import org.apache.helix.manager.zk.ZkClient;
+import org.apache.helix.model.HelixConfigScope;
import org.apache.helix.model.StateModelDefinition;
+import org.apache.helix.model.HelixConfigScope.ConfigScopeProperty;
import org.apache.helix.model.IdealState.IdealStateModeProperty;
+import org.apache.helix.model.builder.HelixConfigScopeBuilder;
import org.apache.helix.tools.StateModelConfigGenerator;
public class TaskCluster {
@@ -49,11 +50,11 @@ public class TaskCluster {
_admin.addCluster(_clusterName, true);
// add state model definition
- StateModelConfigGenerator generator = new StateModelConfigGenerator();
+ // StateModelConfigGenerator generator = new StateModelConfigGenerator();
_admin.addStateModelDef(
_clusterName,
DEFAULT_STATE_MODEL,
- new StateModelDefinition(generator
+ new StateModelDefinition(StateModelConfigGenerator
.generateConfigForOnlineOffline()));
}
@@ -69,7 +70,9 @@ public class TaskCluster {
public void submitDag(Dag dag) throws Exception {
ConfigAccessor clusterConfig = new ConfigAccessor(_zkclient);
- ConfigScope clusterScope = new ConfigScopeBuilder().forCluster(_clusterName).build();
+ HelixConfigScope clusterScope = new HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER)
+ .forCluster(_clusterName)
+ .build();
for (String id : dag.getNodeIds()) {
Dag.Node node = dag.getNode(id);
clusterConfig.set(clusterScope, node.getId(), node.toJson());
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskStateModel.java
----------------------------------------------------------------------
diff --git a/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskStateModel.java b/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskStateModel.java
index 049b911..4251a6e 100644
--- a/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskStateModel.java
+++ b/recipes/task-execution/src/main/java/org/apache/helix/taskexecution/TaskStateModel.java
@@ -24,11 +24,12 @@ import java.util.Set;
import org.apache.log4j.Logger;
import org.apache.helix.ConfigAccessor;
-import org.apache.helix.ConfigScope;
-import org.apache.helix.ConfigScopeBuilder;
import org.apache.helix.HelixManager;
import org.apache.helix.NotificationContext;
+import org.apache.helix.model.HelixConfigScope;
import org.apache.helix.model.Message;
+import org.apache.helix.model.HelixConfigScope.ConfigScopeProperty;
+import org.apache.helix.model.builder.HelixConfigScopeBuilder;
import org.apache.helix.participant.statemachine.StateModel;
import org.apache.helix.participant.statemachine.StateModelInfo;
import org.apache.helix.participant.statemachine.Transition;
@@ -58,7 +59,9 @@ public class TaskStateModel extends StateModel {
+ _partition);
ConfigAccessor clusterConfig = context.getManager().getConfigAccessor();
HelixManager manager = context.getManager();
- ConfigScope clusterScope = new ConfigScopeBuilder().forCluster(manager.getClusterName()).build();
+ HelixConfigScope clusterScope = new HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER)
+ .forCluster(manager.getClusterName())
+ .build();
String json = clusterConfig.get(clusterScope, message.getResourceName());
Dag.Node node = Dag.Node.fromJson(json);
Set<String> parentIds = node.getParentIds();
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a590a18a/recipes/task-execution/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/recipes/task-execution/src/test/conf/testng.xml b/recipes/task-execution/src/test/conf/testng.xml
new file mode 100644
index 0000000..58f0803
--- /dev/null
+++ b/recipes/task-execution/src/test/conf/testng.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="Suite" parallel="none">
+ <test name="Test" preserve-order="false">
+ <packages>
+ <package name="org.apache.helix"/>
+ </packages>
+ </test>
+</suite>