浏览代码

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

Siddharth Wagle 11 年之前
父节点
当前提交
0ea954d7b3
共有 1 个文件被更改,包括 18 次插入26 次删除
  1. 18 26
      ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java

+ 18 - 26
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;