kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject [2/2] kylin git commit: KYLIN-1827 code format
Date Mon, 12 Sep 2016 03:38:52 GMT
KYLIN-1827 code format

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

Branch: refs/heads/master
Commit: aef7869c953dec1caaf4b0e426b77c0a9a8938b1
Parents: 0954176
Author: shaofengshi <shaofengshi@apache.org>
Authored: Mon Sep 12 11:36:52 2016 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Mon Sep 12 11:36:52 2016 +0800

----------------------------------------------------------------------
 .../kylin/job/execution/AbstractExecutable.java | 20 ++++++++++----------
 .../org/apache/kylin/engine/mr/CubingJob.java   |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/aef7869c/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
----------------------------------------------------------------------
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 1eee5da..90e4d3c 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
@@ -125,10 +125,10 @@ public abstract class AbstractExecutable implements Executable, Idempotent
{
 
             onExecuteFinished(result, executableContext);
         } catch (Exception e) {
-            if (isMetaDataPersistException(e)){
+            if (isMetaDataPersistException(e)) {
                 handleMetaDataPersistException(e);
             }
-            if (e instanceof ExecuteException){
+            if (e instanceof ExecuteException) {
                 throw e;
             } else {
                 throw new ExecuteException(e);
@@ -142,15 +142,15 @@ public abstract class AbstractExecutable implements Executable, Idempotent
{
     }
 
     private boolean isMetaDataPersistException(Exception e) {
-        if (e instanceof PersistentException){
+        if (e instanceof PersistentException) {
             return true;
         }
 
         Throwable t = e.getCause();
         int depth = 0;
-        while (t!= null && depth<5) {
-            depth ++;
-            if (t instanceof PersistentException){
+        while (t != null && depth < 5) {
+            depth++;
+            if (t instanceof PersistentException) {
                 return true;
             }
             t = t.getCause();
@@ -242,19 +242,19 @@ public abstract class AbstractExecutable implements Executable, Idempotent
{
     protected final void notifyUserStatusChange(ExecutableContext context, ExecutableState
state) {
         try {
             final KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
-            List<String> users =  getAllNofifyUsers(kylinConfig);
+            List<String> users = getAllNofifyUsers(kylinConfig);
             if (users.isEmpty()) {
                 logger.warn("no need to send email, user list is empty");
                 return;
             }
             final Pair<String, String> email = formatNotifications(context, state);
-            doSendMail(kylinConfig,users,email);
+            doSendMail(kylinConfig, users, email);
         } catch (Exception e) {
             logger.error("error send email", e);
         }
     }
 
-    private List<String> getAllNofifyUsers(KylinConfig kylinConfig){
+    private List<String> getAllNofifyUsers(KylinConfig kylinConfig) {
         List<String> users = Lists.newArrayList();
         users.addAll(getNotifyList());
         final String[] adminDls = kylinConfig.getAdminDls();
@@ -266,7 +266,7 @@ public abstract class AbstractExecutable implements Executable, Idempotent
{
         return users;
     }
 
-    private void doSendMail(KylinConfig kylinConfig, List<String> users, Pair<String,String>
email){
+    private void doSendMail(KylinConfig kylinConfig, List<String> users, Pair<String,
String> email) {
         if (email == null) {
             logger.warn("no need to send email, content is null");
             return;

http://git-wip-us.apache.org/repos/asf/kylin/blob/aef7869c/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
index 9c7f57a..1a0113d 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
@@ -220,7 +220,7 @@ public class CubingJob extends DefaultChainedExecutable {
         } catch (UnknownHostException e) {
             logger.warn(e.getLocalizedMessage(), e);
         }
-        sendMail(Pair.of(title,content));
+        sendMail(Pair.of(title, content));
     }
 
     public long getMapReduceWaitTime() {


Mime
View raw message