Repository: kylin
Updated Branches:
  refs/heads/master e6698c8f0 -> bebbc7847


Revert "KYLIN-2012 rename RealizationStatusEnum.DESCBROKEN to 
RealizationStatusEnum.BROKEN"

This reverts commit 5974fc0870be17a8801c55c7496093d42dbb7c4f.


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

Branch: refs/heads/master
Commit: bebbc78476c6b41b50fc0492134a5418d522533e
Parents: e6698c8
Author: shaofengshi <shaofeng...@apache.org>
Authored: Fri Oct 14 11:46:01 2016 +0800
Committer: shaofengshi <shaofeng...@apache.org>
Committed: Fri Oct 14 11:46:01 2016 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kylin/cube/CubeDescManager.java  |  4 ++--
 .../src/main/java/org/apache/kylin/cube/CubeInstance.java |  2 +-
 .../src/main/java/org/apache/kylin/cube/CubeManager.java  |  6 +++---
 .../java/org/apache/kylin/cube/CubeManagerCacheTest.java  |  4 ++--
 .../kylin/metadata/realization/RealizationStatusEnum.java |  2 +-
 .../org/apache/kylin/rest/controller/CubeController.java  |  2 +-
 .../java/org/apache/kylin/rest/service/JobService.java    |  2 +-
 webapp/app/partials/cubes/cubes.html                      | 10 +++++-----
 8 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
index 602707f..d6364fe 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
@@ -158,10 +158,10 @@ public class CubeDescManager {
         cubeDescMap.putLocal(ndesc.getName(), ndesc);
         Cuboid.reloadCache(name);
 
-        // if related cube is in BROKEN state before, change it back to 
DISABLED
+        // if related cube is in DESCBROKEN state before, change it back to 
DISABLED
         CubeManager cubeManager = CubeManager.getInstance(config);
         for (CubeInstance cube : cubeManager.getCubesByDesc(name)) {
-            if (cube.getStatus() == RealizationStatusEnum.BROKEN) {
+            if (cube.getStatus() == RealizationStatusEnum.DESCBROKEN) {
                 cubeManager.reloadCubeLocal(cube.getName());
             }
         }

http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
index b8e9394..720690d 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
@@ -153,7 +153,7 @@ public class CubeInstance extends RootPersistentEntity 
implements IRealization,
     // in a temporary broken state, so that user can edit and fix it. Broken 
state is often due to
     // schema changes at source.
     public boolean allowBrokenDescriptor() {
-        return (getStatus() == RealizationStatusEnum.DISABLED  || getStatus() 
== RealizationStatusEnum.BROKEN) && segments.isEmpty();
+        return (getStatus() == RealizationStatusEnum.DISABLED  || getStatus() 
== RealizationStatusEnum.DESCBROKEN) && segments.isEmpty();
     }
 
     public String getResourcePath() {

http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
index 1ebeb60..c558c6d 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
@@ -994,12 +994,12 @@ public class CubeManager implements IRealizationProvider {
             checkNotNull(cubeDesc, "cube descriptor '%s' (for cube '%s') not 
found", cube.getDescName(), cubeName);
 
             if (!cubeDesc.getError().isEmpty()) {
-                cube.setStatus(RealizationStatusEnum.BROKEN);
+                cube.setStatus(RealizationStatusEnum.DESCBROKEN);
                 logger.warn("cube descriptor {} (for cube '{}') is broken", 
cubeDesc.getResourcePath(), cubeName);
 
-            } else if (cube.getStatus() == RealizationStatusEnum.BROKEN) {
+            } else if (cube.getStatus() == RealizationStatusEnum.DESCBROKEN) {
                 cube.setStatus(RealizationStatusEnum.DISABLED);
-                logger.info("cube {} changed from BROKEN to DISABLED", 
cubeName);
+                logger.info("cube {} changed from DESCBROKEN to DISABLED", 
cubeName);
             }
 
             cube.setConfig((KylinConfigExt) cubeDesc.getConfig());

http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerCacheTest.java
----------------------------------------------------------------------
diff --git 
a/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerCacheTest.java 
b/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerCacheTest.java
index 3a2188f..3f3b462 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerCacheTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/CubeManagerCacheTest.java
@@ -65,11 +65,11 @@ public class CubeManagerCacheTest extends 
LocalFileMetadataTestCase {
         CubeInstance createdCube = cubeManager.getCube("a_whole_new_cube");
         assertEquals(0, createdCube.getSegments().size());
         assertEquals(RealizationStatusEnum.DISABLED, createdCube.getStatus());
-        createdCube.setStatus(RealizationStatusEnum.BROKEN);
+        createdCube.setStatus(RealizationStatusEnum.DESCBROKEN);
         CubeUpdate cubeBuilder = new CubeUpdate(createdCube);
 
         cubeManager.updateCube(cubeBuilder);
-        assertEquals(RealizationStatusEnum.BROKEN, 
cubeManager.getCube("a_whole_new_cube").getStatus());
+        assertEquals(RealizationStatusEnum.DESCBROKEN, 
cubeManager.getCube("a_whole_new_cube").getStatus());
     }
 
     public CubeDescManager getCubeDescManager() {

http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/core-metadata/src/main/java/org/apache/kylin/metadata/realization/RealizationStatusEnum.java
----------------------------------------------------------------------
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/RealizationStatusEnum.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/RealizationStatusEnum.java
index 2f3d5ca..27e2d57 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/RealizationStatusEnum.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/RealizationStatusEnum.java
@@ -20,6 +20,6 @@ package org.apache.kylin.metadata.realization;
 
 public enum RealizationStatusEnum {
 
-    DISABLED, READY, BROKEN
+    DISABLED, READY, DESCBROKEN
 
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
----------------------------------------------------------------------
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
 
b/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
index cae6e0f..be242c3 100644
--- 
a/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
+++ 
b/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
@@ -339,7 +339,7 @@ public class CubeController extends BasicController {
         if (cube == null) {
             throw new BadRequestException("Cannot find cube " + cubeName);
         }
-        if (cube.getStatus() == RealizationStatusEnum.BROKEN) {
+        if (cube.getStatus() == RealizationStatusEnum.DESCBROKEN) {
             throw new BadRequestException("Broken cube can't be cloned");
         }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/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 d32ff00..589f67d 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
@@ -201,7 +201,7 @@ public class JobService extends BasicService {
     public JobInstance submitJob(CubeInstance cube, long startDate, long 
endDate, long startOffset, long endOffset, //
             Map<Integer, Long> sourcePartitionOffsetStart, Map<Integer, Long> 
sourcePartitionOffsetEnd, CubeBuildTypeEnum buildType, boolean force, String 
submitter) throws IOException, JobException {
 
-        if (cube.getStatus() == RealizationStatusEnum.BROKEN) {
+        if (cube.getStatus() == RealizationStatusEnum.DESCBROKEN) {
             throw new BadRequestException("Broken cube " + cube.getName() + " 
can't be built");
         }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bebbc784/webapp/app/partials/cubes/cubes.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubes/cubes.html 
b/webapp/app/partials/cubes/cubes.html
index a667058..de9b99b 100644
--- a/webapp/app/partials/cubes/cubes.html
+++ b/webapp/app/partials/cubes/cubes.html
@@ -67,7 +67,7 @@
             </td>
             <td>
                 <span class="label"
-                      ng-class="{'label-success': cube.status=='READY', 
'label-default': cube.status=='DISABLED', 'label-warning': 
cube.status=='BROKEN'}">
+                      ng-class="{'label-success': cube.status=='READY', 
'label-default': cube.status=='DISABLED', 'label-warning': 
cube.status=='DESCBROKEN'}">
                     {{ cube.status}}
                 </span>
             </td>
@@ -94,13 +94,13 @@
                         <li ng-if="cube.status!='READY' && 
(userService.hasRole('ROLE_ADMIN') || hasPermission(cube, 
permissions.ADMINISTRATION.mask, permissions.MANAGEMENT.mask))">
                             <a ng-click="cubeEdit(cube);">Edit</a></li>
                         <li ng-if="cube.streaming && cube.status=='DISABLED' 
&& (userService.hasRole('ROLE_ADMIN') || hasPermission(cube, 
permissions.ADMINISTRATION.mask, permissions.MANAGEMENT.mask))"></li>
-                        <li ng-if="cube.status!='BROKEN'"><a 
ng-click="startJobSubmit(cube);">Build</a></li>
-                        <li ng-if="cube.status!='BROKEN'"><a 
ng-click="startRefresh(cube)">Refresh</a></li>
-                        <li ng-if="cube.status!='BROKEN'"><a 
ng-click="startMerge(cube)">Merge</a></li>
+                        <li ng-if="cube.status!='DESCBROKEN'"><a 
ng-click="startJobSubmit(cube);">Build</a></li>
+                        <li ng-if="cube.status!='DESCBROKEN'"><a 
ng-click="startRefresh(cube)">Refresh</a></li>
+                        <li ng-if="cube.status!='DESCBROKEN'"><a 
ng-click="startMerge(cube)">Merge</a></li>
                         <li ng-if="cube.status=='READY'"><a 
ng-click="disable(cube)">Disable</a></li>
                         <li ng-if="cube.status=='DISABLED'"><a 
ng-click="enable(cube)">Enable</a></li>
                         <li ng-if="cube.status=='DISABLED'"><a 
ng-click="purge(cube)">Purge</a></li>
-                        <li ng-if="cube.status!='BROKEN'"><a 
ng-click="cloneCube(cube)">Clone</a></li>
+                        <li ng-if="cube.status!='DESCBROKEN'"><a 
ng-click="cloneCube(cube)">Clone</a></li>
 
                     </ul>
                 </div>

Reply via email to