ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [14/27] git commit: AMBARI-7314 - Views : change view status names
Date Tue, 16 Sep 2014 12:50:54 GMT
AMBARI-7314 - Views : change view status names


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

Branch: refs/heads/branch-alerts-dev
Commit: 610bb1e7644112f159b15f9fc6f4e51a3350b406
Parents: bee1d09
Author: tbeerbower <tbeerbower@hortonworks.com>
Authored: Mon Sep 15 14:31:16 2014 -0400
Committer: tbeerbower <tbeerbower@hortonworks.com>
Committed: Mon Sep 15 15:10:31 2014 -0400

----------------------------------------------------------------------
 .../AmbariPrivilegeResourceProvider.java        |  2 +-
 .../internal/ViewInstanceResourceProvider.java  | 10 ++++-----
 .../ViewPermissionResourceProvider.java         |  4 ++--
 .../internal/ViewPrivilegeResourceProvider.java |  8 +++----
 .../ambari/server/orm/entities/ViewEntity.java  |  8 +++----
 .../apache/ambari/server/view/ViewRegistry.java |  4 ++--
 .../AmbariPrivilegeResourceProviderTest.java    |  2 +-
 .../ViewInstanceResourceProviderTest.java       | 10 ++++-----
 .../ViewPermissionResourceProviderTest.java     |  4 ++--
 .../ViewPrivilegeResourceProviderTest.java      |  2 +-
 .../server/orm/entities/ViewEntityTest.java     | 22 ++++++++++----------
 .../ambari/server/view/ViewRegistryTest.java    |  5 ++---
 .../org/apache/ambari/view/ViewDefinition.java  |  8 +++----
 13 files changed, 44 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
index 85e5906..f4839e9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
@@ -125,7 +125,7 @@ public class AmbariPrivilegeResourceProvider extends PrivilegeResourceProvider<O
     //add view entities
     ViewRegistry viewRegistry = ViewRegistry.getInstance();
     for (ViewEntity viewEntity : viewRegistry.getDefinitions()) {
-      if (viewEntity.isLoaded()) {
+      if (viewEntity.isDeployed()) {
         for (ViewInstanceEntity viewInstanceEntity : viewEntity.getInstances()) {
           resourceEntities.put(viewInstanceEntity.getResource().getId(), viewInstanceEntity);
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
index 09b63a4..9a48b41 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
@@ -146,7 +146,7 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider
{
 
       for (ViewEntity viewDefinition : viewRegistry.getDefinitions()){
         // do not report instances for views that are not loaded.
-        if (viewDefinition.isLoaded()){
+        if (viewDefinition.isDeployed()){
           if (viewName == null || viewName.equals(viewDefinition.getCommonName())) {
             for (ViewInstanceEntity viewInstanceDefinition : viewRegistry.getInstanceDefinitions(viewDefinition))
{
               if (instanceName == null || instanceName.equals(viewInstanceDefinition.getName()))
{
@@ -348,8 +348,8 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider
{
             throw new IllegalStateException("The view " + viewName + " is not registered.");
           }
 
-          // the view must be in the LOADED state to create an instance
-          if (!view.isLoaded()) {
+          // the view must be in the DEPLOYED state to create an instance
+          if (!view.isDeployed()) {
             throw new IllegalStateException("The view " + viewName + " is not loaded.");
           }
 
@@ -393,8 +393,8 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider
{
         Set<ViewInstanceEntity> viewInstanceEntities = new HashSet<ViewInstanceEntity>();
 
         for (ViewEntity viewEntity : viewRegistry.getDefinitions()){
-          // the view must be in the LOADED state to delete an instance
-          if (viewEntity.isLoaded()) {
+          // the view must be in the DEPLOYED state to delete an instance
+          if (viewEntity.isDeployed()) {
             for (ViewInstanceEntity viewInstanceEntity : viewRegistry.getInstanceDefinitions(viewEntity)){
               Resource resource = toResource(viewInstanceEntity, requestedIds);
               if (predicate == null || predicate.evaluate(resource)) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
index 5f025d9..979e214 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
@@ -127,7 +127,7 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider
{
         ViewEntity viewEntity = viewRegistry.getDefinition(viewName.toString(), viewVersion.toString());
 
         // do not report permissions for views that are not loaded.
-        if (viewEntity.isLoaded()) {
+        if (viewEntity.isDeployed()) {
           resources.add(toResource(viewUsePermission, viewEntity.getResourceType(), viewEntity,
requestedIds));
         }
       }
@@ -138,7 +138,7 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider
{
 
       ViewEntity viewEntity = viewRegistry.getDefinition(resourceType);
 
-      if (viewEntity != null && viewEntity.isLoaded()) {
+      if (viewEntity != null && viewEntity.isDeployed()) {
         resources.add(toResource(permissionEntity, resourceType, viewEntity, requestedIds));
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
index f2f488a..2c016e4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
@@ -118,7 +118,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
 
       ViewEntity view = viewInstanceEntity.getViewEntity();
 
-      return view.isLoaded() ?
+      return view.isDeployed() ?
           Collections.singletonMap(viewInstanceEntity.getResource().getId(), viewInstanceEntity)
:
           Collections.<Long, ViewInstanceEntity>emptyMap();
     }
@@ -141,7 +141,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
     Map<Long, ViewInstanceEntity> resourceEntities = new HashMap<Long, ViewInstanceEntity>();
 
     for (ViewEntity viewEntity : viewEntities) {
-      if (viewEntity.isLoaded()) {
+      if (viewEntity.isDeployed()) {
         for (ViewInstanceEntity viewInstanceEntity : viewEntity.getInstances()) {
           resourceEntities.put(viewInstanceEntity.getResource().getId(), viewInstanceEntity);
         }
@@ -164,7 +164,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
 
       ViewEntity view = viewInstanceEntity.getViewEntity();
 
-      return view.isLoaded() ? viewInstanceEntity.getResource().getId() : null;
+      return view.isDeployed() ? viewInstanceEntity.getResource().getId() : null;
     }
     return null;
   }
@@ -189,7 +189,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
       ViewInstanceEntity viewInstanceEntity = resourceEntities.get(privilegeEntity.getResource().getId());
       ViewEntity         viewEntity         = viewInstanceEntity.getViewEntity();
 
-      if (!viewEntity.isLoaded()) {
+      if (!viewEntity.isDeployed()) {
         return null;
       }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
index b6ec922..d42e1a0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
@@ -777,12 +777,12 @@ public class ViewEntity implements ViewDefinition {
   }
 
   /**
-   * Determine whether or not the entity is loaded.
+   * Determine whether or not the entity is deployed.
    *
-   * @return true if the entity is loaded
+   * @return true if the entity is deployed
    */
-  public boolean isLoaded() {
-    return status.equals(ViewStatus.LOADED);
+  public boolean isDeployed() {
+    return status.equals(ViewStatus.DEPLOYED);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 1c6c792..17d77a6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -1188,7 +1188,7 @@ public class ViewRegistry {
                                                   File extractedArchiveDirFile,
                                                   ViewConfig viewConfig) {
 
-    setViewStatus(viewDefinition, ViewEntity.ViewStatus.LOADING, "Loading " + extractedArchiveDirFile
+ ".");
+    setViewStatus(viewDefinition, ViewEntity.ViewStatus.DEPLOYING, "Deploying " + extractedArchiveDirFile
+ ".");
 
     String extractedArchiveDirPath = extractedArchiveDirFile.getAbsolutePath();
 
@@ -1217,7 +1217,7 @@ public class ViewRegistry {
         addInstanceDefinition(viewDefinition, instanceEntity);
         handlerList.addViewInstance(instanceEntity);
       }
-      setViewStatus(viewDefinition, ViewEntity.ViewStatus.LOADED, "Loaded " + extractedArchiveDirPath
+ ".");
+      setViewStatus(viewDefinition, ViewEntity.ViewStatus.DEPLOYED, "Deployed " + extractedArchiveDirPath
+ ".");
 
     } catch (Exception e) {
       String msg = "Caught exception loading view " + viewDefinition.getViewName();

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
index fa342fe..1c58fbe 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
@@ -203,7 +203,7 @@ public class AmbariPrivilegeResourceProviderTest {
     expect(viewInstanceEntity.getViewEntity()).andReturn(viewEntity).anyTimes();
     expect(viewEntity.getCommonName()).andReturn("view").anyTimes();
     expect(viewEntity.getVersion()).andReturn("1.0.1").anyTimes();
-    expect(viewEntity.isLoaded()).andReturn(true).anyTimes();
+    expect(viewEntity.isDeployed()).andReturn(true).anyTimes();
     expect(viewInstanceEntity.getName()).andReturn("inst1").anyTimes();
     expect(viewInstanceEntity.getResource()).andReturn(viewResourceEntity).anyTimes();
     expect(viewUserEntity.getPrincipal()).andReturn(viewPrincipalEntity).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
index 4a429b6..8f34916 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
@@ -115,7 +115,7 @@ public class ViewInstanceResourceProviderTest {
     viewInstanceEntity.setName("I1");
 
     ViewEntity viewEntity = new ViewEntity();
-    viewEntity.setStatus(ViewDefinition.ViewStatus.LOADED);
+    viewEntity.setStatus(ViewDefinition.ViewStatus.DEPLOYED);
     viewEntity.setName("V1{1.0.0}");
 
     viewInstanceEntity.setViewEntity(viewEntity);
@@ -155,7 +155,7 @@ public class ViewInstanceResourceProviderTest {
     viewInstanceEntity.setName("I1");
 
     ViewEntity viewEntity = new ViewEntity();
-    viewEntity.setStatus(ViewDefinition.ViewStatus.LOADED);
+    viewEntity.setStatus(ViewDefinition.ViewStatus.DEPLOYED);
     viewEntity.setName("V1{1.0.0}");
 
     viewInstanceEntity.setViewEntity(viewEntity);
@@ -192,7 +192,7 @@ public class ViewInstanceResourceProviderTest {
 
     ViewEntity viewEntity = new ViewEntity();
     viewEntity.setName("V1{1.0.0}");
-    viewEntity.setStatus(ViewDefinition.ViewStatus.LOADING);
+    viewEntity.setStatus(ViewDefinition.ViewStatus.DEPLOYING);
     ViewInstanceEntity viewInstanceEntity = new ViewInstanceEntity();
     viewInstanceEntity.setViewName("V1{1.0.0}");
     viewInstanceEntity.setName("I1");
@@ -230,7 +230,7 @@ public class ViewInstanceResourceProviderTest {
         predicateBuilder.property(ViewInstanceResourceProvider.VIEW_NAME_PROPERTY_ID).equals("V1").toPredicate();
     ViewEntity viewEntity = new ViewEntity();
     viewEntity.setName("V1{1.0.0}");
-    viewEntity.setStatus(ViewDefinition.ViewStatus.LOADING);
+    viewEntity.setStatus(ViewDefinition.ViewStatus.DEPLOYING);
     ViewInstanceEntity viewInstanceEntity = new ViewInstanceEntity();
     viewInstanceEntity.setViewName("V1{1.0.0}");
     viewInstanceEntity.setName("I1");
@@ -267,7 +267,7 @@ public class ViewInstanceResourceProviderTest {
 
     ViewEntity viewEntity = new ViewEntity();
     viewEntity.setName("V1{1.0.0}");
-    viewEntity.setStatus(ViewDefinition.ViewStatus.LOADING);
+    viewEntity.setStatus(ViewDefinition.ViewStatus.DEPLOYING);
     ViewInstanceEntity viewInstanceEntity = new ViewInstanceEntity();
     viewInstanceEntity.setViewName("V1{1.0.0}");
     viewInstanceEntity.setName("I1");

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProviderTest.java
index eebe0d3..f863ed3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProviderTest.java
@@ -83,7 +83,7 @@ public class ViewPermissionResourceProviderTest {
     expect(permissionEntity.getResourceType()).andReturn(resourceTypeEntity);
     expect(resourceTypeEntity.getName()).andReturn("V1");
 
-    expect(viewEntity.isLoaded()).andReturn(true).anyTimes();
+    expect(viewEntity.isDeployed()).andReturn(true).anyTimes();
     expect(viewEntity.getCommonName()).andReturn("V1").anyTimes();
     expect(viewEntity.getVersion()).andReturn("1.0.0").anyTimes();
 
@@ -118,7 +118,7 @@ public class ViewPermissionResourceProviderTest {
 
     expect(permissionEntity.getResourceType()).andReturn(resourceTypeEntity);
 
-    expect(viewEntity.isLoaded()).andReturn(false).anyTimes();
+    expect(viewEntity.isDeployed()).andReturn(false).anyTimes();
 
     expect(viewRegistry.getDefinition(resourceTypeEntity)).andReturn(viewEntity);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
index 0e9d3d6..e1a4da3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
@@ -102,7 +102,7 @@ public class ViewPrivilegeResourceProviderTest {
 
     viewDefinition.addInstanceDefinition(viewInstanceDefinition);
     viewInstanceDefinition.setViewEntity(viewDefinition);
-    viewDefinition.setStatus(ViewDefinition.ViewStatus.LOADED);
+    viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYED);
 
     ViewRegistry registry = ViewRegistry.getInstance();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
index be0d3a6..965cebb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
@@ -249,11 +249,11 @@ public class ViewEntityTest {
     viewDefinition.setStatus(ViewDefinition.ViewStatus.PENDING);
     Assert.assertEquals(ViewDefinition.ViewStatus.PENDING, viewDefinition.getStatus());
 
-    viewDefinition.setStatus(ViewDefinition.ViewStatus.LOADING);
-    Assert.assertEquals(ViewDefinition.ViewStatus.LOADING, viewDefinition.getStatus());
+    viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYING);
+    Assert.assertEquals(ViewDefinition.ViewStatus.DEPLOYING, viewDefinition.getStatus());
 
-    viewDefinition.setStatus(ViewDefinition.ViewStatus.LOADED);
-    Assert.assertEquals(ViewDefinition.ViewStatus.LOADED, viewDefinition.getStatus());
+    viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYED);
+    Assert.assertEquals(ViewDefinition.ViewStatus.DEPLOYED, viewDefinition.getStatus());
 
     viewDefinition.setStatus(ViewDefinition.ViewStatus.ERROR);
     Assert.assertEquals(ViewDefinition.ViewStatus.ERROR, viewDefinition.getStatus());
@@ -268,20 +268,20 @@ public class ViewEntityTest {
   }
 
   @Test
-  public void testIsLoaded() throws Exception {
+  public void testisDeployed() throws Exception {
     ViewEntity viewDefinition = getViewEntity();
 
     viewDefinition.setStatus(ViewDefinition.ViewStatus.PENDING);
-    Assert.assertFalse(viewDefinition.isLoaded());
+    Assert.assertFalse(viewDefinition.isDeployed());
 
-    viewDefinition.setStatus(ViewDefinition.ViewStatus.LOADING);
-    Assert.assertFalse(viewDefinition.isLoaded());
+    viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYING);
+    Assert.assertFalse(viewDefinition.isDeployed());
 
-    viewDefinition.setStatus(ViewDefinition.ViewStatus.LOADED);
-    Assert.assertTrue(viewDefinition.isLoaded());
+    viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYED);
+    Assert.assertTrue(viewDefinition.isDeployed());
 
     viewDefinition.setStatus(ViewDefinition.ViewStatus.ERROR);
-    Assert.assertFalse(viewDefinition.isLoaded());
+    Assert.assertFalse(viewDefinition.isDeployed());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
index 0915325..8e36dba 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
@@ -84,7 +84,6 @@ import org.apache.ambari.view.events.Listener;
 import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.security.core.GrantedAuthority;
 
@@ -296,13 +295,13 @@ public class ViewRegistryTest {
 
     // Wait for the view load to complete.
     long timeout = System.currentTimeMillis() + 10000L;
-    while ((view == null || !view.getStatus().equals(ViewDefinition.ViewStatus.LOADED))&&
+    while ((view == null || !view.getStatus().equals(ViewDefinition.ViewStatus.DEPLOYED))&&
         System.currentTimeMillis() < timeout) {
       view = registry.getDefinition("MY_VIEW", "1.0.0");
     }
 
     Assert.assertNotNull(view);
-    Assert.assertEquals(ViewDefinition.ViewStatus.LOADED, view.getStatus());
+    Assert.assertEquals(ViewDefinition.ViewStatus.DEPLOYED, view.getStatus());
 
     Assert.assertEquals(2, registry.getInstanceDefinitions(view).size());
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-views/src/main/java/org/apache/ambari/view/ViewDefinition.java
----------------------------------------------------------------------
diff --git a/ambari-views/src/main/java/org/apache/ambari/view/ViewDefinition.java b/ambari-views/src/main/java/org/apache/ambari/view/ViewDefinition.java
index 18b86ff..f378dde 100644
--- a/ambari-views/src/main/java/org/apache/ambari/view/ViewDefinition.java
+++ b/ambari-views/src/main/java/org/apache/ambari/view/ViewDefinition.java
@@ -79,9 +79,9 @@ public interface ViewDefinition {
    * View status
    */
   public enum ViewStatus {
-    PENDING, // view has been created but not loaded from the archive
-    LOADING, // view is in the process of being loaded from the archive
-    LOADED,  // view is completely loaded and ready to use
-    ERROR    // an error occurred loading the view
+    PENDING,   // view has been created but not loaded from the archive
+    DEPLOYING, // view is in the process of being deployed from the archive
+    DEPLOYED,  // view is completely deployed and ready to use
+    ERROR      // an error occurred deploying the view
   }
 }


Mime
View raw message