You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/07/17 02:08:16 UTC
[2/2] kylin git commit: KYLIN-2711 code style
KYLIN-2711 code style
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a58cbb76
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a58cbb76
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a58cbb76
Branch: refs/heads/2.0.x
Commit: a58cbb760e512c24b3d6a61ab8de73b792a6d4d9
Parents: 0fcc7ee
Author: Li Yang <li...@apache.org>
Authored: Mon Jul 17 10:07:59 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Mon Jul 17 10:07:59 2017 +0800
----------------------------------------------------------------------
.../java/org/apache/kylin/rest/service/JobService.java | 8 ++++----
.../org/apache/kylin/rest/service/JobServiceTest.java | 12 ++++++++----
2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/a58cbb76/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
index e40173d..a9950c7 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
@@ -396,10 +396,10 @@ public class JobService extends BasicService implements InitializingBean {
public boolean apply(CubingJob executable) {
try {
Output output = allOutputs.get(executable.getId());
- if (output == null){
- return false;
- }
-
+ if (output == null){
+ return false;
+ }
+
ExecutableState state = output.getState();
boolean ret = statusList.contains(state);
return ret;
http://git-wip-us.apache.org/repos/asf/kylin/blob/a58cbb76/server/src/test/java/org/apache/kylin/rest/service/JobServiceTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/rest/service/JobServiceTest.java b/server/src/test/java/org/apache/kylin/rest/service/JobServiceTest.java
index 7475a5d..b3bb7cf 100644
--- a/server/src/test/java/org/apache/kylin/rest/service/JobServiceTest.java
+++ b/server/src/test/java/org/apache/kylin/rest/service/JobServiceTest.java
@@ -26,7 +26,12 @@ import org.apache.kylin.engine.mr.CubingJob;
import org.apache.kylin.job.constant.JobTimeFilterEnum;
import org.apache.kylin.job.exception.ExecuteException;
import org.apache.kylin.job.exception.JobException;
-import org.apache.kylin.job.execution.*;
+import org.apache.kylin.job.execution.AbstractExecutable;
+import org.apache.kylin.job.execution.ExecutableContext;
+import org.apache.kylin.job.execution.ExecutableManager;
+import org.apache.kylin.job.execution.ExecutableState;
+import org.apache.kylin.job.execution.ExecuteResult;
+import org.apache.kylin.job.execution.Output;
import org.apache.kylin.metadata.project.ProjectInstance;
import org.junit.Assert;
import org.junit.Test;
@@ -58,14 +63,13 @@ public class JobServiceTest extends ServiceTestBase {
ExecutableManager manager = ExecutableManager.getInstance(jobService.getConfig());
AbstractExecutable executable = new TestJob();
manager.addJob(executable);
- List<CubingJob> jobs = jobService.innerSearchCubingJobs("cube",
+ List<CubingJob> jobs = jobService.searchCubingJobs("cube",
"jobName",
Collections.<ExecutableState>emptySet(),
0,
Long.MAX_VALUE,
Collections.<String, Output>emptyMap(),
- true,
- "project");
+ true);
Assert.assertEquals(0, jobs.size());
}