Example #1
0
 public void send_get_privilege_set(HiveObjectRef hiveObject, string user_name, List<string> group_names)
 {
     oprot_.WriteMessageBegin(new TMessage("get_privilege_set", TMessageType.Call, seqid_));
     get_privilege_set_args args = new get_privilege_set_args();
     args.HiveObject = hiveObject;
     args.User_name = user_name;
     args.Group_names = group_names;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Example #2
0
 public void send_list_privileges(string principal_name, PrincipalType principal_type, HiveObjectRef hiveObject)
 {
     oprot_.WriteMessageBegin(new TMessage("list_privileges", TMessageType.Call, seqid_));
     list_privileges_args args = new list_privileges_args();
     args.Principal_name = principal_name;
     args.Principal_type = principal_type;
     args.HiveObject = hiveObject;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Example #3
0
 public List<HiveObjectPrivilege> list_privileges(string principal_name, PrincipalType principal_type, HiveObjectRef hiveObject)
 {
     send_list_privileges(principal_name, principal_type, hiveObject);
     return recv_list_privileges();
 }
Example #4
0
 public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, string user_name, List<string> group_names)
 {
     send_get_privilege_set(hiveObject, user_name, group_names);
     return recv_get_privilege_set();
 }
Example #5
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.String)
                 {
                     Principal_name = iprot.ReadString();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.I32)
                 {
                     Principal_type = (PrincipalType)iprot.ReadI32();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 3:
                 if (field.Type == TType.Struct)
                 {
                     HiveObject = new HiveObjectRef();
                     HiveObject.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #6
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     HiveObject = new HiveObjectRef();
                     HiveObject.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.String)
                 {
                     User_name = iprot.ReadString();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 3:
                 if (field.Type == TType.List)
                 {
                     {
                         Group_names = new List<string>();
                         TList _list220 = iprot.ReadListBegin();
                         for (int _i221 = 0; _i221 < _list220.Count; ++_i221)
                         {
                             string _elem222 = null;
                             _elem222 = iprot.ReadString();
                             Group_names.Add(_elem222);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #7
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        HiveObject = new HiveObjectRef();
                        HiveObject.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        PrincipalName = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.I32)
                    {
                        PrincipalType = (PrincipalType)iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Struct)
                    {
                        GrantInfo = new PrivilegeGrantInfo();
                        GrantInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }