Beispiel #1
0
            public IList <QueueUserACLInfo> GetQueueUserAclInfo(UserGroupInformation unused)
            {
                QueueUserACLInfo queueUserAclInfo = Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.Fifo.FifoScheduler
                                                    .recordFactory.NewRecordInstance <QueueUserACLInfo>();

                queueUserAclInfo.SetQueueName(Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.Fifo.FifoScheduler
                                              .DefaultQueueName);
                queueUserAclInfo.SetUserAcls(Arrays.AsList(QueueACL.Values()));
                return(Sharpen.Collections.SingletonList(queueUserAclInfo));
            }
Beispiel #2
0
            public IDictionary <QueueACL, AccessControlList> GetQueueAcls()
            {
                IDictionary <QueueACL, AccessControlList> acls = new Dictionary <QueueACL, AccessControlList
                                                                                 >();

                foreach (QueueACL acl in QueueACL.Values())
                {
                    acls[acl] = new AccessControlList("*");
                }
                return(acls);
            }
        public virtual IDictionary <AccessType, AccessControlList> GetAcls(string queue)
        {
            IDictionary <AccessType, AccessControlList> acls = new Dictionary <AccessType, AccessControlList
                                                                               >();

            foreach (QueueACL acl in QueueACL.Values())
            {
                acls[SchedulerUtils.ToAccessType(acl)] = GetAcl(queue, acl);
            }
            return(acls);
        }
Beispiel #4
0
        public override IList <QueueUserACLInfo> GetQueueUserAclInfo(UserGroupInformation
                                                                     user)
        {
            QueueUserACLInfo userAclInfo = recordFactory.NewRecordInstance <QueueUserACLInfo>(
                );
            IList <QueueACL> operations = new AList <QueueACL>();

            foreach (QueueACL operation in QueueACL.Values())
            {
                if (HasAccess(operation, user))
                {
                    operations.AddItem(operation);
                }
            }
            userAclInfo.SetQueueName(GetQueueName());
            userAclInfo.SetUserAcls(operations);
            return(Sharpen.Collections.SingletonList(userAclInfo));
        }
Beispiel #5
0
 private QueueUserACLInfo GetUserAclInfo(UserGroupInformation user)
 {
     lock (this)
     {
         QueueUserACLInfo userAclInfo = recordFactory.NewRecordInstance <QueueUserACLInfo>(
             );
         IList <QueueACL> operations = new AList <QueueACL>();
         foreach (QueueACL operation in QueueACL.Values())
         {
             if (HasAccess(operation, user))
             {
                 operations.AddItem(operation);
             }
         }
         userAclInfo.SetQueueName(GetQueueName());
         userAclInfo.SetUserAcls(operations);
         return(userAclInfo);
     }
 }