congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GetPrincipalsInRoleRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
GetPrincipalsInRoleRequest
in
org.apache.hadoop.hive.metastore.api

Best Java code snippets using org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleRequest (Showing top 20 results out of 315)

origin: apache/hive

public GetPrincipalsInRoleRequest deepCopy() {
 return new GetPrincipalsInRoleRequest(this);
}
origin: apache/hive

public Object getFieldValue(_Fields field) {
 switch (field) {
 case ROLE_NAME:
  return getRoleName();
 }
 throw new IllegalStateException();
}
origin: apache/hive

@Override
public boolean equals(Object that) {
 if (that == null)
  return false;
 if (that instanceof GetPrincipalsInRoleRequest)
  return this.equals((GetPrincipalsInRoleRequest)that);
 return false;
}
origin: apache/hive

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case ROLE_NAME:
  if (value == null) {
   unsetRoleName();
  } else {
   setRoleName((String)value);
  }
  break;
 }
}
origin: apache/hive

public void validate() throws org.apache.thrift.TException {
 // check for required fields
 if (!isSetRoleName()) {
  throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
 }
 // check for sub-struct validity
}
origin: apache/hive

public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
 org.apache.thrift.protocol.TField schemeField;
 iprot.readStructBegin();
 while (true)
 {
  schemeField = iprot.readFieldBegin();
  if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
   break;
  }
  switch (schemeField.id) {
   case 1: // ROLE_NAME
    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
     struct.roleName = iprot.readString();
     struct.setRoleNameIsSet(true);
    } else { 
     org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    }
    break;
   default:
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  }
  iprot.readFieldEnd();
 }
 iprot.readStructEnd();
 struct.validate();
}
origin: apache/hive

/**
 * Performs a deep copy on <i>other</i>.
 */
public GetPrincipalsInRoleRequest(GetPrincipalsInRoleRequest other) {
 if (other.isSetRoleName()) {
  this.roleName = other.roleName;
 }
}
origin: apache/hive

 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.roleName = iprot.readString();
  struct.setRoleNameIsSet(true);
 }
}
origin: apache/hive

public void write(org.apache.thrift.protocol.TProtocol oprot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
 struct.validate();
 oprot.writeStructBegin(STRUCT_DESC);
 if (struct.roleName != null) {
  oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
  oprot.writeString(struct.roleName);
  oprot.writeFieldEnd();
 }
 oprot.writeFieldStop();
 oprot.writeStructEnd();
}
origin: apache/hive

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
 try {
  read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
 } catch (org.apache.thrift.TException te) {
  throw new java.io.IOException(te);
 }
}
origin: apache/hive

public boolean equals(GetPrincipalsInRoleRequest that) {
 if (that == null)
  return false;
 boolean this_present_roleName = true && this.isSetRoleName();
 boolean that_present_roleName = true && that.isSetRoleName();
 if (this_present_roleName || that_present_roleName) {
  if (!(this_present_roleName && that_present_roleName))
   return false;
  if (!this.roleName.equals(that.roleName))
   return false;
 }
 return true;
}
origin: com.facebook.presto.hive/hive-apache

public void validate() throws org.apache.thrift.TException {
 // check for required fields
 if (!isSetRoleName()) {
  throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
 }
 // check for sub-struct validity
}
origin: com.facebook.presto.hive/hive-apache

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case ROLE_NAME:
  if (value == null) {
   unsetRoleName();
  } else {
   setRoleName((String)value);
  }
  break;
 }
}
origin: com.facebook.presto.hive/hive-apache

public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
 org.apache.thrift.protocol.TField schemeField;
 iprot.readStructBegin();
 while (true)
 {
  schemeField = iprot.readFieldBegin();
  if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
   break;
  }
  switch (schemeField.id) {
   case 1: // ROLE_NAME
    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
     struct.roleName = iprot.readString();
     struct.setRoleNameIsSet(true);
    } else { 
     org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    }
    break;
   default:
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  }
  iprot.readFieldEnd();
 }
 iprot.readStructEnd();
 struct.validate();
}
origin: org.spark-project.hive/hive-metastore

 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.roleName = iprot.readString();
  struct.setRoleNameIsSet(true);
 }
}
origin: com.facebook.presto.hive/hive-apache

public void write(org.apache.thrift.protocol.TProtocol oprot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
 struct.validate();
 oprot.writeStructBegin(STRUCT_DESC);
 if (struct.roleName != null) {
  oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
  oprot.writeString(struct.roleName);
  oprot.writeFieldEnd();
 }
 oprot.writeFieldStop();
 oprot.writeStructEnd();
}
origin: org.spark-project.hive/hive-metastore

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
 try {
  read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
 } catch (org.apache.thrift.TException te) {
  throw new java.io.IOException(te);
 }
}
origin: apache/hive

@Override
public GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request)
  throws TException {
 incrementCounter("get_principals_in_role");
 firePreEvent(new PreAuthorizationCallEvent(this));
 Exception ex = null;
 GetPrincipalsInRoleResponse response = null;
 try {
  response = new GetPrincipalsInRoleResponse(getMS().listRoleMembers(request.getRoleName()));
 } catch (MetaException e) {
  throw e;
 } catch (Exception e) {
  ex = e;
  rethrowException(e);
 } finally {
  endFunction("get_principals_in_role", ex == null, ex);
 }
 return response;
}
origin: apache/hive

public static List<HiveRoleGrant> getHiveRoleGrants(IMetaStoreClient client, String roleName)
  throws Exception {
 GetPrincipalsInRoleRequest request = new GetPrincipalsInRoleRequest(roleName);
 GetPrincipalsInRoleResponse princGrantInfo = client.get_principals_in_role(request);
 List<HiveRoleGrant> hiveRoleGrants = new ArrayList<HiveRoleGrant>();
 for(RolePrincipalGrant thriftRoleGrant :  princGrantInfo.getPrincipalGrants()){
  hiveRoleGrants.add(new HiveRoleGrant(thriftRoleGrant));
 }
 return hiveRoleGrants;
}
origin: apache/hive

/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
 if (field == null) {
  throw new IllegalArgumentException();
 }
 switch (field) {
 case ROLE_NAME:
  return isSetRoleName();
 }
 throw new IllegalStateException();
}
org.apache.hadoop.hive.metastore.apiGetPrincipalsInRoleRequest

Most used methods

  • <init>
    Performs a deep copy on other.
  • getRoleName
  • equals
  • isSetRoleName
    Returns true if field roleName is set (has been assigned a value) and false otherwise
  • read
  • setRoleName
  • setRoleNameIsSet
  • toString
  • unsetRoleName
  • validate
  • write
  • write

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now