[jira] [Commented] (KYLIN-3263) AbstractExecutable's retry has problem
[ https://issues.apache.org/jira/browse/KYLIN-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16380452#comment-16380452 ] ASF subversion and git services commented on KYLIN-3263: Commit bfdd1846f198c6820cf292654d6d42ef5536761d in kylin's branch refs/heads/2.3.x from [~Aron.tao] [ https://gitbox.apache.org/repos/asf?p=kylin.git;h=bfdd184 ] KYLIN-3263, bugfix with AbstractExecutable's retry. > AbstractExecutable's retry has problem > -- > > Key: KYLIN-3263 > URL: https://issues.apache.org/jira/browse/KYLIN-3263 > Project: Kylin > Issue Type: Bug >Reporter: jiatao.tao >Assignee: jiatao.tao >Priority: Major > Fix For: v2.3.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3263) AbstractExecutable's retry has problem
[ https://issues.apache.org/jira/browse/KYLIN-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374486#comment-16374486 ] ASF GitHub Bot commented on KYLIN-3263: --- yiming187 closed pull request #104: KYLIN-3263, bugfix with AbstractExecutable's retry. URL: https://github.com/apache/kylin/pull/104 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): 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 91283f0f2d..dbe11c2ea3 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 final ExecuteResult execute(ExecutableContext executableContext) throws E 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 @@ private boolean isMetaDataPersistException(Exception e) { 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 @@ protected final boolean isPaused() { 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 f656c44058..00 --- 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
[jira] [Commented] (KYLIN-3263) AbstractExecutable's retry has problem
[ https://issues.apache.org/jira/browse/KYLIN-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374487#comment-16374487 ] ASF subversion and git services commented on KYLIN-3263: Commit 74dff9fa36ea937e947a0cc5a96f373d7c2f372d in kylin's branch refs/heads/master from [~Aron.tao] [ https://gitbox.apache.org/repos/asf?p=kylin.git;h=74dff9f ] KYLIN-3263, bugfix with AbstractExecutable's retry. > AbstractExecutable's retry has problem > -- > > Key: KYLIN-3263 > URL: https://issues.apache.org/jira/browse/KYLIN-3263 > Project: Kylin > Issue Type: Bug >Reporter: jiatao.tao >Assignee: jiatao.tao >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3263) AbstractExecutable's retry has problem
[ https://issues.apache.org/jira/browse/KYLIN-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374488#comment-16374488 ] ASF subversion and git services commented on KYLIN-3263: Commit 66ea154ecee74a18066e9b6ea706e7232fb19bf5 in kylin's branch refs/heads/master from [~liuyiming.vip] [ https://gitbox.apache.org/repos/asf?p=kylin.git;h=66ea154 ] Merge pull request #104 from tttMelody/master KYLIN-3263, bugfix with AbstractExecutable's retry. > AbstractExecutable's retry has problem > -- > > Key: KYLIN-3263 > URL: https://issues.apache.org/jira/browse/KYLIN-3263 > Project: Kylin > Issue Type: Bug >Reporter: jiatao.tao >Assignee: jiatao.tao >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3263) AbstractExecutable's retry has problem
[ https://issues.apache.org/jira/browse/KYLIN-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374232#comment-16374232 ] ASF GitHub Bot commented on KYLIN-3263: --- coveralls commented on issue #104: KYLIN-3263, bugfix with AbstractExecutable's retry. URL: https://github.com/apache/kylin/pull/104#issuecomment-367983164 ## Pull Request Test Coverage Report for [Build 2991](https://coveralls.io/builds/15663717) * **5** of **5** **(100.0%)** changed or added relevant lines in **1** file are covered. * **7** unchanged lines in **1** file lost coverage. * Overall coverage increased (+**0.001%**) to **23.441%** --- | Files with Coverage Reduction | New Missed Lines | % | | :-|--|--: | | [core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://coveralls.io/builds/15663717/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Finmemcubing%2FMemDiskStore.java#L193) | 7 | 76.29% | | Totals | [![Coverage Status](https://coveralls.io/builds/15663717/badge)](https://coveralls.io/builds/15663717) | | :-- | --: | | Change from base [Build 2978](https://coveralls.io/builds/15605811): | 0.001% | | Covered Lines: | 14002 | | Relevant Lines: | 59734 | --- # - [Coveralls](https://coveralls.io) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > AbstractExecutable's retry has problem > -- > > Key: KYLIN-3263 > URL: https://issues.apache.org/jira/browse/KYLIN-3263 > Project: Kylin > Issue Type: Bug >Reporter: jiatao.tao >Assignee: jiatao.tao >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3263) AbstractExecutable's retry has problem
[ https://issues.apache.org/jira/browse/KYLIN-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374229#comment-16374229 ] ASF GitHub Bot commented on KYLIN-3263: --- codecov-io commented on issue #104: KYLIN-3263, bugfix with AbstractExecutable's retry. URL: https://github.com/apache/kylin/pull/104#issuecomment-367982611 # [Codecov](https://codecov.io/gh/apache/kylin/pull/104?src=pr=h1) Report > Merging [#104](https://codecov.io/gh/apache/kylin/pull/104?src=pr=desc) into [master](https://codecov.io/gh/apache/kylin/commit/21ef4d6e4bb62eb3f5209b14daaa8ab404d0f4c5?src=pr=desc) will **decrease** coverage by `<.01%`. > The diff coverage is `80%`. [![Impacted file tree graph](https://codecov.io/gh/apache/kylin/pull/104/graphs/tree.svg?height=150=650=JawVgbgsVo=pr)](https://codecov.io/gh/apache/kylin/pull/104?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #104 +/- ## - Coverage 21.45% 21.45% -0.01% - Complexity 3815 3819 +4 Files 992 992 Lines 5974159734 -7 Branches 8639 8638 -1 - Hits 1281912813 -6 + Misses4574045734 -6 - Partials 1182 1187 +5 ``` | [Impacted Files](https://codecov.io/gh/apache/kylin/pull/104?src=pr=tree) | Coverage Δ | Complexity Δ | | |---|---|---|---| | [...apache/kylin/job/execution/AbstractExecutable.java](https://codecov.io/gh/apache/kylin/pull/104/diff?src=pr=tree#diff-Y29yZS1qb2Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2pvYi9leGVjdXRpb24vQWJzdHJhY3RFeGVjdXRhYmxlLmphdmE=) | `51.69% <80%> (+3.55%)` | `46 <6> (+5)` | :arrow_up: | | [...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://codecov.io/gh/apache/kylin/pull/104/diff?src=pr=tree#diff-Y29yZS1jdWJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reWxpbi9jdWJlL2lubWVtY3ViaW5nL01lbURpc2tTdG9yZS5qYXZh) | `66.56% <0%> (-3.65%)` | `7% <0%> (ø)` | | | [...a/org/apache/kylin/dict/Number2BytesConverter.java](https://codecov.io/gh/apache/kylin/pull/104/diff?src=pr=tree#diff-Y29yZS1kaWN0aW9uYXJ5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reWxpbi9kaWN0L051bWJlcjJCeXRlc0NvbnZlcnRlci5qYXZh) | `81.74% <0%> (-0.8%)` | `17% <0%> (-1%)` | | | [.../apache/kylin/cube/cuboid/TreeCuboidScheduler.java](https://codecov.io/gh/apache/kylin/pull/104/diff?src=pr=tree#diff-Y29yZS1jdWJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reWxpbi9jdWJlL2N1Ym9pZC9UcmVlQ3Vib2lkU2NoZWR1bGVyLmphdmE=) | `65.35% <0%> (+0.78%)` | `0% <0%> (ø)` | :arrow_down: | | [...g/apache/kylin/metadata/cachesync/Broadcaster.java](https://codecov.io/gh/apache/kylin/pull/104/diff?src=pr=tree#diff-Y29yZS1tZXRhZGF0YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vbWV0YWRhdGEvY2FjaGVzeW5jL0Jyb2FkY2FzdGVyLmphdmE=) | `55.72% <0%> (+0.99%)` | `21% <0%> (ø)` | :arrow_down: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/kylin/pull/104?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/kylin/pull/104?src=pr=footer). Last update [21ef4d6...74dff9f](https://codecov.io/gh/apache/kylin/pull/104?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > AbstractExecutable's retry has problem > -- > > Key: KYLIN-3263 > URL: https://issues.apache.org/jira/browse/KYLIN-3263 > Project: Kylin > Issue Type: Bug >Reporter: jiatao.tao >Assignee: jiatao.tao >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)