You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2014/08/21 19:30:19 UTC

git commit: AMBARI-6933. Rolling restart not working. Additional fix.

Repository: ambari
Updated Branches:
  refs/heads/trunk 8f02714e5 -> 0ea954d7b


AMBARI-6933. Rolling restart not working. Additional fix.


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

Branch: refs/heads/trunk
Commit: 0ea954d7b366e8b93d665f7135fb58fc8065490c
Parents: 8f02714
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Thu Aug 21 10:06:38 2014 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Thu Aug 21 10:30:11 2014 -0700

----------------------------------------------------------------------
 .../server/state/cluster/ClustersImpl.java      | 44 ++++++++------------
 1 file changed, 18 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0ea954d7/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
index 2af3d23..a57e9c2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
@@ -18,10 +18,20 @@
 
 package org.apache.ambari.server.state.cluster;
 
-import com.google.gson.Gson;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.persist.Transactional;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import javax.persistence.RollbackException;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ClusterNotFoundException;
 import org.apache.ambari.server.DuplicateResourceException;
@@ -56,20 +66,11 @@ import org.apache.ambari.server.state.host.HostFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.authority.SimpleGrantedAuthority;
 
-import javax.persistence.RollbackException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
+import com.google.gson.Gson;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.persist.Transactional;
 
 @Singleton
 public class ClustersImpl implements Clusters {
@@ -741,15 +742,6 @@ public class ClustersImpl implements Clusters {
           }
         }
       }
-
-      // SimpleGrantedAuthority is required by InternalAuthenticationToken for internal authorization by token
-      if (grantedAuthority instanceof SimpleGrantedAuthority){
-        SimpleGrantedAuthority authority = (SimpleGrantedAuthority) grantedAuthority;
-        if ("AMBARI.ADMIN".equals(authority.getAuthority())) {
-          return true;
-        }
-
-      }
     }
     // TODO : should we log this?
     return false;