You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by bi...@apache.org on 2018/02/28 15:16:35 UTC

[kylin] branch 2.3.x updated (8a275da -> 6517469)

This is an automated email from the ASF dual-hosted git repository.

billyliu pushed a change to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/kylin.git.


 discard 8a275da  manual update external version to 2.4.0-SNAPSHOT
 discard 25b08e4  [maven-release-plugin] prepare for next development iteration
 discard 3747b12  [maven-release-plugin] prepare release kylin-2.3.0
 discard 57462fa  KYLIN-3263, bugfix with AbstractExecutable's retry.
 discard 646f440  manual update htrace module to 2.3.0
     new bfdd184  KYLIN-3263, bugfix with AbstractExecutable's retry.
     new f1f808c  KYLIN-2884 Add delete segment function for portal - bug fix
     new 6517469  KYLIN-3268 Tomcat Security Vulnerability Alert. The version of the tomcat for kylin should upgrade to 7.0.85.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (8a275da)
            \
             N -- N -- N   refs/heads/2.3.x (6517469)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 assembly/pom.xml                   |  5 +++--
 atopcalcite/pom.xml                |  5 +++--
 build/script/download-tomcat.sh    |  4 ++--
 core-common/pom.xml                |  5 +++--
 core-cube/pom.xml                  |  5 +++--
 core-dictionary/pom.xml            |  5 +++--
 core-job/pom.xml                   |  5 +++--
 core-metadata/pom.xml              |  6 ++++--
 core-metrics/pom.xml               |  5 +++--
 core-storage/pom.xml               |  5 +++--
 engine-mr/pom.xml                  |  5 +++--
 engine-spark/pom.xml               |  5 +++--
 external/htrace/pom.xml            |  2 +-
 external/pom.xml                   |  6 ++++--
 jdbc/pom.xml                       |  5 +++--
 kylin-it/pom.xml                   | 18 ++++++++++--------
 metrics-reporter-hive/pom.xml      |  5 +++--
 metrics-reporter-kafka/pom.xml     |  2 +-
 pom.xml                            | 14 ++++++++------
 query/pom.xml                      |  5 +++--
 server-base/pom.xml                |  6 ++++--
 server/pom.xml                     |  5 +++--
 source-hive/pom.xml                |  5 +++--
 source-kafka/pom.xml               |  5 +++--
 storage-hbase/pom.xml              |  9 ++++++---
 tomcat-ext/pom.xml                 |  6 ++++--
 tool-assembly/pom.xml              |  5 +++--
 tool/pom.xml                       |  5 +++--
 webapp/app/js/controllers/cubes.js | 36 +++++++++++++++++++-----------------
 29 files changed, 117 insertions(+), 82 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
billyliu@apache.org.

[kylin] 01/03: KYLIN-3263, bugfix with AbstractExecutable's retry.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billyliu pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit bfdd1846f198c6820cf292654d6d42ef5536761d
Author: Jiatao Tao <24...@qq.com>
AuthorDate: Fri Feb 23 16:37:16 2018 +0800

    KYLIN-3263, bugfix with AbstractExecutable's retry.
---
 .../kylin/job/execution/AbstractExecutable.java    | 32 +++++---------
 .../apache/kylin/job/RetryableTestExecutable.java  | 50 ----------------------
 .../job/impl/threadpool/DefaultSchedulerTest.java  | 49 +++++++++++----------
 3 files changed, 37 insertions(+), 94 deletions(-)

diff --git a/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java b/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
index 91283f0..dbe11c2 100644
--- a/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
+++ b/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
@@ -165,7 +165,7 @@ public abstract class AbstractExecutable implements Executable, Idempotent {
                     exception = e;
                 }
                 retry++;
-            } while (needRetry(result, exception));
+            } while (needRetry(this.retry, exception)); //exception in ExecuteResult should handle by user itself.
 
             if (exception != null) {
                 onExecuteError(exception, executableContext);
@@ -221,13 +221,6 @@ public abstract class AbstractExecutable implements Executable, Idempotent {
         return false;
     }
 
-    private boolean isRetryableExecutionResult(ExecuteResult result) {
-        if (result != null && result.getThrowable() != null && isRetrableException(result.getThrowable())) {
-            return true;
-        }
-        return false;
-    }
-
     protected abstract ExecuteResult doWork(ExecutableContext context) throws ExecuteException;
 
     @Override
@@ -468,25 +461,20 @@ public abstract class AbstractExecutable implements Executable, Idempotent {
         return status == ExecutableState.STOPPED;
     }
 
-    protected boolean isRetrableException(Throwable t) {
-        return ArrayUtils.contains(KylinConfig.getInstanceFromEnv().getJobRetryExceptions(), t.getClass().getName());
-    }
-
     // Retry will happen in below cases:
     // 1) if property "kylin.job.retry-exception-classes" is not set or is null, all jobs with exceptions will retry according to the retry times.
     // 2) if property "kylin.job.retry-exception-classes" is set and is not null, only jobs with the specified exceptions will retry according to the retry times.
-    protected boolean needRetry(ExecuteResult result, Throwable e) {
-        if (this.retry > KylinConfig.getInstanceFromEnv().getJobRetry()) {
+    public static boolean needRetry(int retry, Throwable t) {
+        if (retry > KylinConfig.getInstanceFromEnv().getJobRetry() || t == null) {
             return false;
+        } else {
+            return isRetryableException(t.getClass().getName());
         }
-        String[] retryableEx = KylinConfig.getInstanceFromEnv().getJobRetryExceptions();
-        if (retryableEx == null || retryableEx.length == 0) {
-            return true;
-        }
-        if ((result != null && isRetryableExecutionResult(result)) || e != null && isRetrableException(e)) {
-            return true;
-        }
-        return false;
+    }
+
+    private static boolean isRetryableException(String exceptionName) {
+        String[] jobRetryExceptions = KylinConfig.getInstanceFromEnv().getJobRetryExceptions();
+        return ArrayUtils.isEmpty(jobRetryExceptions) || ArrayUtils.contains(jobRetryExceptions, exceptionName);
     }
 
     @Override
diff --git a/core-job/src/test/java/org/apache/kylin/job/RetryableTestExecutable.java b/core-job/src/test/java/org/apache/kylin/job/RetryableTestExecutable.java
deleted file mode 100644
index f656c44..0000000
--- a/core-job/src/test/java/org/apache/kylin/job/RetryableTestExecutable.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.kylin.job;
-
-import org.apache.kylin.common.KylinConfig;
-import org.apache.kylin.job.execution.ExecutableContext;
-import org.apache.kylin.job.execution.ExecuteResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- */
-public class RetryableTestExecutable extends BaseTestExecutable {
-    private static final Logger logger = LoggerFactory.getLogger(RetryableTestExecutable.class);
-
-    public RetryableTestExecutable() {
-        super();
-    }
-
-    @Override
-    protected ExecuteResult doWork(ExecutableContext context) {
-        logger.debug("run retryable exception test. ");
-        String[] exceptions = KylinConfig.getInstanceFromEnv().getJobRetryExceptions();
-        Throwable ex = null;
-        if (exceptions != null && exceptions.length > 0) {
-            try {
-                ex = (Throwable) Class.forName(exceptions[0]).newInstance();
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        return new ExecuteResult(ExecuteResult.State.ERROR, null, ex);
-    }
-}
diff --git a/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java b/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java
index c7c69cd..3b24fe6 100644
--- a/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java
+++ b/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java
@@ -18,25 +18,16 @@
 
 package org.apache.kylin.job.impl.threadpool;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.job.BaseTestExecutable;
 import org.apache.kylin.job.ErrorTestExecutable;
 import org.apache.kylin.job.FailedTestExecutable;
 import org.apache.kylin.job.FiveSecondSucceedTestExecutable;
 import org.apache.kylin.job.NoErrorStatusExecutable;
-import org.apache.kylin.job.RetryableTestExecutable;
 import org.apache.kylin.job.RunningTestExecutable;
 import org.apache.kylin.job.SelfStopExecutable;
 import org.apache.kylin.job.SucceedTestExecutable;
+import org.apache.kylin.job.execution.AbstractExecutable;
 import org.apache.kylin.job.execution.DefaultChainedExecutable;
 import org.apache.kylin.job.execution.ExecutableManager;
 import org.apache.kylin.job.execution.ExecutableState;
@@ -48,11 +39,28 @@ import org.junit.rules.ExpectedException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.FileNotFoundException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 /**
  */
 public class DefaultSchedulerTest extends BaseSchedulerTest {
     private static final Logger logger = LoggerFactory.getLogger(DefaultSchedulerTest.class);
 
+    @Override
+    public void after() throws Exception {
+        super.after();
+        System.clearProperty("kylin.job.retry");
+        System.clearProperty("kylin.job.retry-exception-classes");
+    }
+
     @Rule
     public ExpectedException thrown = ExpectedException.none();
 
@@ -227,19 +235,16 @@ public class DefaultSchedulerTest extends BaseSchedulerTest {
         Assert.assertEquals(ExecutableState.SUCCEED, execMgr.getOutput(job.getId()).getState());
         Assert.assertEquals(ExecutableState.SUCCEED, execMgr.getOutput(task1.getId()).getState());
     }
-    
+
+    @Test
     public void testRetryableException() throws Exception {
-        System.setProperty("kylin.job.retry-exception-classes", "java.io.FileNotFoundException");
         System.setProperty("kylin.job.retry", "3");
-        DefaultChainedExecutable job = new DefaultChainedExecutable();
-        BaseTestExecutable task1 = new SucceedTestExecutable();
-        BaseTestExecutable task2 = new RetryableTestExecutable();
-        job.addTask(task1);
-        job.addTask(task2);
-        execMgr.addJob(job);
-        waitForJobFinish(job.getId(), 10000);
-        Assert.assertEquals(ExecutableState.SUCCEED, execMgr.getOutput(task1.getId()).getState());
-        Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(task2.getId()).getState());
-        Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(job.getId()).getState());
+        Assert.assertTrue(AbstractExecutable.needRetry(1, new Exception("")));
+        Assert.assertFalse(AbstractExecutable.needRetry(1, null));
+        Assert.assertFalse(AbstractExecutable.needRetry(4, new Exception("")));
+
+        System.setProperty("kylin.job.retry-exception-classes", "java.io.FileNotFoundException");
+        Assert.assertTrue(AbstractExecutable.needRetry(1, new FileNotFoundException()));
+        Assert.assertFalse(AbstractExecutable.needRetry(1, new Exception("")));
     }
 }

-- 
To stop receiving notification emails like this one, please contact
billyliu@apache.org.

[kylin] 02/03: KYLIN-2884 Add delete segment function for portal - bug fix

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billyliu pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit f1f808ca2f30727d7b6e7b2c3ab6843b9941d380
Author: liapan <li...@ebay.com>
AuthorDate: Sat Feb 24 14:22:28 2018 +0800

    KYLIN-2884 Add delete segment function for portal - bug fix
---
 webapp/app/js/controllers/cubes.js | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index a386202..cbd6fad 100644
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -522,23 +522,25 @@ KylinApp.controller('CubesCtrl', function ($scope, $q, $routeParams, $location,
       })
     };
 
-    $scope.startDeleteSegment = function (cube) {
-          $scope.metaModel={
-            model:modelsManager.getModelByCube(cube.name)
-          };
-          $modal.open({
-            templateUrl: 'deleteSegment.html',
-            controller: deleteSegmentCtrl,
-            resolve: {
-              cube: function () {
-                return cube;
-              },
-              scope: function() {
-                return $scope;
-              }
-            }
-          });
-        };
+     $scope.startDeleteSegment = function (cube) {
+       $scope.loadDetail(cube).then(function () {
+         $scope.metaModel={
+           model:modelsManager.getModelByCube(cube.name)
+         };
+         $modal.open({
+           templateUrl: 'deleteSegment.html',
+           controller: deleteSegmentCtrl,
+           resolve: {
+             cube: function () {
+               return cube;
+             },
+             scope: function() {
+               return $scope;
+             }
+           }
+         });
+       });
+     };
 
   });
 

-- 
To stop receiving notification emails like this one, please contact
billyliu@apache.org.

[kylin] 03/03: KYLIN-3268 Tomcat Security Vulnerability Alert. The version of the tomcat for kylin should upgrade to 7.0.85.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billyliu pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 65174698094bb2e6a7a12849dc9dd42c6cfe6e82
Author: peng.jianhua <pe...@zte.com.cn>
AuthorDate: Wed Feb 28 14:53:02 2018 +0800

    KYLIN-3268 Tomcat Security Vulnerability Alert. The version of the tomcat for kylin should upgrade to 7.0.85.
    
    Signed-off-by: Billy Liu <bi...@apache.org>
---
 build/script/download-tomcat.sh | 4 ++--
 pom.xml                         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/build/script/download-tomcat.sh b/build/script/download-tomcat.sh
index bf20580..beda172 100755
--- a/build/script/download-tomcat.sh
+++ b/build/script/download-tomcat.sh
@@ -27,8 +27,8 @@ if [[ `uname -a` =~ "Darwin" ]]; then
     alias md5cmd="md5 -q"
 fi
 
-tomcat_pkg_version="7.0.82"
-tomcat_pkg_md5="b9c07fb4f37063e9e8185972b3f88a98"
+tomcat_pkg_version="7.0.85"
+tomcat_pkg_md5="1ad4760080164bb08e924c330703c94d"
 
 if [ ! -f "build/apache-tomcat-${tomcat_pkg_version}.tar.gz" ]
 then
diff --git a/pom.xml b/pom.xml
index ebc66cb..25ed544 100644
--- a/pom.xml
+++ b/pom.xml
@@ -113,7 +113,7 @@
         <cglib.version>3.2.4</cglib.version>
         <supercsv.version>2.4.0</supercsv.version>
         <cors.version>2.5</cors.version>
-        <tomcat.version>7.0.82</tomcat.version>
+        <tomcat.version>7.0.85</tomcat.version>
         <t-digest.version>3.1</t-digest.version>
         <freemarker.version>2.3.23</freemarker.version>
         <!--metric-->

-- 
To stop receiving notification emails like this one, please contact
billyliu@apache.org.