protected PrincipalPrivilegeSet deepCopy(PrincipalPrivilegeSet pps) { PrincipalPrivilegeSet copy = null; if (pps != null) { copy = new PrincipalPrivilegeSet(pps); } return copy; }
public PrincipalPrivilegeSet deepCopy() { return new PrincipalPrivilegeSet(this); }
protected PrincipalPrivilegeSet deepCopy(PrincipalPrivilegeSet pps) { PrincipalPrivilegeSet copy = null; if (pps != null) { copy = new PrincipalPrivilegeSet(pps); } return copy; }
public static PrincipalPrivilegeSet toMetastoreApiPrincipalPrivilegeSet(String grantee, PrincipalPrivileges privileges) { ImmutableMap.Builder<String, List<PrivilegeGrantInfo>> userPrivileges = ImmutableMap.builder(); for (Map.Entry<String, Collection<HivePrivilegeInfo>> entry : privileges.getUserPrivileges().asMap().entrySet()) { userPrivileges.put(entry.getKey(), entry.getValue().stream() .map(privilegeInfo -> toMetastoreApiPrivilegeGrantInfo(grantee, privilegeInfo)) .collect(toList())); } ImmutableMap.Builder<String, List<PrivilegeGrantInfo>> rolePrivileges = ImmutableMap.builder(); for (Map.Entry<String, Collection<HivePrivilegeInfo>> entry : privileges.getRolePrivileges().asMap().entrySet()) { rolePrivileges.put(entry.getKey(), entry.getValue().stream() .map(privilegeInfo -> toMetastoreApiPrivilegeGrantInfo(grantee, privilegeInfo)) .collect(toList())); } return new PrincipalPrivilegeSet(userPrivileges.build(), ImmutableMap.of(), rolePrivileges.build()); }
/** * Performs a deep copy on <i>other</i>. */ public PartitionWithoutSD(PartitionWithoutSD other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetValues()) { List<String> __this__values = new ArrayList<String>(other.values); this.values = __this__values; } this.createTime = other.createTime; this.lastAccessTime = other.lastAccessTime; if (other.isSetRelativePath()) { this.relativePath = other.relativePath; } if (other.isSetParameters()) { Map<String,String> __this__parameters = new HashMap<String,String>(other.parameters); this.parameters = __this__parameters; } if (other.isSetPrivileges()) { this.privileges = new PrincipalPrivilegeSet(other.privileges); } }
case 6: // PRIVILEGES if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.privileges = new PrincipalPrivilegeSet(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true);
List<String> groupNames) throws InvalidObjectException, MetaException { boolean commited = false; PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); try { openTransaction();
dbName = normalizeIdentifier(dbName); PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); try { openTransaction();
List<String> groupNames) throws InvalidObjectException, MetaException { boolean commited = false; PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); tableName = normalizeIdentifier(tableName); dbName = normalizeIdentifier(dbName);
throws InvalidObjectException, MetaException { boolean commited = false; PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); tableName = normalizeIdentifier(tableName); catName = normalizeIdentifier(catName);
PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); try { openTransaction();
struct.privileges = new PrincipalPrivilegeSet(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true);
struct.privileges = new PrincipalPrivilegeSet(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true);
private static class ThreadLocalHive extends ThreadLocal<Hive> { @Override protected Hive initialValue() { return null; } @Override public synchronized void set(Hive hiveObj) { Hive currentHive = this.get(); if (currentHive != hiveObj) { // Remove/close current thread-local Hive object before overwriting with new Hive object. remove(); super.set(hiveObj); } } @Override public synchronized void remove() { Hive currentHive = this.get(); if (currentHive != null) { // Close the metastore connections before removing it from thread local hiveDB. currentHive.close(false); super.remove(); } } }
this.privileges = new PrincipalPrivilegeSet(other.privileges);
struct.privileges = new PrincipalPrivilegeSet(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true);
this.privileges = new PrincipalPrivilegeSet(other.privileges);
struct.privileges = new PrincipalPrivilegeSet(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true);
this.privileges = new PrincipalPrivilegeSet(other.privileges);
PrincipalPrivilegeSet principalPrivs = new PrincipalPrivilegeSet(); SessionState ss = SessionState.get(); if (ss != null) {