You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2015/05/26 17:06:14 UTC

[1/2] incubator-kylin git commit: KYLIN-697 fix minicluster profile

Repository: incubator-kylin
Updated Branches:
  refs/heads/new697 ddb86be4e -> 6d4bbea57


KYLIN-697 fix minicluster profile


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/b4726c59
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/b4726c59
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/b4726c59

Branch: refs/heads/new697
Commit: b4726c59941dfd5c34a97cad1b312d872629014b
Parents: ddb86be
Author: honma <ho...@ebay.com>
Authored: Tue May 26 23:03:28 2015 +0800
Committer: honma <ho...@ebay.com>
Committed: Tue May 26 23:03:28 2015 +0800

----------------------------------------------------------------------
 pom.xml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4726c59/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 092a508..5df0786 100644
--- a/pom.xml
+++ b/pom.xml
@@ -557,13 +557,18 @@
                         <configuration>
                             <reportsDirectory>${project.basedir}/../target/surefire-reports</reportsDirectory>
                             <excludes>
-                                <exclude>**/IT*.java</exclude>
                                 <!--Build cube/II need to be run separately-->
+                                <exclude>**/BuildCube*.java</exclude>
+                                <exclude>**/BuildII*.java</exclude>
+
+                                <!--minicluster does not have kafka-->
+                                <exclude>**/ITKafka*.java</exclude>
 
                                 <!--minicluster does not have hive-->
                                 <exclude>**/ITSnapshotManagerTest.java</exclude>
                                 <exclude>**/ITHiveTableReaderTest.java</exclude>
                                 <exclude>**/ITTableControllerTest.java</exclude>
+
                             </excludes>
                             <systemProperties>
                                 <property>
@@ -598,6 +603,8 @@
                             <reportsDirectory>${project.basedir}/../target/surefire-reports</reportsDirectory>
                             <excludes>
                                 <exclude>**/IT*.java</exclude>
+
+                                <!--Build cube/II need to be run separately-->
                                 <exclude>**/BuildCube*.java</exclude>
                                 <exclude>**/BuildII*.java</exclude>
                             </excludes>


[2/2] incubator-kylin git commit: KYLIN-697 refine zookeeperjoblock

Posted by ma...@apache.org.
KYLIN-697 refine zookeeperjoblock


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/6d4bbea5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/6d4bbea5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/6d4bbea5

Branch: refs/heads/new697
Commit: 6d4bbea57ae54509d9b8d83e53dc44d6a2edd9bc
Parents: b4726c5
Author: honma <ho...@ebay.com>
Authored: Tue May 26 23:03:57 2015 +0800
Committer: honma <ho...@ebay.com>
Committed: Tue May 26 23:03:57 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/common/lock/ZookeeperJobLock.java   | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/6d4bbea5/common/src/main/java/org/apache/kylin/common/lock/ZookeeperJobLock.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/lock/ZookeeperJobLock.java b/common/src/main/java/org/apache/kylin/common/lock/ZookeeperJobLock.java
index 7a755a3..78da480 100644
--- a/common/src/main/java/org/apache/kylin/common/lock/ZookeeperJobLock.java
+++ b/common/src/main/java/org/apache/kylin/common/lock/ZookeeperJobLock.java
@@ -23,11 +23,14 @@ public class ZookeeperJobLock implements JobLock {
     private Logger logger = LoggerFactory.getLogger(ZookeeperJobLock.class);
 
     private static final String ZOOKEEPER_LOCK_PATH = "/kylin/job_engine/lock";
+
+    private String scheduleID;
     private InterProcessMutex sharedLock;
     private CuratorFramework zkClient;
 
     @Override
     public boolean lock() {
+        this.scheduleID = schedulerId();
         String ZKConnectString = getZKConnectString();
         if (StringUtils.isEmpty(ZKConnectString)) {
             throw new IllegalArgumentException("ZOOKEEPER_QUORUM is empty!");
@@ -36,7 +39,7 @@ public class ZookeeperJobLock implements JobLock {
         RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
         this.zkClient = CuratorFrameworkFactory.newClient(ZKConnectString, retryPolicy);
         this.zkClient.start();
-        this.sharedLock = new InterProcessMutex(zkClient, schedulerId());
+        this.sharedLock = new InterProcessMutex(zkClient, this.scheduleID);
         boolean hasLock = false;
         try {
             hasLock = sharedLock.acquire(3, TimeUnit.SECONDS);
@@ -65,12 +68,12 @@ public class ZookeeperJobLock implements JobLock {
         try {
             if (zkClient.getState().equals(CuratorFrameworkState.STARTED)) {
                 // client.setData().forPath(ZOOKEEPER_LOCK_PATH, null);
-                if (zkClient.checkExists().forPath(schedulerId()) != null) {
-                    zkClient.delete().guaranteed().deletingChildrenIfNeeded().forPath(schedulerId());
+                if (zkClient.checkExists().forPath(scheduleID) != null) {
+                    zkClient.delete().guaranteed().deletingChildrenIfNeeded().forPath(scheduleID);
                 }
             }
         } catch (Exception e) {
-            logger.error("error release lock:" + schedulerId());
+            logger.error("error release lock:" + scheduleID);
             throw new RuntimeException(e);
         }
     }