You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by lu...@apache.org on 2015/01/15 13:26:27 UTC

[11/50] [abbrv] incubator-kylin git commit: remove CacheInterceptor.java

remove CacheInterceptor.java


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

Branch: refs/heads/inverted-index
Commit: de59579f9328d558c9e210c46d68e0ba4f51dc20
Parents: 1a7011c
Author: qianhao.zhou <qi...@ebay.com>
Authored: Tue Jan 13 15:39:24 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Tue Jan 13 15:39:24 2015 +0800

----------------------------------------------------------------------
 .../common/restclient/Broadcaster.java          |  2 +-
 .../rest/controller/CacheController.java        |  2 +
 .../rest/interceptor/CacheInterceptor.java      | 46 --------------------
 3 files changed, 3 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/de59579f/common/src/main/java/com/kylinolap/common/restclient/Broadcaster.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/com/kylinolap/common/restclient/Broadcaster.java b/common/src/main/java/com/kylinolap/common/restclient/Broadcaster.java
index 695ecf3..d8d748a 100644
--- a/common/src/main/java/com/kylinolap/common/restclient/Broadcaster.java
+++ b/common/src/main/java/com/kylinolap/common/restclient/Broadcaster.java
@@ -140,7 +140,7 @@ public class Broadcaster {
     }
 
     public static enum TYPE {
-        CUBE("realization"), METADATA("metadata"), PROJECT("project");
+        CUBE("cube"), METADATA("metadata"), PROJECT("project"), INVERTED_INDEX("inverted_index");
         private String text;
 
         private TYPE(String text) {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/de59579f/server/src/main/java/com/kylinolap/rest/controller/CacheController.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/controller/CacheController.java b/server/src/main/java/com/kylinolap/rest/controller/CacheController.java
index 0e37be5..5a285cf 100644
--- a/server/src/main/java/com/kylinolap/rest/controller/CacheController.java
+++ b/server/src/main/java/com/kylinolap/rest/controller/CacheController.java
@@ -108,6 +108,8 @@ public class CacheController extends BasicController {
                 break;
             }
             break;
+        default:
+            throw new RuntimeException("invalid type:" + wipeType);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/de59579f/server/src/main/java/com/kylinolap/rest/interceptor/CacheInterceptor.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/interceptor/CacheInterceptor.java b/server/src/main/java/com/kylinolap/rest/interceptor/CacheInterceptor.java
deleted file mode 100644
index 0973a81..0000000
--- a/server/src/main/java/com/kylinolap/rest/interceptor/CacheInterceptor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.rest.interceptor;
-
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.After;
-import org.aspectj.lang.annotation.Aspect;
-import org.springframework.stereotype.Component;
-
-import com.kylinolap.common.restclient.Broadcaster;
-
-import java.util.regex.Pattern;
-
-/**
- * @author xduo
- * 
- */
-@Aspect
-@Component("cacheIntercaptor")
-public class CacheInterceptor {
-
-    private static Pattern UPDATE_PATTERN = Pattern.compile("(update|create|save|disable|enable|delete|drop|purge)");
-
-    @After("execution(public * com.kylinolap.rest.controller.CubeController.*(..)) || execution(public * com.kylinolap.rest.controller.ProjectController.*(..))")
-    public void flush(JoinPoint joinPoint) {
-        String methodName = joinPoint.getSignature().getName();
-
-        if (UPDATE_PATTERN.matcher(methodName).find()) {
-//            Broadcaster.flush();
-        }
-    }
-}