Index: metastore/scripts/upgrade/derby/upgrade-0.8.0.derby.sql =================================================================== --- metastore/scripts/upgrade/derby/upgrade-0.8.0.derby.sql (revision 0) +++ metastore/scripts/upgrade/derby/upgrade-0.8.0.derby.sql (revision 0) @@ -0,0 +1,3 @@ +-- HIVE-1788: Add more calls to metastore thrift interface to support +-- looking up tables by owner +CREATE INDEX "TABLEBYOWNER" ON "TBLS"("OWNER", "DB_ID", "TBL_NAME"); Index: metastore/scripts/upgrade/mysql/upgrade-0.8.0.mysql.sql =================================================================== --- metastore/scripts/upgrade/mysql/upgrade-0.8.0.mysql.sql (revision 0) +++ metastore/scripts/upgrade/mysql/upgrade-0.8.0.mysql.sql (revision 0) @@ -0,0 +1,3 @@ +-- HIVE-1788: Add more calls to metastore thrift interface to support +-- looking up tables by owner +CREATE INDEX "TABLEBYOWNER" ON "TBLS"("OWNER", "DB_ID", "TBL_NAME"); Index: metastore/scripts/upgrade/postgres/upgrade-0.8.0.postgres.sql =================================================================== --- metastore/scripts/upgrade/postgres/upgrade-0.8.0.postgres.sql (revision 0) +++ metastore/scripts/upgrade/postgres/upgrade-0.8.0.postgres.sql (revision 0) @@ -0,0 +1,3 @@ +-- HIVE-1788: Add more calls to metastore thrift interface to support +-- looking up tables by owner +CREATE INDEX "TABLEBYOWNER" ON "TBLS"("OWNER", "DB_ID", "TBL_NAME"); Index: metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java =================================================================== --- metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (revision 1072194) +++ metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (working copy) @@ -590,7 +590,10 @@ String dbName = "simpdb"; String tblName = "simptbl"; String tblName2 = "simptbl2"; + String tblName3 = "simptbl3"; String typeName = "Person"; + String owner1 = "owner1"; + String owner2 = "owner2"; client.dropTable(dbName, tblName); silentDropDatabase(dbName); @@ -612,6 +615,7 @@ Table tbl = new Table(); tbl.setDbName(dbName); tbl.setTableName(tblName); + tbl.setOwner(owner1); StorageDescriptor sd = new StorageDescriptor(); tbl.setSd(sd); sd.setCols(typ1.getFields()); @@ -644,6 +648,7 @@ assertNotNull(tbl2); assertEquals(tbl2.getDbName(), dbName); assertEquals(tbl2.getTableName(), tblName); + assertEquals(tbl2.getOwner(), owner1); assertEquals(tbl2.getSd().getCols().size(), typ1.getFields().size()); assertEquals(tbl2.getSd().isCompressed(), false); assertEquals(tbl2.getSd().getNumBuckets(), 1); @@ -654,6 +659,7 @@ org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "1"); tbl2.setTableName(tblName2); + tbl2.setOwner(owner2); tbl2.setParameters(new HashMap()); tbl2.getParameters().put("EXTERNAL", "TRUE"); tbl2.getSd().setLocation(tbl.getSd().getLocation() + "-2"); @@ -685,6 +691,7 @@ assertNotNull(tbl3); assertEquals(tbl3.getDbName(), dbName); assertEquals(tbl3.getTableName(), tblName2); + assertEquals(tbl3.getOwner(), owner2); assertEquals(tbl3.getSd().getCols().size(), typ1.getFields().size()); assertEquals(tbl3.getSd().isCompressed(), false); assertEquals(tbl3.getSd().getNumBuckets(), 1); @@ -716,6 +723,68 @@ (tbl2.getPartitionKeys() == null) || (tbl2.getPartitionKeys().size() == 0)); + tbl3.setTableName(tblName3); + tbl3.setOwner(owner2); + tbl3.setParameters(new HashMap()); + tbl3.getParameters().put("EXTERNAL", "TRUE"); + tbl3.getSd().setLocation(tbl.getSd().getLocation() + "-3"); + client.createTable(tbl3); + + // Test out the getTablesByOwner api + List tab_names = client.getTablesByOwner(owner1); + List tabs = client.getTablesByNames(tab_names); + assertNotNull(tabs); + assertEquals(tabs.size(), 1); + assertEquals(tabs.get(0).getDbName(), dbName); + assertEquals(tabs.get(0).getTableName(), tblName); + assertEquals(tabs.get(0).getOwner(), owner1); + assertEquals(tabs.get(0).getSd().getCols().size(), typ1.getFields().size()); + assertEquals(tabs.get(0).getSd().isCompressed(), false); + assertEquals(tabs.get(0).getSd().getNumBuckets(), 1); + assertEquals(tabs.get(0).getSd().getLocation(), tbl.getSd().getLocation()); + + tab_names = client.getTablesByOwner(owner2); + tabs = client.getTablesByNames(tab_names); + assertNotNull(tabs); + assertEquals(tabs.size(), 2); + assertEquals(tabs.get(0).getDbName(), dbName); + assertEquals(tabs.get(0).getTableName(), tblName2); + assertEquals(tabs.get(0).getOwner(), owner2); + assertEquals(tabs.get(0).getSd().getCols().size(), typ1.getFields().size()); + assertEquals(tabs.get(0).getSd().isCompressed(), false); + assertEquals(tabs.get(0).getSd().getNumBuckets(), 1); + assertEquals(tabs.get(0).getSd().getLocation(), tbl2.getSd().getLocation()); + + assertEquals(tabs.get(1).getDbName(), dbName); + assertEquals(tabs.get(1).getTableName(), tblName3); + assertEquals(tabs.get(1).getOwner(), owner2); + assertEquals(tabs.get(1).getSd().getCols().size(), typ1.getFields().size()); + assertEquals(tabs.get(1).getSd().isCompressed(), false); + assertEquals(tabs.get(1).getSd().getNumBuckets(), 1); + assertEquals(tabs.get(1).getSd().getLocation(), tbl3.getSd().getLocation()); + + tab_names = client.getTablesByOwner(owner2); + tabs = client.getTablesByNames(tab_names.subList(1, tab_names.size())); + assertNotNull(tabs); + assertEquals(tabs.size(), 1); + assertEquals(tabs.get(0).getDbName(), dbName); + assertEquals(tabs.get(0).getTableName(), tblName3); + assertEquals(tabs.get(0).getOwner(), owner2); + assertEquals(tabs.get(0).getSd().getCols().size(), typ1.getFields().size()); + assertEquals(tabs.get(0).getSd().isCompressed(), false); + assertEquals(tabs.get(0).getSd().getNumBuckets(), 1); + assertEquals(tabs.get(0).getSd().getLocation(), tbl3.getSd().getLocation()); + + tab_names = client.getTablesByOwner("dummy"); + tabs = client.getTablesByNames(tab_names); + assertNotNull(tabs); + assertEquals(tabs.size(), 0); + + tab_names = client.getTablesByOwner(owner1); + tabs = client.getTablesByNames(tab_names.subList(0, 0)); + assertNotNull(tabs); + assertEquals(tabs.size(), 0); + FileSystem fs = FileSystem.get((new Path(tbl.getSd().getLocation())).toUri(), hiveConf); client.dropTable(dbName, tblName); assertFalse(fs.exists(new Path(tbl.getSd().getLocation()))); @@ -723,6 +792,9 @@ client.dropTable(dbName, tblName2); assertTrue(fs.exists(new Path(tbl2.getSd().getLocation()))); + client.dropTable(dbName, tblName3); + assertTrue(fs.exists(new Path(tbl3.getSd().getLocation()))); + client.dropType(typeName); client.dropDatabase(dbName); } catch (Exception e) { Index: metastore/src/model/package.jdo =================================================================== --- metastore/src/model/package.jdo (revision 1072194) +++ metastore/src/model/package.jdo (working copy) @@ -91,6 +91,11 @@ + + + + + Index: metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (revision 1072194) +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (working copy) @@ -116,6 +116,12 @@ public List getAllTables(String dbName) throws MetaException; + public List getTablesByOwner(String owner) + throws MetaException; + + public List
getTablesByNames(List names) + throws MetaException; + public abstract List listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException; @@ -144,48 +150,48 @@ public abstract List getPartitionsByFilter( String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException; - + public abstract boolean addRole(String rowName, String ownerName) throws InvalidObjectException, MetaException, NoSuchObjectException; - + public abstract boolean removeRole(String roleName) throws MetaException, NoSuchObjectException; - + public abstract boolean grantRole(Role role, String userName, PrincipalType principalType, - String grantor, PrincipalType grantorType, boolean grantOption) + String grantor, PrincipalType grantorType, boolean grantOption) throws MetaException, NoSuchObjectException, InvalidObjectException; - - public abstract boolean revokeRole(Role role, String userName, PrincipalType principalType) + + public abstract boolean revokeRole(Role role, String userName, PrincipalType principalType) throws MetaException, NoSuchObjectException; public abstract PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List groupNames) throws InvalidObjectException, MetaException; - - public abstract PrincipalPrivilegeSet getDBPrivilegeSet (String dbName, String userName, + + public abstract PrincipalPrivilegeSet getDBPrivilegeSet (String dbName, String userName, List groupNames) throws InvalidObjectException, MetaException; - - public abstract PrincipalPrivilegeSet getTablePrivilegeSet (String dbName, String tableName, + + public abstract PrincipalPrivilegeSet getTablePrivilegeSet (String dbName, String tableName, String userName, List groupNames) throws InvalidObjectException, MetaException; - - public abstract PrincipalPrivilegeSet getPartitionPrivilegeSet (String dbName, String tableName, + + public abstract PrincipalPrivilegeSet getPartitionPrivilegeSet (String dbName, String tableName, String partition, String userName, List groupNames) throws InvalidObjectException, MetaException; - - public abstract PrincipalPrivilegeSet getColumnPrivilegeSet (String dbName, String tableName, String partitionName, + + public abstract PrincipalPrivilegeSet getColumnPrivilegeSet (String dbName, String tableName, String partitionName, String columnName, String userName, List groupNames) throws InvalidObjectException, MetaException; - + public abstract List listPrincipalGlobalGrants(String principalName, PrincipalType principalType); - + public abstract List listPrincipalDBGrants(String principalName, PrincipalType principalType, String dbName); public abstract List listAllTableGrants( String principalName, PrincipalType principalType, String dbName, String tableName); - + public abstract List listPrincipalPartitionGrants( String principalName, PrincipalType principalType, String dbName, String tableName, String partName); - + public abstract List listPrincipalTableColumnGrants( String principalName, PrincipalType principalType, String dbName, String tableName, String columnName); @@ -193,21 +199,21 @@ public abstract List listPrincipalPartitionColumnGrants( String principalName, PrincipalType principalType, String dbName, String tableName, String partName, String columnName); - - public abstract boolean grantPrivileges (PrivilegeBag privileges) + + public abstract boolean grantPrivileges (PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException; - - public abstract boolean revokePrivileges (PrivilegeBag privileges) + + public abstract boolean revokePrivileges (PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException; public abstract org.apache.hadoop.hive.metastore.api.Role getRole( String roleName) throws NoSuchObjectException; public List listRoleNames(); - + public List listRoles(String principalName, PrincipalType principalType); - + public abstract Partition getPartitionWithAuth(String dbName, String tblName, List partVals, String user_name, List group_names) throws MetaException, NoSuchObjectException, InvalidObjectException; Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (revision 1072194) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (working copy) @@ -582,7 +582,7 @@ return deepCopyPartitions( client.get_partitions_ps(db_name, tbl_name, part_vals, max_parts)); } - + @Override public List listPartitionsWithAuthInfo(String db_name, String tbl_name, short max_parts, String user_name, List group_names) @@ -648,7 +648,7 @@ List part_vals) throws NoSuchObjectException, MetaException, TException { return deepCopy(client.get_partition(db_name, tbl_name, part_vals)); } - + @Override public Partition getPartitionWithAuthInfo(String db_name, String tbl_name, List part_vals, String user_name, List group_names) @@ -712,6 +712,28 @@ return null; } + /** {@inheritDoc} */ + public List getTablesByOwner(String owner) + throws MetaException { + try { + return client.get_table_names_by_owner(owner); + } catch (Exception e) { + MetaStoreUtils.logAndThrowMetaException(e); + } + return null; + } + + /** {@inheritDoc} */ + public List
getTablesByNames(List names) + throws MetaException { + try { + return client.get_tables_by_names(names); + } catch (Exception e) { + MetaStoreUtils.logAndThrowMetaException(e); + } + return null; + } + public boolean tableExists(String databaseName, String tableName) throws MetaException, TException, UnknownDBException { try { @@ -1005,13 +1027,13 @@ public boolean drop_role(String roleName) throws MetaException, TException { return client.drop_role(roleName); } - + @Override public List list_roles(String principalName, PrincipalType principalType) throws MetaException, TException { return client.list_roles(principalName, principalType); } - + @Override public List listRoleNames() throws MetaException, TException { return client.get_role_names(); Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1072194) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -1729,6 +1729,50 @@ return ret; } + public List get_table_names_by_owner(final String owner) + throws MetaException { + + startFunction("get_table_names_by_owner", ": owner=" + owner); + + List ret; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + return ms.getTablesByOwner(owner); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + assert(e instanceof RuntimeException); + throw (RuntimeException)e; + } + return ret; + } + + public List
get_tables_by_names(final List names) + throws MetaException { + + startFunction("get_tables_by_names"); + + List
ret; + try { + ret = executeWithRetry(new Command>() { + @Override + List
run(RawStore ms) throws Exception { + return ms.getTablesByNames(names); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + assert(e instanceof RuntimeException); + throw (RuntimeException)e; + } + return ret; + } + public List get_fields(String db, String tableName) throws MetaException, UnknownTableException, UnknownDBException { startFunction("get_fields", ": db=" + db + "tbl=" + tableName); Index: metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (revision 1072194) +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (working copy) @@ -405,7 +405,7 @@ db.setParameters(mdb.getParameters()); return db; } - + /** * Alter the database object in metastore. Currently only the parameters * of the database can be changed. @@ -614,7 +614,7 @@ Map> groupPrivs = principalPrivs.getGroupPrivileges(); putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, groupPrivs, PrincipalType.GROUP); - + Map> rolePrivs = principalPrivs.getRolePrivileges(); putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, rolePrivs, PrincipalType.ROLE); } @@ -631,7 +631,7 @@ * Convert PrivilegeGrantInfo from privMap to MTablePrivilege, and add all of * them to the toPersistPrivObjs. These privilege objects will be persisted as * part of createTable. - * + * * @param mtbl * @param toPersistPrivObjs * @param now @@ -682,7 +682,7 @@ if (partGrants != null && partGrants.size() > 0) { pm.deletePersistentAll(partGrants); } - + List partColGrants = listTableAllPartitionColumnGrants(dbName, tableName); if (partColGrants != null && partColGrants.size() > 0) { @@ -700,7 +700,7 @@ } return success; } - + public Table getTable(String dbName, String tableName) throws MetaException { boolean commited = false; Table tbl = null; @@ -762,6 +762,71 @@ return getTables(dbName, ".*"); } + public List getTablesByOwner(String owner) + throws MetaException { + boolean commited = false; + List tbls = null; + try { + openTransaction(); + String o = owner.toLowerCase().trim(); + String query = + "select tableName from org.apache.hadoop.hive.metastore.model.MTable " + + "where owner == o"; + + Query q = pm.newQuery(query); + q.declareParameters("java.lang.String o"); + q.setResult("tableName"); + q.setOrdering("tableName ascending"); + Collection names = (Collection) q.execute(o); + tbls = new ArrayList(); + for (Iterator i = names.iterator(); i.hasNext();) { + tbls.add((String) i.next()); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return tbls; + } + + public List
getTablesByNames(List names) + throws MetaException { + + List
tbls = null; + boolean commited = false; + try { + openTransaction(); + String filter = new String("tableName in ("); + boolean first = true; + for (String name: names) { + if (!first) { + filter += ", "; + } + filter += name; + } + filter += ")"; + + Query query = pm.newQuery(MTable.class, filter); + query.setOrdering("database.name ascending, tableName ascending"); + Collection c = (Collection) query.execute(); + List mtbls = new ArrayList(); + tbls = new ArrayList
(); + for (Iterator i = c.iterator(); i.hasNext();) { + MTable mtbl = (MTable)i.next(); + pm.retrieve(mtbl); + tbls.add(convertToTable(mtbl)); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return tbls; + } + private MTable getMTable(String db, String table) { MTable mtbl = null; boolean commited = false; @@ -960,7 +1025,7 @@ toPersist.add(partGrant); } } - + if (tabColumnGrants != null) { for (MTableColumnPrivilege col : tabColumnGrants) { MPartitionColumnPrivilege partColumn = new MPartitionColumnPrivilege(col @@ -969,7 +1034,7 @@ .getGrantorType(), col.getGrantOption()); toPersist.add(partColumn); } - + if (toPersist.size() > 0) { pm.makePersistentAll(toPersist); } @@ -996,7 +1061,7 @@ } return part; } - + private MPartition getMPartition(String dbName, String tableName, List part_vals) throws MetaException { MPartition mpart = null; @@ -1068,7 +1133,7 @@ colNames.add(col.getName()); } String partName = FileUtils.makePartName(colNames, part_vals); - + List partGrants = listPartitionGrants( dbName, tableName, partName); @@ -1134,7 +1199,7 @@ } } } - + @Override public Partition getPartitionWithAuth(String dbName, String tblName, List partVals, String user_name, List group_names) @@ -1778,7 +1843,7 @@ } return success; } - + private MRoleMap getMSecurityUserRoleMap(String userName, PrincipalType principalType, String roleName) { MRoleMap mRoleMember = null; @@ -1861,7 +1926,7 @@ } return success; } - + private List listRoles(String userName, List groupNames) { List ret = new ArrayList(); @@ -1875,7 +1940,7 @@ } return ret; } - + @SuppressWarnings("unchecked") @Override public List listRoles(String principalName, @@ -1942,7 +2007,7 @@ .getOwnerName()); return ret; } - + private MRole getMRole(String roleName) { MRole mrole = null; boolean commited = false; @@ -1961,7 +2026,7 @@ } return mrole; } - + public List listRoleNames() { boolean success = false; try { @@ -1982,7 +2047,7 @@ } } } - + @Override public PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List groupNames) throws InvalidObjectException, MetaException { @@ -2030,7 +2095,7 @@ } return ret; } - + public List getDBPrivilege(String dbName, String principalName, PrincipalType principalType) throws InvalidObjectException, MetaException { @@ -2054,7 +2119,7 @@ return new ArrayList(0); } - + @Override public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, String userName, List groupNames) throws InvalidObjectException, @@ -2185,7 +2250,7 @@ } return ret; } - + @Override public PrincipalPrivilegeSet getColumnPrivilegeSet(String dbName, String tableName, String partitionName, String columnName, @@ -2231,7 +2296,7 @@ } return ret; } - + private List getPartitionPrivilege(String dbName, String tableName, String partName, String principalName, PrincipalType principalType) { @@ -2262,7 +2327,7 @@ private PrincipalType getPrincipalTypeFromStr(String str) { return str == null ? null : PrincipalType.valueOf(str); } - + private List getTablePrivilege(String dbName, String tableName, String principalName, PrincipalType principalType) { tableName = tableName.toLowerCase().trim(); @@ -2286,11 +2351,11 @@ } return new ArrayList(0); } - + private List getColumnPrivilege(String dbName, String tableName, String columnName, String partitionName, String principalName, PrincipalType principalType) { - + tableName = tableName.toLowerCase().trim(); dbName = dbName.toLowerCase().trim(); columnName = columnName.toLowerCase().trim(); @@ -2472,7 +2537,7 @@ userName, principalType, hiveObject.getDbName(), hiveObject .getObjectName(), partObj.getPartitionName(), hiveObject.getColumnName()); - + if (colPrivs != null) { for (MPartitionColumnPrivilege priv : colPrivs) { if (priv.getGrantor().equalsIgnoreCase(grantor)) { @@ -2495,13 +2560,13 @@ grantOption); persistentObjs.add(mCol); } - + } else { List colPrivs = null; colPrivs = this.listPrincipalTableColumnGrants( userName, principalType, hiveObject.getDbName(), hiveObject .getObjectName(), hiveObject.getColumnName()); - + if (colPrivs != null) { for (MTableColumnPrivilege priv : colPrivs) { if (priv.getGrantor().equalsIgnoreCase(grantor)) { @@ -2539,7 +2604,7 @@ } return committed; } - + @Override public boolean revokePrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException { @@ -2547,13 +2612,13 @@ try { openTransaction(); List persistentObjs = new ArrayList(); - + List privilegeList = privileges.getPrivileges(); - + if (privilegeList != null && privilegeList.size() > 0) { Iterator privIter = privilegeList.iterator(); - + while (privIter.hasNext()) { HiveObjectPrivilege privDef = privIter.next(); HiveObjectRef hiveObject = privDef.getHiveObject(); @@ -2585,7 +2650,7 @@ } } } - + } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) { MDatabase dbObj = getMDatabase(hiveObject.getDbName()); if (dbObj != null) { @@ -2630,7 +2695,7 @@ } } } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) { - + boolean found = false; Table tabObj = this.getTable(hiveObject.getDbName(), hiveObject.getObjectName()); String partName = null; @@ -2664,7 +2729,7 @@ partName = Warehouse.makePartName(tabObj.getPartitionKeys(), hiveObject.getPartValues()); } - + if (partName != null) { List mSecCol = listPrincipalPartitionColumnGrants( userName, principalType, hiveObject.getDbName(), hiveObject @@ -2718,7 +2783,7 @@ } } } - + if (persistentObjs.size() > 0) { pm.deletePersistentAll(persistentObjs); } @@ -2730,7 +2795,7 @@ } return committed; } - + @SuppressWarnings("unchecked") private List listRoleMembers( MRole mRol) { @@ -2756,7 +2821,7 @@ } return mRoleMemeberList; } - + @SuppressWarnings("unchecked") @Override public List listPrincipalGlobalGrants(String principalName, PrincipalType principalType) { @@ -2809,7 +2874,7 @@ } return mSecurityDBList; } - + @SuppressWarnings("unchecked") private List listPrincipalAllDBGrant( String principalName, PrincipalType principalType) { @@ -2866,7 +2931,7 @@ } return mSecurityTabList; } - + @SuppressWarnings("unchecked") public List listTableAllPartitionGrants(String dbName, String tableName) { @@ -2896,7 +2961,7 @@ } return mSecurityTabPartList; } - + @SuppressWarnings("unchecked") public List listTableAllColumnGrants(String dbName, String tableName) { @@ -2924,7 +2989,7 @@ } return mTblColPrivilegeList; } - + @SuppressWarnings("unchecked") public List listTableAllPartitionColumnGrants(String dbName, String tableName) { @@ -2952,7 +3017,7 @@ } return mSecurityColList; } - + @SuppressWarnings("unchecked") public List listPartitionAllColumnGrants(String dbName, String tableName, String partName) { @@ -3006,7 +3071,7 @@ } } } - + @SuppressWarnings("unchecked") private List listPartitionGrants(String dbName, String tableName, String partName) { @@ -3091,7 +3156,7 @@ mSecurityTabPartList = (List) query .executeWithArray(principalName, principalType.toString(), tableName, dbName, partName); LOG.debug("Done executing query for listMSecurityPrincipalPartitionGrant"); - + pm.retrieveAll(mSecurityTabPartList); success = commitTransaction(); LOG.debug("Done retrieving all objects for listMSecurityPrincipalPartitionGrant"); @@ -3136,7 +3201,7 @@ } return mSecurityColList; } - + @SuppressWarnings("unchecked") public List listPrincipalPartitionColumnGrants( String principalName, PrincipalType principalType, String dbName, @@ -3175,7 +3240,7 @@ } return mSecurityColList; } - + @SuppressWarnings("unchecked") private List listPrincipalAllTableGrants( String principalName, PrincipalType principalType) { @@ -3229,7 +3294,7 @@ } return mSecurityTabPartList; } - + @SuppressWarnings("unchecked") private List listPrincipalAllTableColumnGrants( String principalName, PrincipalType principalType) { @@ -3255,7 +3320,7 @@ } return mSecurityColumnList; } - + @SuppressWarnings("unchecked") private List listPrincipalAllPartitionColumnGrants( String principalName, PrincipalType principalType) { Index: metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java (revision 1072194) +++ metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java (working copy) @@ -615,9 +615,8 @@ * @throws MetaException */ static void logAndThrowMetaException(Exception e) throws MetaException { - LOG - .error("Got exception: " + e.getClass().getName() + " " - + e.getMessage()); + LOG.error("Got exception: " + e.getClass().getName() + " " + + e.getMessage()); LOG.error(StringUtils.stringifyException(e)); throw new MetaException("Got exception: " + e.getClass().getName() + " " + e.getMessage()); Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (revision 1072194) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -135,6 +135,20 @@ """ pass + def get_table_names_by_owner(self, owner): + """ + Parameters: + - owner + """ + pass + + def get_tables_by_names(self, table_names): + """ + Parameters: + - table_names + """ + pass + def get_table(self, dbname, tbl_name): """ Parameters: @@ -1045,6 +1059,70 @@ raise result.o1 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); + def get_table_names_by_owner(self, owner): + """ + Parameters: + - owner + """ + self.send_get_table_names_by_owner(owner) + return self.recv_get_table_names_by_owner() + + def send_get_table_names_by_owner(self, owner): + self._oprot.writeMessageBegin('get_table_names_by_owner', TMessageType.CALL, self._seqid) + args = get_table_names_by_owner_args() + args.owner = owner + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_names_by_owner(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_table_names_by_owner_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_names_by_owner failed: unknown result"); + + def get_tables_by_names(self, table_names): + """ + Parameters: + - table_names + """ + self.send_get_tables_by_names(table_names) + return self.recv_get_tables_by_names() + + def send_get_tables_by_names(self, table_names): + self._oprot.writeMessageBegin('get_tables_by_names', TMessageType.CALL, self._seqid) + args = get_tables_by_names_args() + args.table_names = table_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables_by_names(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_tables_by_names_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables_by_names failed: unknown result"); + def get_table(self, dbname, tbl_name): """ Parameters: @@ -2556,6 +2634,8 @@ self._processMap["drop_table"] = Processor.process_drop_table self._processMap["get_tables"] = Processor.process_get_tables self._processMap["get_all_tables"] = Processor.process_get_all_tables + self._processMap["get_table_names_by_owner"] = Processor.process_get_table_names_by_owner + self._processMap["get_tables_by_names"] = Processor.process_get_tables_by_names self._processMap["get_table"] = Processor.process_get_table self._processMap["alter_table"] = Processor.process_alter_table self._processMap["add_partition"] = Processor.process_add_partition @@ -2873,6 +2953,34 @@ oprot.writeMessageEnd() oprot.trans.flush() + def process_get_table_names_by_owner(self, seqid, iprot, oprot): + args = get_table_names_by_owner_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_names_by_owner_result() + try: + result.success = self._handler.get_table_names_by_owner(args.owner) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_table_names_by_owner", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables_by_names(self, seqid, iprot, oprot): + args = get_tables_by_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_by_names_result() + try: + result.success = self._handler.get_tables_by_names(args.table_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_tables_by_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_get_table(self, seqid, iprot, oprot): args = get_table_args() args.read(iprot) @@ -5890,6 +5998,291 @@ def __ne__(self, other): return not (self == other) +class get_table_names_by_owner_args: + """ + Attributes: + - owner + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'owner', None, None, ), # 1 + ) + + def __init__(self, owner=None,): + self.owner = owner + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.owner = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_names_by_owner_args') + if self.owner != None: + oprot.writeFieldBegin('owner', TType.STRING, 1) + oprot.writeString(self.owner) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_names_by_owner_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype228, _size225) = iprot.readListBegin() + for _i229 in xrange(_size225): + _elem230 = iprot.readString(); + self.success.append(_elem230) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_names_by_owner_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter231 in self.success: + oprot.writeString(iter231) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_by_names_args: + """ + Attributes: + - table_names + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'table_names', (TType.STRING,None), None, ), # 1 + ) + + def __init__(self, table_names=None,): + self.table_names = table_names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.table_names = [] + (_etype235, _size232) = iprot.readListBegin() + for _i236 in xrange(_size232): + _elem237 = iprot.readString(); + self.table_names.append(_elem237) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_by_names_args') + if self.table_names != None: + oprot.writeFieldBegin('table_names', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.table_names)) + for iter238 in self.table_names: + oprot.writeString(iter238) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_by_names_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype242, _size239) = iprot.readListBegin() + for _i243 in xrange(_size239): + _elem244 = Table() + _elem244.read(iprot) + self.success.append(_elem244) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_by_names_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter245 in self.success: + iter245.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class get_table_args: """ Attributes: @@ -6403,10 +6796,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype228, _size225) = iprot.readListBegin() - for _i229 in xrange(_size225): - _elem230 = iprot.readString(); - self.part_vals.append(_elem230) + (_etype249, _size246) = iprot.readListBegin() + for _i250 in xrange(_size246): + _elem251 = iprot.readString(); + self.part_vals.append(_elem251) iprot.readListEnd() else: iprot.skip(ftype) @@ -6431,8 +6824,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter231 in self.part_vals: - oprot.writeString(iter231) + for iter252 in self.part_vals: + oprot.writeString(iter252) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6776,10 +7169,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype235, _size232) = iprot.readListBegin() - for _i236 in xrange(_size232): - _elem237 = iprot.readString(); - self.part_vals.append(_elem237) + (_etype256, _size253) = iprot.readListBegin() + for _i257 in xrange(_size253): + _elem258 = iprot.readString(); + self.part_vals.append(_elem258) iprot.readListEnd() else: iprot.skip(ftype) @@ -6809,8 +7202,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter238 in self.part_vals: - oprot.writeString(iter238) + for iter259 in self.part_vals: + oprot.writeString(iter259) oprot.writeListEnd() oprot.writeFieldEnd() if self.deleteData != None: @@ -7139,10 +7532,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype242, _size239) = iprot.readListBegin() - for _i243 in xrange(_size239): - _elem244 = iprot.readString(); - self.part_vals.append(_elem244) + (_etype263, _size260) = iprot.readListBegin() + for _i264 in xrange(_size260): + _elem265 = iprot.readString(); + self.part_vals.append(_elem265) iprot.readListEnd() else: iprot.skip(ftype) @@ -7167,8 +7560,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter245 in self.part_vals: - oprot.writeString(iter245) + for iter266 in self.part_vals: + oprot.writeString(iter266) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7321,10 +7714,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype249, _size246) = iprot.readListBegin() - for _i250 in xrange(_size246): - _elem251 = iprot.readString(); - self.part_vals.append(_elem251) + (_etype270, _size267) = iprot.readListBegin() + for _i271 in xrange(_size267): + _elem272 = iprot.readString(); + self.part_vals.append(_elem272) iprot.readListEnd() else: iprot.skip(ftype) @@ -7336,10 +7729,10 @@ elif fid == 5: if ftype == TType.LIST: self.group_names = [] - (_etype255, _size252) = iprot.readListBegin() - for _i256 in xrange(_size252): - _elem257 = iprot.readString(); - self.group_names.append(_elem257) + (_etype276, _size273) = iprot.readListBegin() + for _i277 in xrange(_size273): + _elem278 = iprot.readString(); + self.group_names.append(_elem278) iprot.readListEnd() else: iprot.skip(ftype) @@ -7364,8 +7757,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter258 in self.part_vals: - oprot.writeString(iter258) + for iter279 in self.part_vals: + oprot.writeString(iter279) oprot.writeListEnd() oprot.writeFieldEnd() if self.user_name != None: @@ -7375,8 +7768,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter259 in self.group_names: - oprot.writeString(iter259) + for iter280 in self.group_names: + oprot.writeString(iter280) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7763,11 +8156,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype263, _size260) = iprot.readListBegin() - for _i264 in xrange(_size260): - _elem265 = Partition() - _elem265.read(iprot) - self.success.append(_elem265) + (_etype284, _size281) = iprot.readListBegin() + for _i285 in xrange(_size281): + _elem286 = Partition() + _elem286.read(iprot) + self.success.append(_elem286) iprot.readListEnd() else: iprot.skip(ftype) @@ -7796,8 +8189,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter266 in self.success: - iter266.write(oprot) + for iter287 in self.success: + iter287.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -7883,10 +8276,10 @@ elif fid == 5: if ftype == TType.LIST: self.group_names = [] - (_etype270, _size267) = iprot.readListBegin() - for _i271 in xrange(_size267): - _elem272 = iprot.readString(); - self.group_names.append(_elem272) + (_etype291, _size288) = iprot.readListBegin() + for _i292 in xrange(_size288): + _elem293 = iprot.readString(); + self.group_names.append(_elem293) iprot.readListEnd() else: iprot.skip(ftype) @@ -7919,8 +8312,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter273 in self.group_names: - oprot.writeString(iter273) + for iter294 in self.group_names: + oprot.writeString(iter294) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7971,11 +8364,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype277, _size274) = iprot.readListBegin() - for _i278 in xrange(_size274): - _elem279 = Partition() - _elem279.read(iprot) - self.success.append(_elem279) + (_etype298, _size295) = iprot.readListBegin() + for _i299 in xrange(_size295): + _elem300 = Partition() + _elem300.read(iprot) + self.success.append(_elem300) iprot.readListEnd() else: iprot.skip(ftype) @@ -8004,8 +8397,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter280 in self.success: - iter280.write(oprot) + for iter301 in self.success: + iter301.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8144,10 +8537,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype284, _size281) = iprot.readListBegin() - for _i285 in xrange(_size281): - _elem286 = iprot.readString(); - self.success.append(_elem286) + (_etype305, _size302) = iprot.readListBegin() + for _i306 in xrange(_size302): + _elem307 = iprot.readString(); + self.success.append(_elem307) iprot.readListEnd() else: iprot.skip(ftype) @@ -8170,8 +8563,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter287 in self.success: - oprot.writeString(iter287) + for iter308 in self.success: + oprot.writeString(iter308) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: @@ -8240,10 +8633,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype291, _size288) = iprot.readListBegin() - for _i292 in xrange(_size288): - _elem293 = iprot.readString(); - self.part_vals.append(_elem293) + (_etype312, _size309) = iprot.readListBegin() + for _i313 in xrange(_size309): + _elem314 = iprot.readString(); + self.part_vals.append(_elem314) iprot.readListEnd() else: iprot.skip(ftype) @@ -8273,8 +8666,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter294 in self.part_vals: - oprot.writeString(iter294) + for iter315 in self.part_vals: + oprot.writeString(iter315) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -8326,11 +8719,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype298, _size295) = iprot.readListBegin() - for _i299 in xrange(_size295): - _elem300 = Partition() - _elem300.read(iprot) - self.success.append(_elem300) + (_etype319, _size316) = iprot.readListBegin() + for _i320 in xrange(_size316): + _elem321 = Partition() + _elem321.read(iprot) + self.success.append(_elem321) iprot.readListEnd() else: iprot.skip(ftype) @@ -8353,8 +8746,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter301 in self.success: - iter301.write(oprot) + for iter322 in self.success: + iter322.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8429,10 +8822,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype305, _size302) = iprot.readListBegin() - for _i306 in xrange(_size302): - _elem307 = iprot.readString(); - self.part_vals.append(_elem307) + (_etype326, _size323) = iprot.readListBegin() + for _i327 in xrange(_size323): + _elem328 = iprot.readString(); + self.part_vals.append(_elem328) iprot.readListEnd() else: iprot.skip(ftype) @@ -8449,10 +8842,10 @@ elif fid == 6: if ftype == TType.LIST: self.group_names = [] - (_etype311, _size308) = iprot.readListBegin() - for _i312 in xrange(_size308): - _elem313 = iprot.readString(); - self.group_names.append(_elem313) + (_etype332, _size329) = iprot.readListBegin() + for _i333 in xrange(_size329): + _elem334 = iprot.readString(); + self.group_names.append(_elem334) iprot.readListEnd() else: iprot.skip(ftype) @@ -8477,8 +8870,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter314 in self.part_vals: - oprot.writeString(iter314) + for iter335 in self.part_vals: + oprot.writeString(iter335) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -8492,8 +8885,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 6) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter315 in self.group_names: - oprot.writeString(iter315) + for iter336 in self.group_names: + oprot.writeString(iter336) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8544,11 +8937,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype319, _size316) = iprot.readListBegin() - for _i320 in xrange(_size316): - _elem321 = Partition() - _elem321.read(iprot) - self.success.append(_elem321) + (_etype340, _size337) = iprot.readListBegin() + for _i341 in xrange(_size337): + _elem342 = Partition() + _elem342.read(iprot) + self.success.append(_elem342) iprot.readListEnd() else: iprot.skip(ftype) @@ -8577,8 +8970,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter322 in self.success: - iter322.write(oprot) + for iter343 in self.success: + iter343.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8651,10 +9044,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype326, _size323) = iprot.readListBegin() - for _i327 in xrange(_size323): - _elem328 = iprot.readString(); - self.part_vals.append(_elem328) + (_etype347, _size344) = iprot.readListBegin() + for _i348 in xrange(_size344): + _elem349 = iprot.readString(); + self.part_vals.append(_elem349) iprot.readListEnd() else: iprot.skip(ftype) @@ -8684,8 +9077,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter329 in self.part_vals: - oprot.writeString(iter329) + for iter350 in self.part_vals: + oprot.writeString(iter350) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -8737,10 +9130,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype333, _size330) = iprot.readListBegin() - for _i334 in xrange(_size330): - _elem335 = iprot.readString(); - self.success.append(_elem335) + (_etype354, _size351) = iprot.readListBegin() + for _i355 in xrange(_size351): + _elem356 = iprot.readString(); + self.success.append(_elem356) iprot.readListEnd() else: iprot.skip(ftype) @@ -8763,8 +9156,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter336 in self.success: - oprot.writeString(iter336) + for iter357 in self.success: + oprot.writeString(iter357) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8914,11 +9307,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype340, _size337) = iprot.readListBegin() - for _i341 in xrange(_size337): - _elem342 = Partition() - _elem342.read(iprot) - self.success.append(_elem342) + (_etype361, _size358) = iprot.readListBegin() + for _i362 in xrange(_size358): + _elem363 = Partition() + _elem363.read(iprot) + self.success.append(_elem363) iprot.readListEnd() else: iprot.skip(ftype) @@ -8947,8 +9340,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter343 in self.success: - iter343.write(oprot) + for iter364 in self.success: + iter364.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -9362,10 +9755,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype347, _size344) = iprot.readListBegin() - for _i348 in xrange(_size344): - _elem349 = iprot.readString(); - self.success.append(_elem349) + (_etype368, _size365) = iprot.readListBegin() + for _i369 in xrange(_size365): + _elem370 = iprot.readString(); + self.success.append(_elem370) iprot.readListEnd() else: iprot.skip(ftype) @@ -9388,8 +9781,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter350 in self.success: - oprot.writeString(iter350) + for iter371 in self.success: + oprot.writeString(iter371) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -9500,11 +9893,11 @@ if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype352, _vtype353, _size351 ) = iprot.readMapBegin() - for _i355 in xrange(_size351): - _key356 = iprot.readString(); - _val357 = iprot.readString(); - self.success[_key356] = _val357 + (_ktype373, _vtype374, _size372 ) = iprot.readMapBegin() + for _i376 in xrange(_size372): + _key377 = iprot.readString(); + _val378 = iprot.readString(); + self.success[_key377] = _val378 iprot.readMapEnd() else: iprot.skip(ftype) @@ -9527,9 +9920,9 @@ if self.success != None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter358,viter359 in self.success.items(): - oprot.writeString(kiter358) - oprot.writeString(viter359) + for kiter379,viter380 in self.success.items(): + oprot.writeString(kiter379) + oprot.writeString(viter380) oprot.writeMapEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -10354,11 +10747,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype363, _size360) = iprot.readListBegin() - for _i364 in xrange(_size360): - _elem365 = Index() - _elem365.read(iprot) - self.success.append(_elem365) + (_etype384, _size381) = iprot.readListBegin() + for _i385 in xrange(_size381): + _elem386 = Index() + _elem386.read(iprot) + self.success.append(_elem386) iprot.readListEnd() else: iprot.skip(ftype) @@ -10387,8 +10780,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter366 in self.success: - iter366.write(oprot) + for iter387 in self.success: + iter387.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -10527,10 +10920,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype370, _size367) = iprot.readListBegin() - for _i371 in xrange(_size367): - _elem372 = iprot.readString(); - self.success.append(_elem372) + (_etype391, _size388) = iprot.readListBegin() + for _i392 in xrange(_size388): + _elem393 = iprot.readString(); + self.success.append(_elem393) iprot.readListEnd() else: iprot.skip(ftype) @@ -10553,8 +10946,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter373 in self.success: - oprot.writeString(iter373) + for iter394 in self.success: + oprot.writeString(iter394) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: @@ -10908,10 +11301,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype377, _size374) = iprot.readListBegin() - for _i378 in xrange(_size374): - _elem379 = iprot.readString(); - self.success.append(_elem379) + (_etype398, _size395) = iprot.readListBegin() + for _i399 in xrange(_size395): + _elem400 = iprot.readString(); + self.success.append(_elem400) iprot.readListEnd() else: iprot.skip(ftype) @@ -10934,8 +11327,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter380 in self.success: - oprot.writeString(iter380) + for iter401 in self.success: + oprot.writeString(iter401) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -11402,11 +11795,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype384, _size381) = iprot.readListBegin() - for _i385 in xrange(_size381): - _elem386 = Role() - _elem386.read(iprot) - self.success.append(_elem386) + (_etype405, _size402) = iprot.readListBegin() + for _i406 in xrange(_size402): + _elem407 = Role() + _elem407.read(iprot) + self.success.append(_elem407) iprot.readListEnd() else: iprot.skip(ftype) @@ -11429,8 +11822,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter387 in self.success: - iter387.write(oprot) + for iter408 in self.success: + iter408.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -11497,10 +11890,10 @@ elif fid == 3: if ftype == TType.LIST: self.group_names = [] - (_etype391, _size388) = iprot.readListBegin() - for _i392 in xrange(_size388): - _elem393 = iprot.readString(); - self.group_names.append(_elem393) + (_etype412, _size409) = iprot.readListBegin() + for _i413 in xrange(_size409): + _elem414 = iprot.readString(); + self.group_names.append(_elem414) iprot.readListEnd() else: iprot.skip(ftype) @@ -11525,8 +11918,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter394 in self.group_names: - oprot.writeString(iter394) + for iter415 in self.group_names: + oprot.writeString(iter415) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11730,11 +12123,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype398, _size395) = iprot.readListBegin() - for _i399 in xrange(_size395): - _elem400 = HiveObjectPrivilege() - _elem400.read(iprot) - self.success.append(_elem400) + (_etype419, _size416) = iprot.readListBegin() + for _i420 in xrange(_size416): + _elem421 = HiveObjectPrivilege() + _elem421.read(iprot) + self.success.append(_elem421) iprot.readListEnd() else: iprot.skip(ftype) @@ -11757,8 +12150,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter401 in self.success: - iter401.write(oprot) + for iter422 in self.success: + iter422.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (revision 1072194) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -37,6 +37,8 @@ print ' void drop_table(string dbname, string name, bool deleteData)' print ' get_tables(string db_name, string pattern)' print ' get_all_tables(string db_name)' + print ' get_table_names_by_owner(string owner)' + print ' get_tables_by_names( table_names)' print ' Table get_table(string dbname, string tbl_name)' print ' void alter_table(string dbname, string tbl_name, Table new_tbl)' print ' Partition add_partition(Partition new_part)' @@ -224,6 +226,18 @@ sys.exit(1) pp.pprint(client.get_all_tables(args[0],)) +elif cmd == 'get_table_names_by_owner': + if len(args) != 1: + print 'get_table_names_by_owner requires 1 args' + sys.exit(1) + pp.pprint(client.get_table_names_by_owner(args[0],)) + +elif cmd == 'get_tables_by_names': + if len(args) != 1: + print 'get_tables_by_names requires 1 args' + sys.exit(1) + pp.pprint(client.get_tables_by_names(eval(args[0]),)) + elif cmd == 'get_table': if len(args) != 2: print 'get_table requires 2 args' Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (revision 1072194) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (working copy) @@ -3430,6 +3430,454 @@ return xfer; } +uint32_t ThriftHiveMetastore_get_table_names_by_owner_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->owner); + this->__isset.owner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_owner_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_owner_args"); + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->owner); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_owner_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_owner_pargs"); + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->owner))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_owner_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size236; + ::apache::thrift::protocol::TType _etype239; + iprot->readListBegin(_etype239, _size236); + this->success.resize(_size236); + uint32_t _i240; + for (_i240 = 0; _i240 < _size236; ++_i240) + { + xfer += iprot->readString(this->success[_i240]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_owner_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_owner_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter241; + for (_iter241 = this->success.begin(); _iter241 != this->success.end(); ++_iter241) + { + xfer += oprot->writeString((*_iter241)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_owner_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size242; + ::apache::thrift::protocol::TType _etype245; + iprot->readListBegin(_etype245, _size242); + (*(this->success)).resize(_size242); + uint32_t _i246; + for (_i246 = 0; _i246 < _size242; ++_i246) + { + xfer += iprot->readString((*(this->success))[_i246]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->table_names.clear(); + uint32_t _size247; + ::apache::thrift::protocol::TType _etype250; + iprot->readListBegin(_etype250, _size247); + this->table_names.resize(_size247); + uint32_t _i251; + for (_i251 = 0; _i251 < _size247; ++_i251) + { + xfer += iprot->readString(this->table_names[_i251]); + } + iprot->readListEnd(); + } + this->__isset.table_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_names_args"); + xfer += oprot->writeFieldBegin("table_names", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->table_names.size()); + std::vector ::const_iterator _iter252; + for (_iter252 = this->table_names.begin(); _iter252 != this->table_names.end(); ++_iter252) + { + xfer += oprot->writeString((*_iter252)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_names_pargs"); + xfer += oprot->writeFieldBegin("table_names", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->table_names)).size()); + std::vector ::const_iterator _iter253; + for (_iter253 = (*(this->table_names)).begin(); _iter253 != (*(this->table_names)).end(); ++_iter253) + { + xfer += oprot->writeString((*_iter253)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size254; + ::apache::thrift::protocol::TType _etype257; + iprot->readListBegin(_etype257, _size254); + this->success.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) + { + xfer += this->success[_i258].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_names_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector
::const_iterator _iter259; + for (_iter259 = this->success.begin(); _iter259 != this->success.end(); ++_iter259) + { + xfer += (*_iter259).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size260; + ::apache::thrift::protocol::TType _etype263; + iprot->readListBegin(_etype263, _size260); + (*(this->success)).resize(_size260); + uint32_t _i264; + for (_i264 = 0; _i264 < _size260; ++_i264) + { + xfer += (*(this->success))[_i264].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + uint32_t ThriftHiveMetastore_get_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; @@ -4106,14 +4554,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size236; - ::apache::thrift::protocol::TType _etype239; - iprot->readListBegin(_etype239, _size236); - this->part_vals.resize(_size236); - uint32_t _i240; - for (_i240 = 0; _i240 < _size236; ++_i240) + uint32_t _size265; + ::apache::thrift::protocol::TType _etype268; + iprot->readListBegin(_etype268, _size265); + this->part_vals.resize(_size265); + uint32_t _i269; + for (_i269 = 0; _i269 < _size265; ++_i269) { - xfer += iprot->readString(this->part_vals[_i240]); + xfer += iprot->readString(this->part_vals[_i269]); } iprot->readListEnd(); } @@ -4146,10 +4594,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter241; - for (_iter241 = this->part_vals.begin(); _iter241 != this->part_vals.end(); ++_iter241) + std::vector ::const_iterator _iter270; + for (_iter270 = this->part_vals.begin(); _iter270 != this->part_vals.end(); ++_iter270) { - xfer += oprot->writeString((*_iter241)); + xfer += oprot->writeString((*_iter270)); } xfer += oprot->writeListEnd(); } @@ -4171,10 +4619,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter242; - for (_iter242 = (*(this->part_vals)).begin(); _iter242 != (*(this->part_vals)).end(); ++_iter242) + std::vector ::const_iterator _iter271; + for (_iter271 = (*(this->part_vals)).begin(); _iter271 != (*(this->part_vals)).end(); ++_iter271) { - xfer += oprot->writeString((*_iter242)); + xfer += oprot->writeString((*_iter271)); } xfer += oprot->writeListEnd(); } @@ -4626,14 +5074,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size243; - ::apache::thrift::protocol::TType _etype246; - iprot->readListBegin(_etype246, _size243); - this->part_vals.resize(_size243); - uint32_t _i247; - for (_i247 = 0; _i247 < _size243; ++_i247) + uint32_t _size272; + ::apache::thrift::protocol::TType _etype275; + iprot->readListBegin(_etype275, _size272); + this->part_vals.resize(_size272); + uint32_t _i276; + for (_i276 = 0; _i276 < _size272; ++_i276) { - xfer += iprot->readString(this->part_vals[_i247]); + xfer += iprot->readString(this->part_vals[_i276]); } iprot->readListEnd(); } @@ -4674,10 +5122,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter248; - for (_iter248 = this->part_vals.begin(); _iter248 != this->part_vals.end(); ++_iter248) + std::vector ::const_iterator _iter277; + for (_iter277 = this->part_vals.begin(); _iter277 != this->part_vals.end(); ++_iter277) { - xfer += oprot->writeString((*_iter248)); + xfer += oprot->writeString((*_iter277)); } xfer += oprot->writeListEnd(); } @@ -4702,10 +5150,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter249; - for (_iter249 = (*(this->part_vals)).begin(); _iter249 != (*(this->part_vals)).end(); ++_iter249) + std::vector ::const_iterator _iter278; + for (_iter278 = (*(this->part_vals)).begin(); _iter278 != (*(this->part_vals)).end(); ++_iter278) { - xfer += oprot->writeString((*_iter249)); + xfer += oprot->writeString((*_iter278)); } xfer += oprot->writeListEnd(); } @@ -5134,14 +5582,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size250; - ::apache::thrift::protocol::TType _etype253; - iprot->readListBegin(_etype253, _size250); - this->part_vals.resize(_size250); - uint32_t _i254; - for (_i254 = 0; _i254 < _size250; ++_i254) + uint32_t _size279; + ::apache::thrift::protocol::TType _etype282; + iprot->readListBegin(_etype282, _size279); + this->part_vals.resize(_size279); + uint32_t _i283; + for (_i283 = 0; _i283 < _size279; ++_i283) { - xfer += iprot->readString(this->part_vals[_i254]); + xfer += iprot->readString(this->part_vals[_i283]); } iprot->readListEnd(); } @@ -5174,10 +5622,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter255; - for (_iter255 = this->part_vals.begin(); _iter255 != this->part_vals.end(); ++_iter255) + std::vector ::const_iterator _iter284; + for (_iter284 = this->part_vals.begin(); _iter284 != this->part_vals.end(); ++_iter284) { - xfer += oprot->writeString((*_iter255)); + xfer += oprot->writeString((*_iter284)); } xfer += oprot->writeListEnd(); } @@ -5199,10 +5647,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter256; - for (_iter256 = (*(this->part_vals)).begin(); _iter256 != (*(this->part_vals)).end(); ++_iter256) + std::vector ::const_iterator _iter285; + for (_iter285 = (*(this->part_vals)).begin(); _iter285 != (*(this->part_vals)).end(); ++_iter285) { - xfer += oprot->writeString((*_iter256)); + xfer += oprot->writeString((*_iter285)); } xfer += oprot->writeListEnd(); } @@ -5388,14 +5836,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size257; - ::apache::thrift::protocol::TType _etype260; - iprot->readListBegin(_etype260, _size257); - this->part_vals.resize(_size257); - uint32_t _i261; - for (_i261 = 0; _i261 < _size257; ++_i261) + uint32_t _size286; + ::apache::thrift::protocol::TType _etype289; + iprot->readListBegin(_etype289, _size286); + this->part_vals.resize(_size286); + uint32_t _i290; + for (_i290 = 0; _i290 < _size286; ++_i290) { - xfer += iprot->readString(this->part_vals[_i261]); + xfer += iprot->readString(this->part_vals[_i290]); } iprot->readListEnd(); } @@ -5416,14 +5864,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size262; - ::apache::thrift::protocol::TType _etype265; - iprot->readListBegin(_etype265, _size262); - this->group_names.resize(_size262); - uint32_t _i266; - for (_i266 = 0; _i266 < _size262; ++_i266) + uint32_t _size291; + ::apache::thrift::protocol::TType _etype294; + iprot->readListBegin(_etype294, _size291); + this->group_names.resize(_size291); + uint32_t _i295; + for (_i295 = 0; _i295 < _size291; ++_i295) { - xfer += iprot->readString(this->group_names[_i266]); + xfer += iprot->readString(this->group_names[_i295]); } iprot->readListEnd(); } @@ -5456,10 +5904,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter267; - for (_iter267 = this->part_vals.begin(); _iter267 != this->part_vals.end(); ++_iter267) + std::vector ::const_iterator _iter296; + for (_iter296 = this->part_vals.begin(); _iter296 != this->part_vals.end(); ++_iter296) { - xfer += oprot->writeString((*_iter267)); + xfer += oprot->writeString((*_iter296)); } xfer += oprot->writeListEnd(); } @@ -5470,10 +5918,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); - std::vector ::const_iterator _iter268; - for (_iter268 = this->group_names.begin(); _iter268 != this->group_names.end(); ++_iter268) + std::vector ::const_iterator _iter297; + for (_iter297 = this->group_names.begin(); _iter297 != this->group_names.end(); ++_iter297) { - xfer += oprot->writeString((*_iter268)); + xfer += oprot->writeString((*_iter297)); } xfer += oprot->writeListEnd(); } @@ -5495,10 +5943,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter269; - for (_iter269 = (*(this->part_vals)).begin(); _iter269 != (*(this->part_vals)).end(); ++_iter269) + std::vector ::const_iterator _iter298; + for (_iter298 = (*(this->part_vals)).begin(); _iter298 != (*(this->part_vals)).end(); ++_iter298) { - xfer += oprot->writeString((*_iter269)); + xfer += oprot->writeString((*_iter298)); } xfer += oprot->writeListEnd(); } @@ -5509,10 +5957,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); - std::vector ::const_iterator _iter270; - for (_iter270 = (*(this->group_names)).begin(); _iter270 != (*(this->group_names)).end(); ++_iter270) + std::vector ::const_iterator _iter299; + for (_iter299 = (*(this->group_names)).begin(); _iter299 != (*(this->group_names)).end(); ++_iter299) { - xfer += oprot->writeString((*_iter270)); + xfer += oprot->writeString((*_iter299)); } xfer += oprot->writeListEnd(); } @@ -5998,14 +6446,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size271; - ::apache::thrift::protocol::TType _etype274; - iprot->readListBegin(_etype274, _size271); - this->success.resize(_size271); - uint32_t _i275; - for (_i275 = 0; _i275 < _size271; ++_i275) + uint32_t _size300; + ::apache::thrift::protocol::TType _etype303; + iprot->readListBegin(_etype303, _size300); + this->success.resize(_size300); + uint32_t _i304; + for (_i304 = 0; _i304 < _size300; ++_i304) { - xfer += this->success[_i275].read(iprot); + xfer += this->success[_i304].read(iprot); } iprot->readListEnd(); } @@ -6052,10 +6500,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter276; - for (_iter276 = this->success.begin(); _iter276 != this->success.end(); ++_iter276) + std::vector ::const_iterator _iter305; + for (_iter305 = this->success.begin(); _iter305 != this->success.end(); ++_iter305) { - xfer += (*_iter276).write(oprot); + xfer += (*_iter305).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6098,14 +6546,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size277; - ::apache::thrift::protocol::TType _etype280; - iprot->readListBegin(_etype280, _size277); - (*(this->success)).resize(_size277); - uint32_t _i281; - for (_i281 = 0; _i281 < _size277; ++_i281) + uint32_t _size306; + ::apache::thrift::protocol::TType _etype309; + iprot->readListBegin(_etype309, _size306); + (*(this->success)).resize(_size306); + uint32_t _i310; + for (_i310 = 0; _i310 < _size306; ++_i310) { - xfer += (*(this->success))[_i281].read(iprot); + xfer += (*(this->success))[_i310].read(iprot); } iprot->readListEnd(); } @@ -6198,14 +6646,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size282; - ::apache::thrift::protocol::TType _etype285; - iprot->readListBegin(_etype285, _size282); - this->group_names.resize(_size282); - uint32_t _i286; - for (_i286 = 0; _i286 < _size282; ++_i286) + uint32_t _size311; + ::apache::thrift::protocol::TType _etype314; + iprot->readListBegin(_etype314, _size311); + this->group_names.resize(_size311); + uint32_t _i315; + for (_i315 = 0; _i315 < _size311; ++_i315) { - xfer += iprot->readString(this->group_names[_i286]); + xfer += iprot->readString(this->group_names[_i315]); } iprot->readListEnd(); } @@ -6244,10 +6692,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); - std::vector ::const_iterator _iter287; - for (_iter287 = this->group_names.begin(); _iter287 != this->group_names.end(); ++_iter287) + std::vector ::const_iterator _iter316; + for (_iter316 = this->group_names.begin(); _iter316 != this->group_names.end(); ++_iter316) { - xfer += oprot->writeString((*_iter287)); + xfer += oprot->writeString((*_iter316)); } xfer += oprot->writeListEnd(); } @@ -6275,10 +6723,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); - std::vector ::const_iterator _iter288; - for (_iter288 = (*(this->group_names)).begin(); _iter288 != (*(this->group_names)).end(); ++_iter288) + std::vector ::const_iterator _iter317; + for (_iter317 = (*(this->group_names)).begin(); _iter317 != (*(this->group_names)).end(); ++_iter317) { - xfer += oprot->writeString((*_iter288)); + xfer += oprot->writeString((*_iter317)); } xfer += oprot->writeListEnd(); } @@ -6312,14 +6760,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size289; - ::apache::thrift::protocol::TType _etype292; - iprot->readListBegin(_etype292, _size289); - this->success.resize(_size289); - uint32_t _i293; - for (_i293 = 0; _i293 < _size289; ++_i293) + uint32_t _size318; + ::apache::thrift::protocol::TType _etype321; + iprot->readListBegin(_etype321, _size318); + this->success.resize(_size318); + uint32_t _i322; + for (_i322 = 0; _i322 < _size318; ++_i322) { - xfer += this->success[_i293].read(iprot); + xfer += this->success[_i322].read(iprot); } iprot->readListEnd(); } @@ -6366,10 +6814,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter294; - for (_iter294 = this->success.begin(); _iter294 != this->success.end(); ++_iter294) + std::vector ::const_iterator _iter323; + for (_iter323 = this->success.begin(); _iter323 != this->success.end(); ++_iter323) { - xfer += (*_iter294).write(oprot); + xfer += (*_iter323).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6412,14 +6860,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size295; - ::apache::thrift::protocol::TType _etype298; - iprot->readListBegin(_etype298, _size295); - (*(this->success)).resize(_size295); - uint32_t _i299; - for (_i299 = 0; _i299 < _size295; ++_i299) + uint32_t _size324; + ::apache::thrift::protocol::TType _etype327; + iprot->readListBegin(_etype327, _size324); + (*(this->success)).resize(_size324); + uint32_t _i328; + for (_i328 = 0; _i328 < _size324; ++_i328) { - xfer += (*(this->success))[_i299].read(iprot); + xfer += (*(this->success))[_i328].read(iprot); } iprot->readListEnd(); } @@ -6570,14 +7018,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size300; - ::apache::thrift::protocol::TType _etype303; - iprot->readListBegin(_etype303, _size300); - this->success.resize(_size300); - uint32_t _i304; - for (_i304 = 0; _i304 < _size300; ++_i304) + uint32_t _size329; + ::apache::thrift::protocol::TType _etype332; + iprot->readListBegin(_etype332, _size329); + this->success.resize(_size329); + uint32_t _i333; + for (_i333 = 0; _i333 < _size329; ++_i333) { - xfer += iprot->readString(this->success[_i304]); + xfer += iprot->readString(this->success[_i333]); } iprot->readListEnd(); } @@ -6616,10 +7064,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter305; - for (_iter305 = this->success.begin(); _iter305 != this->success.end(); ++_iter305) + std::vector ::const_iterator _iter334; + for (_iter334 = this->success.begin(); _iter334 != this->success.end(); ++_iter334) { - xfer += oprot->writeString((*_iter305)); + xfer += oprot->writeString((*_iter334)); } xfer += oprot->writeListEnd(); } @@ -6658,14 +7106,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size306; - ::apache::thrift::protocol::TType _etype309; - iprot->readListBegin(_etype309, _size306); - (*(this->success)).resize(_size306); - uint32_t _i310; - for (_i310 = 0; _i310 < _size306; ++_i310) + uint32_t _size335; + ::apache::thrift::protocol::TType _etype338; + iprot->readListBegin(_etype338, _size335); + (*(this->success)).resize(_size335); + uint32_t _i339; + for (_i339 = 0; _i339 < _size335; ++_i339) { - xfer += iprot->readString((*(this->success))[_i310]); + xfer += iprot->readString((*(this->success))[_i339]); } iprot->readListEnd(); } @@ -6734,14 +7182,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size311; - ::apache::thrift::protocol::TType _etype314; - iprot->readListBegin(_etype314, _size311); - this->part_vals.resize(_size311); - uint32_t _i315; - for (_i315 = 0; _i315 < _size311; ++_i315) + uint32_t _size340; + ::apache::thrift::protocol::TType _etype343; + iprot->readListBegin(_etype343, _size340); + this->part_vals.resize(_size340); + uint32_t _i344; + for (_i344 = 0; _i344 < _size340; ++_i344) { - xfer += iprot->readString(this->part_vals[_i315]); + xfer += iprot->readString(this->part_vals[_i344]); } iprot->readListEnd(); } @@ -6782,10 +7230,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter316; - for (_iter316 = this->part_vals.begin(); _iter316 != this->part_vals.end(); ++_iter316) + std::vector ::const_iterator _iter345; + for (_iter345 = this->part_vals.begin(); _iter345 != this->part_vals.end(); ++_iter345) { - xfer += oprot->writeString((*_iter316)); + xfer += oprot->writeString((*_iter345)); } xfer += oprot->writeListEnd(); } @@ -6810,10 +7258,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter317; - for (_iter317 = (*(this->part_vals)).begin(); _iter317 != (*(this->part_vals)).end(); ++_iter317) + std::vector ::const_iterator _iter346; + for (_iter346 = (*(this->part_vals)).begin(); _iter346 != (*(this->part_vals)).end(); ++_iter346) { - xfer += oprot->writeString((*_iter317)); + xfer += oprot->writeString((*_iter346)); } xfer += oprot->writeListEnd(); } @@ -6850,14 +7298,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size318; - ::apache::thrift::protocol::TType _etype321; - iprot->readListBegin(_etype321, _size318); - this->success.resize(_size318); - uint32_t _i322; - for (_i322 = 0; _i322 < _size318; ++_i322) + uint32_t _size347; + ::apache::thrift::protocol::TType _etype350; + iprot->readListBegin(_etype350, _size347); + this->success.resize(_size347); + uint32_t _i351; + for (_i351 = 0; _i351 < _size347; ++_i351) { - xfer += this->success[_i322].read(iprot); + xfer += this->success[_i351].read(iprot); } iprot->readListEnd(); } @@ -6896,10 +7344,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter323; - for (_iter323 = this->success.begin(); _iter323 != this->success.end(); ++_iter323) + std::vector ::const_iterator _iter352; + for (_iter352 = this->success.begin(); _iter352 != this->success.end(); ++_iter352) { - xfer += (*_iter323).write(oprot); + xfer += (*_iter352).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6938,14 +7386,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size324; - ::apache::thrift::protocol::TType _etype327; - iprot->readListBegin(_etype327, _size324); - (*(this->success)).resize(_size324); - uint32_t _i328; - for (_i328 = 0; _i328 < _size324; ++_i328) + uint32_t _size353; + ::apache::thrift::protocol::TType _etype356; + iprot->readListBegin(_etype356, _size353); + (*(this->success)).resize(_size353); + uint32_t _i357; + for (_i357 = 0; _i357 < _size353; ++_i357) { - xfer += (*(this->success))[_i328].read(iprot); + xfer += (*(this->success))[_i357].read(iprot); } iprot->readListEnd(); } @@ -7014,14 +7462,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size329; - ::apache::thrift::protocol::TType _etype332; - iprot->readListBegin(_etype332, _size329); - this->part_vals.resize(_size329); - uint32_t _i333; - for (_i333 = 0; _i333 < _size329; ++_i333) + uint32_t _size358; + ::apache::thrift::protocol::TType _etype361; + iprot->readListBegin(_etype361, _size358); + this->part_vals.resize(_size358); + uint32_t _i362; + for (_i362 = 0; _i362 < _size358; ++_i362) { - xfer += iprot->readString(this->part_vals[_i333]); + xfer += iprot->readString(this->part_vals[_i362]); } iprot->readListEnd(); } @@ -7050,14 +7498,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size334; - ::apache::thrift::protocol::TType _etype337; - iprot->readListBegin(_etype337, _size334); - this->group_names.resize(_size334); - uint32_t _i338; - for (_i338 = 0; _i338 < _size334; ++_i338) + uint32_t _size363; + ::apache::thrift::protocol::TType _etype366; + iprot->readListBegin(_etype366, _size363); + this->group_names.resize(_size363); + uint32_t _i367; + for (_i367 = 0; _i367 < _size363; ++_i367) { - xfer += iprot->readString(this->group_names[_i338]); + xfer += iprot->readString(this->group_names[_i367]); } iprot->readListEnd(); } @@ -7090,10 +7538,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter339; - for (_iter339 = this->part_vals.begin(); _iter339 != this->part_vals.end(); ++_iter339) + std::vector ::const_iterator _iter368; + for (_iter368 = this->part_vals.begin(); _iter368 != this->part_vals.end(); ++_iter368) { - xfer += oprot->writeString((*_iter339)); + xfer += oprot->writeString((*_iter368)); } xfer += oprot->writeListEnd(); } @@ -7107,10 +7555,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); - std::vector ::const_iterator _iter340; - for (_iter340 = this->group_names.begin(); _iter340 != this->group_names.end(); ++_iter340) + std::vector ::const_iterator _iter369; + for (_iter369 = this->group_names.begin(); _iter369 != this->group_names.end(); ++_iter369) { - xfer += oprot->writeString((*_iter340)); + xfer += oprot->writeString((*_iter369)); } xfer += oprot->writeListEnd(); } @@ -7132,10 +7580,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter341; - for (_iter341 = (*(this->part_vals)).begin(); _iter341 != (*(this->part_vals)).end(); ++_iter341) + std::vector ::const_iterator _iter370; + for (_iter370 = (*(this->part_vals)).begin(); _iter370 != (*(this->part_vals)).end(); ++_iter370) { - xfer += oprot->writeString((*_iter341)); + xfer += oprot->writeString((*_iter370)); } xfer += oprot->writeListEnd(); } @@ -7149,10 +7597,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); - std::vector ::const_iterator _iter342; - for (_iter342 = (*(this->group_names)).begin(); _iter342 != (*(this->group_names)).end(); ++_iter342) + std::vector ::const_iterator _iter371; + for (_iter371 = (*(this->group_names)).begin(); _iter371 != (*(this->group_names)).end(); ++_iter371) { - xfer += oprot->writeString((*_iter342)); + xfer += oprot->writeString((*_iter371)); } xfer += oprot->writeListEnd(); } @@ -7186,14 +7634,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size343; - ::apache::thrift::protocol::TType _etype346; - iprot->readListBegin(_etype346, _size343); - this->success.resize(_size343); - uint32_t _i347; - for (_i347 = 0; _i347 < _size343; ++_i347) + uint32_t _size372; + ::apache::thrift::protocol::TType _etype375; + iprot->readListBegin(_etype375, _size372); + this->success.resize(_size372); + uint32_t _i376; + for (_i376 = 0; _i376 < _size372; ++_i376) { - xfer += this->success[_i347].read(iprot); + xfer += this->success[_i376].read(iprot); } iprot->readListEnd(); } @@ -7240,10 +7688,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter348; - for (_iter348 = this->success.begin(); _iter348 != this->success.end(); ++_iter348) + std::vector ::const_iterator _iter377; + for (_iter377 = this->success.begin(); _iter377 != this->success.end(); ++_iter377) { - xfer += (*_iter348).write(oprot); + xfer += (*_iter377).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7286,14 +7734,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size349; - ::apache::thrift::protocol::TType _etype352; - iprot->readListBegin(_etype352, _size349); - (*(this->success)).resize(_size349); - uint32_t _i353; - for (_i353 = 0; _i353 < _size349; ++_i353) + uint32_t _size378; + ::apache::thrift::protocol::TType _etype381; + iprot->readListBegin(_etype381, _size378); + (*(this->success)).resize(_size378); + uint32_t _i382; + for (_i382 = 0; _i382 < _size378; ++_i382) { - xfer += (*(this->success))[_i353].read(iprot); + xfer += (*(this->success))[_i382].read(iprot); } iprot->readListEnd(); } @@ -7370,14 +7818,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size354; - ::apache::thrift::protocol::TType _etype357; - iprot->readListBegin(_etype357, _size354); - this->part_vals.resize(_size354); - uint32_t _i358; - for (_i358 = 0; _i358 < _size354; ++_i358) + uint32_t _size383; + ::apache::thrift::protocol::TType _etype386; + iprot->readListBegin(_etype386, _size383); + this->part_vals.resize(_size383); + uint32_t _i387; + for (_i387 = 0; _i387 < _size383; ++_i387) { - xfer += iprot->readString(this->part_vals[_i358]); + xfer += iprot->readString(this->part_vals[_i387]); } iprot->readListEnd(); } @@ -7418,10 +7866,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter359; - for (_iter359 = this->part_vals.begin(); _iter359 != this->part_vals.end(); ++_iter359) + std::vector ::const_iterator _iter388; + for (_iter388 = this->part_vals.begin(); _iter388 != this->part_vals.end(); ++_iter388) { - xfer += oprot->writeString((*_iter359)); + xfer += oprot->writeString((*_iter388)); } xfer += oprot->writeListEnd(); } @@ -7446,10 +7894,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter360; - for (_iter360 = (*(this->part_vals)).begin(); _iter360 != (*(this->part_vals)).end(); ++_iter360) + std::vector ::const_iterator _iter389; + for (_iter389 = (*(this->part_vals)).begin(); _iter389 != (*(this->part_vals)).end(); ++_iter389) { - xfer += oprot->writeString((*_iter360)); + xfer += oprot->writeString((*_iter389)); } xfer += oprot->writeListEnd(); } @@ -7486,14 +7934,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size361; - ::apache::thrift::protocol::TType _etype364; - iprot->readListBegin(_etype364, _size361); - this->success.resize(_size361); - uint32_t _i365; - for (_i365 = 0; _i365 < _size361; ++_i365) + uint32_t _size390; + ::apache::thrift::protocol::TType _etype393; + iprot->readListBegin(_etype393, _size390); + this->success.resize(_size390); + uint32_t _i394; + for (_i394 = 0; _i394 < _size390; ++_i394) { - xfer += iprot->readString(this->success[_i365]); + xfer += iprot->readString(this->success[_i394]); } iprot->readListEnd(); } @@ -7532,10 +7980,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter366; - for (_iter366 = this->success.begin(); _iter366 != this->success.end(); ++_iter366) + std::vector ::const_iterator _iter395; + for (_iter395 = this->success.begin(); _iter395 != this->success.end(); ++_iter395) { - xfer += oprot->writeString((*_iter366)); + xfer += oprot->writeString((*_iter395)); } xfer += oprot->writeListEnd(); } @@ -7574,14 +8022,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size367; - ::apache::thrift::protocol::TType _etype370; - iprot->readListBegin(_etype370, _size367); - (*(this->success)).resize(_size367); - uint32_t _i371; - for (_i371 = 0; _i371 < _size367; ++_i371) + uint32_t _size396; + ::apache::thrift::protocol::TType _etype399; + iprot->readListBegin(_etype399, _size396); + (*(this->success)).resize(_size396); + uint32_t _i400; + for (_i400 = 0; _i400 < _size396; ++_i400) { - xfer += iprot->readString((*(this->success))[_i371]); + xfer += iprot->readString((*(this->success))[_i400]); } iprot->readListEnd(); } @@ -7738,14 +8186,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size372; - ::apache::thrift::protocol::TType _etype375; - iprot->readListBegin(_etype375, _size372); - this->success.resize(_size372); - uint32_t _i376; - for (_i376 = 0; _i376 < _size372; ++_i376) + uint32_t _size401; + ::apache::thrift::protocol::TType _etype404; + iprot->readListBegin(_etype404, _size401); + this->success.resize(_size401); + uint32_t _i405; + for (_i405 = 0; _i405 < _size401; ++_i405) { - xfer += this->success[_i376].read(iprot); + xfer += this->success[_i405].read(iprot); } iprot->readListEnd(); } @@ -7792,10 +8240,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter377; - for (_iter377 = this->success.begin(); _iter377 != this->success.end(); ++_iter377) + std::vector ::const_iterator _iter406; + for (_iter406 = this->success.begin(); _iter406 != this->success.end(); ++_iter406) { - xfer += (*_iter377).write(oprot); + xfer += (*_iter406).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7838,14 +8286,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size378; - ::apache::thrift::protocol::TType _etype381; - iprot->readListBegin(_etype381, _size378); - (*(this->success)).resize(_size378); - uint32_t _i382; - for (_i382 = 0; _i382 < _size378; ++_i382) + uint32_t _size407; + ::apache::thrift::protocol::TType _etype410; + iprot->readListBegin(_etype410, _size407); + (*(this->success)).resize(_size407); + uint32_t _i411; + for (_i411 = 0; _i411 < _size407; ++_i411) { - xfer += (*(this->success))[_i382].read(iprot); + xfer += (*(this->success))[_i411].read(iprot); } iprot->readListEnd(); } @@ -8366,14 +8814,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size383; - ::apache::thrift::protocol::TType _etype386; - iprot->readListBegin(_etype386, _size383); - this->success.resize(_size383); - uint32_t _i387; - for (_i387 = 0; _i387 < _size383; ++_i387) + uint32_t _size412; + ::apache::thrift::protocol::TType _etype415; + iprot->readListBegin(_etype415, _size412); + this->success.resize(_size412); + uint32_t _i416; + for (_i416 = 0; _i416 < _size412; ++_i416) { - xfer += iprot->readString(this->success[_i387]); + xfer += iprot->readString(this->success[_i416]); } iprot->readListEnd(); } @@ -8412,10 +8860,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter388; - for (_iter388 = this->success.begin(); _iter388 != this->success.end(); ++_iter388) + std::vector ::const_iterator _iter417; + for (_iter417 = this->success.begin(); _iter417 != this->success.end(); ++_iter417) { - xfer += oprot->writeString((*_iter388)); + xfer += oprot->writeString((*_iter417)); } xfer += oprot->writeListEnd(); } @@ -8454,14 +8902,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size389; - ::apache::thrift::protocol::TType _etype392; - iprot->readListBegin(_etype392, _size389); - (*(this->success)).resize(_size389); - uint32_t _i393; - for (_i393 = 0; _i393 < _size389; ++_i393) + uint32_t _size418; + ::apache::thrift::protocol::TType _etype421; + iprot->readListBegin(_etype421, _size418); + (*(this->success)).resize(_size418); + uint32_t _i422; + for (_i422 = 0; _i422 < _size418; ++_i422) { - xfer += iprot->readString((*(this->success))[_i393]); + xfer += iprot->readString((*(this->success))[_i422]); } iprot->readListEnd(); } @@ -8576,17 +9024,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size394; - ::apache::thrift::protocol::TType _ktype395; - ::apache::thrift::protocol::TType _vtype396; - iprot->readMapBegin(_ktype395, _vtype396, _size394); - uint32_t _i398; - for (_i398 = 0; _i398 < _size394; ++_i398) + uint32_t _size423; + ::apache::thrift::protocol::TType _ktype424; + ::apache::thrift::protocol::TType _vtype425; + iprot->readMapBegin(_ktype424, _vtype425, _size423); + uint32_t _i427; + for (_i427 = 0; _i427 < _size423; ++_i427) { - std::string _key399; - xfer += iprot->readString(_key399); - std::string& _val400 = this->success[_key399]; - xfer += iprot->readString(_val400); + std::string _key428; + xfer += iprot->readString(_key428); + std::string& _val429 = this->success[_key428]; + xfer += iprot->readString(_val429); } iprot->readMapEnd(); } @@ -8625,11 +9073,11 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->success.size()); - std::map ::const_iterator _iter401; - for (_iter401 = this->success.begin(); _iter401 != this->success.end(); ++_iter401) + std::map ::const_iterator _iter430; + for (_iter430 = this->success.begin(); _iter430 != this->success.end(); ++_iter430) { - xfer += oprot->writeString(_iter401->first); - xfer += oprot->writeString(_iter401->second); + xfer += oprot->writeString(_iter430->first); + xfer += oprot->writeString(_iter430->second); } xfer += oprot->writeMapEnd(); } @@ -8668,17 +9116,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); - uint32_t _size402; - ::apache::thrift::protocol::TType _ktype403; - ::apache::thrift::protocol::TType _vtype404; - iprot->readMapBegin(_ktype403, _vtype404, _size402); - uint32_t _i406; - for (_i406 = 0; _i406 < _size402; ++_i406) + uint32_t _size431; + ::apache::thrift::protocol::TType _ktype432; + ::apache::thrift::protocol::TType _vtype433; + iprot->readMapBegin(_ktype432, _vtype433, _size431); + uint32_t _i435; + for (_i435 = 0; _i435 < _size431; ++_i435) { - std::string _key407; - xfer += iprot->readString(_key407); - std::string& _val408 = (*(this->success))[_key407]; - xfer += iprot->readString(_val408); + std::string _key436; + xfer += iprot->readString(_key436); + std::string& _val437 = (*(this->success))[_key436]; + xfer += iprot->readString(_val437); } iprot->readMapEnd(); } @@ -9739,14 +10187,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size409; - ::apache::thrift::protocol::TType _etype412; - iprot->readListBegin(_etype412, _size409); - this->success.resize(_size409); - uint32_t _i413; - for (_i413 = 0; _i413 < _size409; ++_i413) + uint32_t _size438; + ::apache::thrift::protocol::TType _etype441; + iprot->readListBegin(_etype441, _size438); + this->success.resize(_size438); + uint32_t _i442; + for (_i442 = 0; _i442 < _size438; ++_i442) { - xfer += this->success[_i413].read(iprot); + xfer += this->success[_i442].read(iprot); } iprot->readListEnd(); } @@ -9793,10 +10241,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter414; - for (_iter414 = this->success.begin(); _iter414 != this->success.end(); ++_iter414) + std::vector ::const_iterator _iter443; + for (_iter443 = this->success.begin(); _iter443 != this->success.end(); ++_iter443) { - xfer += (*_iter414).write(oprot); + xfer += (*_iter443).write(oprot); } xfer += oprot->writeListEnd(); } @@ -9839,14 +10287,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size415; - ::apache::thrift::protocol::TType _etype418; - iprot->readListBegin(_etype418, _size415); - (*(this->success)).resize(_size415); - uint32_t _i419; - for (_i419 = 0; _i419 < _size415; ++_i419) + uint32_t _size444; + ::apache::thrift::protocol::TType _etype447; + iprot->readListBegin(_etype447, _size444); + (*(this->success)).resize(_size444); + uint32_t _i448; + for (_i448 = 0; _i448 < _size444; ++_i448) { - xfer += (*(this->success))[_i419].read(iprot); + xfer += (*(this->success))[_i448].read(iprot); } iprot->readListEnd(); } @@ -9997,14 +10445,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size420; - ::apache::thrift::protocol::TType _etype423; - iprot->readListBegin(_etype423, _size420); - this->success.resize(_size420); - uint32_t _i424; - for (_i424 = 0; _i424 < _size420; ++_i424) + uint32_t _size449; + ::apache::thrift::protocol::TType _etype452; + iprot->readListBegin(_etype452, _size449); + this->success.resize(_size449); + uint32_t _i453; + for (_i453 = 0; _i453 < _size449; ++_i453) { - xfer += iprot->readString(this->success[_i424]); + xfer += iprot->readString(this->success[_i453]); } iprot->readListEnd(); } @@ -10043,10 +10491,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter425; - for (_iter425 = this->success.begin(); _iter425 != this->success.end(); ++_iter425) + std::vector ::const_iterator _iter454; + for (_iter454 = this->success.begin(); _iter454 != this->success.end(); ++_iter454) { - xfer += oprot->writeString((*_iter425)); + xfer += oprot->writeString((*_iter454)); } xfer += oprot->writeListEnd(); } @@ -10085,14 +10533,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size426; - ::apache::thrift::protocol::TType _etype429; - iprot->readListBegin(_etype429, _size426); - (*(this->success)).resize(_size426); - uint32_t _i430; - for (_i430 = 0; _i430 < _size426; ++_i430) + uint32_t _size455; + ::apache::thrift::protocol::TType _etype458; + iprot->readListBegin(_etype458, _size455); + (*(this->success)).resize(_size455); + uint32_t _i459; + for (_i459 = 0; _i459 < _size455; ++_i459) { - xfer += iprot->readString((*(this->success))[_i430]); + xfer += iprot->readString((*(this->success))[_i459]); } iprot->readListEnd(); } @@ -10549,14 +10997,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size431; - ::apache::thrift::protocol::TType _etype434; - iprot->readListBegin(_etype434, _size431); - this->success.resize(_size431); - uint32_t _i435; - for (_i435 = 0; _i435 < _size431; ++_i435) + uint32_t _size460; + ::apache::thrift::protocol::TType _etype463; + iprot->readListBegin(_etype463, _size460); + this->success.resize(_size460); + uint32_t _i464; + for (_i464 = 0; _i464 < _size460; ++_i464) { - xfer += iprot->readString(this->success[_i435]); + xfer += iprot->readString(this->success[_i464]); } iprot->readListEnd(); } @@ -10595,10 +11043,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter436; - for (_iter436 = this->success.begin(); _iter436 != this->success.end(); ++_iter436) + std::vector ::const_iterator _iter465; + for (_iter465 = this->success.begin(); _iter465 != this->success.end(); ++_iter465) { - xfer += oprot->writeString((*_iter436)); + xfer += oprot->writeString((*_iter465)); } xfer += oprot->writeListEnd(); } @@ -10637,14 +11085,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size437; - ::apache::thrift::protocol::TType _etype440; - iprot->readListBegin(_etype440, _size437); - (*(this->success)).resize(_size437); - uint32_t _i441; - for (_i441 = 0; _i441 < _size437; ++_i441) + uint32_t _size466; + ::apache::thrift::protocol::TType _etype469; + iprot->readListBegin(_etype469, _size466); + (*(this->success)).resize(_size466); + uint32_t _i470; + for (_i470 = 0; _i470 < _size466; ++_i470) { - xfer += iprot->readString((*(this->success))[_i441]); + xfer += iprot->readString((*(this->success))[_i470]); } iprot->readListEnd(); } @@ -10711,9 +11159,9 @@ break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast442; - xfer += iprot->readI32(ecast442); - this->principal_type = (PrincipalType::type)ecast442; + int32_t ecast471; + xfer += iprot->readI32(ecast471); + this->principal_type = (PrincipalType::type)ecast471; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -10729,9 +11177,9 @@ break; case 5: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast443; - xfer += iprot->readI32(ecast443); - this->grantorType = (PrincipalType::type)ecast443; + int32_t ecast472; + xfer += iprot->readI32(ecast472); + this->grantorType = (PrincipalType::type)ecast472; this->__isset.grantorType = true; } else { xfer += iprot->skip(ftype); @@ -10963,9 +11411,9 @@ break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast444; - xfer += iprot->readI32(ecast444); - this->principal_type = (PrincipalType::type)ecast444; + int32_t ecast473; + xfer += iprot->readI32(ecast473); + this->principal_type = (PrincipalType::type)ecast473; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -11163,9 +11611,9 @@ break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast445; - xfer += iprot->readI32(ecast445); - this->principal_type = (PrincipalType::type)ecast445; + int32_t ecast474; + xfer += iprot->readI32(ecast474); + this->principal_type = (PrincipalType::type)ecast474; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -11235,14 +11683,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size446; - ::apache::thrift::protocol::TType _etype449; - iprot->readListBegin(_etype449, _size446); - this->success.resize(_size446); - uint32_t _i450; - for (_i450 = 0; _i450 < _size446; ++_i450) + uint32_t _size475; + ::apache::thrift::protocol::TType _etype478; + iprot->readListBegin(_etype478, _size475); + this->success.resize(_size475); + uint32_t _i479; + for (_i479 = 0; _i479 < _size475; ++_i479) { - xfer += this->success[_i450].read(iprot); + xfer += this->success[_i479].read(iprot); } iprot->readListEnd(); } @@ -11281,10 +11729,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter451; - for (_iter451 = this->success.begin(); _iter451 != this->success.end(); ++_iter451) + std::vector ::const_iterator _iter480; + for (_iter480 = this->success.begin(); _iter480 != this->success.end(); ++_iter480) { - xfer += (*_iter451).write(oprot); + xfer += (*_iter480).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11323,14 +11771,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size452; - ::apache::thrift::protocol::TType _etype455; - iprot->readListBegin(_etype455, _size452); - (*(this->success)).resize(_size452); - uint32_t _i456; - for (_i456 = 0; _i456 < _size452; ++_i456) + uint32_t _size481; + ::apache::thrift::protocol::TType _etype484; + iprot->readListBegin(_etype484, _size481); + (*(this->success)).resize(_size481); + uint32_t _i485; + for (_i485 = 0; _i485 < _size481; ++_i485) { - xfer += (*(this->success))[_i456].read(iprot); + xfer += (*(this->success))[_i485].read(iprot); } iprot->readListEnd(); } @@ -11399,14 +11847,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size457; - ::apache::thrift::protocol::TType _etype460; - iprot->readListBegin(_etype460, _size457); - this->group_names.resize(_size457); - uint32_t _i461; - for (_i461 = 0; _i461 < _size457; ++_i461) + uint32_t _size486; + ::apache::thrift::protocol::TType _etype489; + iprot->readListBegin(_etype489, _size486); + this->group_names.resize(_size486); + uint32_t _i490; + for (_i490 = 0; _i490 < _size486; ++_i490) { - xfer += iprot->readString(this->group_names[_i461]); + xfer += iprot->readString(this->group_names[_i490]); } iprot->readListEnd(); } @@ -11439,10 +11887,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); - std::vector ::const_iterator _iter462; - for (_iter462 = this->group_names.begin(); _iter462 != this->group_names.end(); ++_iter462) + std::vector ::const_iterator _iter491; + for (_iter491 = this->group_names.begin(); _iter491 != this->group_names.end(); ++_iter491) { - xfer += oprot->writeString((*_iter462)); + xfer += oprot->writeString((*_iter491)); } xfer += oprot->writeListEnd(); } @@ -11464,10 +11912,10 @@ xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); - std::vector ::const_iterator _iter463; - for (_iter463 = (*(this->group_names)).begin(); _iter463 != (*(this->group_names)).end(); ++_iter463) + std::vector ::const_iterator _iter492; + for (_iter492 = (*(this->group_names)).begin(); _iter492 != (*(this->group_names)).end(); ++_iter492) { - xfer += oprot->writeString((*_iter463)); + xfer += oprot->writeString((*_iter492)); } xfer += oprot->writeListEnd(); } @@ -11623,9 +12071,9 @@ break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast464; - xfer += iprot->readI32(ecast464); - this->principal_type = (PrincipalType::type)ecast464; + int32_t ecast493; + xfer += iprot->readI32(ecast493); + this->principal_type = (PrincipalType::type)ecast493; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -11709,14 +12157,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size465; - ::apache::thrift::protocol::TType _etype468; - iprot->readListBegin(_etype468, _size465); - this->success.resize(_size465); - uint32_t _i469; - for (_i469 = 0; _i469 < _size465; ++_i469) + uint32_t _size494; + ::apache::thrift::protocol::TType _etype497; + iprot->readListBegin(_etype497, _size494); + this->success.resize(_size494); + uint32_t _i498; + for (_i498 = 0; _i498 < _size494; ++_i498) { - xfer += this->success[_i469].read(iprot); + xfer += this->success[_i498].read(iprot); } iprot->readListEnd(); } @@ -11755,10 +12203,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter470; - for (_iter470 = this->success.begin(); _iter470 != this->success.end(); ++_iter470) + std::vector ::const_iterator _iter499; + for (_iter499 = this->success.begin(); _iter499 != this->success.end(); ++_iter499) { - xfer += (*_iter470).write(oprot); + xfer += (*_iter499).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11797,14 +12245,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size471; - ::apache::thrift::protocol::TType _etype474; - iprot->readListBegin(_etype474, _size471); - (*(this->success)).resize(_size471); - uint32_t _i475; - for (_i475 = 0; _i475 < _size471; ++_i475) + uint32_t _size500; + ::apache::thrift::protocol::TType _etype503; + iprot->readListBegin(_etype503, _size500); + (*(this->success)).resize(_size500); + uint32_t _i504; + for (_i504 = 0; _i504 < _size500; ++_i504) { - xfer += (*(this->success))[_i475].read(iprot); + xfer += (*(this->success))[_i504].read(iprot); } iprot->readListEnd(); } @@ -13938,6 +14386,132 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); } +void ThriftHiveMetastoreClient::get_table_names_by_owner(std::vector & _return, const std::string& owner) +{ + send_get_table_names_by_owner(owner); + recv_get_table_names_by_owner(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_names_by_owner(const std::string& owner) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_names_by_owner", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_names_by_owner_pargs args; + args.owner = &owner; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_table_names_by_owner(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_table_names_by_owner") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_table_names_by_owner_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_owner failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_tables_by_names(std::vector
& _return, const std::vector & table_names) +{ + send_get_tables_by_names(table_names); + recv_get_tables_by_names(_return); +} + +void ThriftHiveMetastoreClient::send_get_tables_by_names(const std::vector & table_names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_tables_by_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_by_names_pargs args; + args.table_names = &table_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_tables_by_names(std::vector
& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_tables_by_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_tables_by_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables_by_names failed: unknown result"); +} + void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { send_get_table(dbname, tbl_name); @@ -17225,6 +17799,68 @@ oprot->getTransport()->writeEnd(); } +void ThriftHiveMetastoreProcessor::process_get_table_names_by_owner(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_table_names_by_owner_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_table_names_by_owner_result result; + try { + iface_->get_table_names_by_owner(result.success, args.owner); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_names_by_owner", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_table_names_by_owner", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_tables_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_tables_by_names_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_tables_by_names_result result; + try { + iface_->get_tables_by_names(result.success, args.table_names); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_tables_by_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_tables_by_names", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_table_args args; Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (revision 1072194) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -31,6 +31,8 @@ virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0; virtual void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) = 0; virtual void get_all_tables(std::vector & _return, const std::string& db_name) = 0; + virtual void get_table_names_by_owner(std::vector & _return, const std::string& owner) = 0; + virtual void get_tables_by_names(std::vector
& _return, const std::vector & table_names) = 0; virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0; virtual void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) = 0; virtual void add_partition(Partition& _return, const Partition& new_part) = 0; @@ -127,6 +129,12 @@ void get_all_tables(std::vector & /* _return */, const std::string& /* db_name */) { return; } + void get_table_names_by_owner(std::vector & /* _return */, const std::string& /* owner */) { + return; + } + void get_tables_by_names(std::vector
& /* _return */, const std::vector & /* table_names */) { + return; + } void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) { return; } @@ -2061,6 +2069,218 @@ }; +typedef struct _ThriftHiveMetastore_get_table_names_by_owner_args__isset { + _ThriftHiveMetastore_get_table_names_by_owner_args__isset() : owner(false) {} + bool owner; +} _ThriftHiveMetastore_get_table_names_by_owner_args__isset; + +class ThriftHiveMetastore_get_table_names_by_owner_args { + public: + + ThriftHiveMetastore_get_table_names_by_owner_args() : owner("") { + } + + virtual ~ThriftHiveMetastore_get_table_names_by_owner_args() throw() {} + + std::string owner; + + _ThriftHiveMetastore_get_table_names_by_owner_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_names_by_owner_args & rhs) const + { + if (!(owner == rhs.owner)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_names_by_owner_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_names_by_owner_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_names_by_owner_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_names_by_owner_pargs() throw() {} + + const std::string* owner; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_names_by_owner_result__isset { + _ThriftHiveMetastore_get_table_names_by_owner_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_table_names_by_owner_result__isset; + +class ThriftHiveMetastore_get_table_names_by_owner_result { + public: + + ThriftHiveMetastore_get_table_names_by_owner_result() { + } + + virtual ~ThriftHiveMetastore_get_table_names_by_owner_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_table_names_by_owner_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_names_by_owner_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_names_by_owner_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_names_by_owner_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_names_by_owner_presult__isset { + _ThriftHiveMetastore_get_table_names_by_owner_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_table_names_by_owner_presult__isset; + +class ThriftHiveMetastore_get_table_names_by_owner_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_names_by_owner_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_table_names_by_owner_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_tables_by_names_args__isset { + _ThriftHiveMetastore_get_tables_by_names_args__isset() : table_names(false) {} + bool table_names; +} _ThriftHiveMetastore_get_tables_by_names_args__isset; + +class ThriftHiveMetastore_get_tables_by_names_args { + public: + + ThriftHiveMetastore_get_tables_by_names_args() { + } + + virtual ~ThriftHiveMetastore_get_tables_by_names_args() throw() {} + + std::vector table_names; + + _ThriftHiveMetastore_get_tables_by_names_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_tables_by_names_args & rhs) const + { + if (!(table_names == rhs.table_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_by_names_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_by_names_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_tables_by_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_tables_by_names_pargs() throw() {} + + const std::vector * table_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_tables_by_names_result__isset { + _ThriftHiveMetastore_get_tables_by_names_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_tables_by_names_result__isset; + +class ThriftHiveMetastore_get_tables_by_names_result { + public: + + ThriftHiveMetastore_get_tables_by_names_result() { + } + + virtual ~ThriftHiveMetastore_get_tables_by_names_result() throw() {} + + std::vector
success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_by_names_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_tables_by_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_by_names_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_by_names_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_tables_by_names_presult__isset { + _ThriftHiveMetastore_get_tables_by_names_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_tables_by_names_presult__isset; + +class ThriftHiveMetastore_get_tables_by_names_presult { + public: + + + virtual ~ThriftHiveMetastore_get_tables_by_names_presult() throw() {} + + std::vector
* success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_by_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_get_table_args__isset { _ThriftHiveMetastore_get_table_args__isset() : dbname(false), tbl_name(false) {} bool dbname; @@ -6937,6 +7157,12 @@ void get_all_tables(std::vector & _return, const std::string& db_name); void send_get_all_tables(const std::string& db_name); void recv_get_all_tables(std::vector & _return); + void get_table_names_by_owner(std::vector & _return, const std::string& owner); + void send_get_table_names_by_owner(const std::string& owner); + void recv_get_table_names_by_owner(std::vector & _return); + void get_tables_by_names(std::vector
& _return, const std::vector & table_names); + void send_get_tables_by_names(const std::vector & table_names); + void recv_get_tables_by_names(std::vector
& _return); void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); void send_get_table(const std::string& dbname, const std::string& tbl_name); void recv_get_table(Table& _return); @@ -7084,6 +7310,8 @@ void process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_table_names_by_owner(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_tables_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); @@ -7145,6 +7373,8 @@ processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table; processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables; processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables; + processMap_["get_table_names_by_owner"] = &ThriftHiveMetastoreProcessor::process_get_table_names_by_owner; + processMap_["get_tables_by_names"] = &ThriftHiveMetastoreProcessor::process_get_tables_by_names; processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table; processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table; processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition; @@ -7374,6 +7604,30 @@ } } + void get_table_names_by_owner(std::vector & _return, const std::string& owner) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_table_names_by_owner(_return, owner); + return; + } else { + ifaces_[i]->get_table_names_by_owner(_return, owner); + } + } + } + + void get_tables_by_names(std::vector
& _return, const std::vector & table_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_tables_by_names(_return, table_names); + return; + } else { + ifaces_[i]->get_tables_by_names(_return, table_names); + } + } + } + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { uint32_t sz = ifaces_.size(); for (uint32_t i = 0; i < sz; ++i) { Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (revision 1072194) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -102,6 +102,16 @@ printf("get_all_tables\n"); } + void get_table_names_by_owner(std::vector & _return, const std::string& owner) { + // Your implementation goes here + printf("get_table_names_by_owner\n"); + } + + void get_tables_by_names(std::vector
& _return, const std::vector & table_names) { + // Your implementation goes here + printf("get_tables_by_names\n"); + } + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { // Your implementation goes here printf("get_table\n"); Index: metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (revision 1072194) +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (working copy) @@ -281,6 +281,38 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_tables failed: unknown result') end + def get_table_names_by_owner(owner) + send_get_table_names_by_owner(owner) + return recv_get_table_names_by_owner() + end + + def send_get_table_names_by_owner(owner) + send_message('get_table_names_by_owner', Get_table_names_by_owner_args, :owner => owner) + end + + def recv_get_table_names_by_owner() + result = receive_message(Get_table_names_by_owner_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_names_by_owner failed: unknown result') + end + + def get_tables_by_names(table_names) + send_get_tables_by_names(table_names) + return recv_get_tables_by_names() + end + + def send_get_tables_by_names(table_names) + send_message('get_tables_by_names', Get_tables_by_names_args, :table_names => table_names) + end + + def recv_get_tables_by_names() + result = receive_message(Get_tables_by_names_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables_by_names failed: unknown result') + end + def get_table(dbname, tbl_name) send_get_table(dbname, tbl_name) return recv_get_table() @@ -1174,6 +1206,28 @@ write_result(result, oprot, 'get_all_tables', seqid) end + def process_get_table_names_by_owner(seqid, iprot, oprot) + args = read_args(iprot, Get_table_names_by_owner_args) + result = Get_table_names_by_owner_result.new() + begin + result.success = @handler.get_table_names_by_owner(args.owner) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_table_names_by_owner', seqid) + end + + def process_get_tables_by_names(seqid, iprot, oprot) + args = read_args(iprot, Get_tables_by_names_args) + result = Get_tables_by_names_result.new() + begin + result.success = @handler.get_tables_by_names(args.table_names) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_tables_by_names', seqid) + end + def process_get_table(seqid, iprot, oprot) args = read_args(iprot, Get_table_args) result = Get_table_result.new() @@ -2260,6 +2314,74 @@ ::Thrift::Struct.generate_accessors self end + class Get_table_names_by_owner_args + include ::Thrift::Struct, ::Thrift::Struct_Union + OWNER = 1 + + FIELDS = { + OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_names_by_owner_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_by_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLE_NAMES = 1 + + FIELDS = { + TABLE_NAMES => {:type => ::Thrift::Types::LIST, :name => 'table_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_by_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Table}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Get_table_args include ::Thrift::Struct, ::Thrift::Struct_Union DBNAME = 1 Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (revision 1072194) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -65,6 +65,10 @@ public List get_all_tables(String db_name) throws MetaException, TException; + public List get_table_names_by_owner(String owner) throws MetaException, TException; + + public List
get_tables_by_names(List table_names) throws MetaException, TException; + public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException; public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException; @@ -183,6 +187,10 @@ public void get_all_tables(String db_name, AsyncMethodCallback resultHandler) throws TException; + public void get_table_names_by_owner(String owner, AsyncMethodCallback resultHandler) throws TException; + + public void get_tables_by_names(List table_names, AsyncMethodCallback resultHandler) throws TException; + public void get_table(String dbname, String tbl_name, AsyncMethodCallback resultHandler) throws TException; public void alter_table(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler) throws TException; @@ -957,6 +965,84 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); } + public List get_table_names_by_owner(String owner) throws MetaException, TException + { + send_get_table_names_by_owner(owner); + return recv_get_table_names_by_owner(); + } + + public void send_get_table_names_by_owner(String owner) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_table_names_by_owner", TMessageType.CALL, ++seqid_)); + get_table_names_by_owner_args args = new get_table_names_by_owner_args(); + args.setOwner(owner); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_table_names_by_owner() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_table_names_by_owner failed: out of sequence response"); + } + get_table_names_by_owner_result result = new get_table_names_by_owner_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_table_names_by_owner failed: unknown result"); + } + + public List
get_tables_by_names(List table_names) throws MetaException, TException + { + send_get_tables_by_names(table_names); + return recv_get_tables_by_names(); + } + + public void send_get_tables_by_names(List table_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_tables_by_names", TMessageType.CALL, ++seqid_)); + get_tables_by_names_args args = new get_tables_by_names_args(); + args.setTable_names(table_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List
recv_get_tables_by_names() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_tables_by_names failed: out of sequence response"); + } + get_tables_by_names_result result = new get_tables_by_names_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_tables_by_names failed: unknown result"); + } + public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException { send_get_table(dbname, tbl_name); @@ -3219,6 +3305,68 @@ } } + public void get_table_names_by_owner(String owner, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_table_names_by_owner_call method_call = new get_table_names_by_owner_call(owner, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_table_names_by_owner_call extends TAsyncMethodCall { + private String owner; + public get_table_names_by_owner_call(String owner, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.owner = owner; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_table_names_by_owner", TMessageType.CALL, 0)); + get_table_names_by_owner_args args = new get_table_names_by_owner_args(); + args.setOwner(owner); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_names_by_owner(); + } + } + + public void get_tables_by_names(List table_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_tables_by_names_call method_call = new get_tables_by_names_call(table_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_tables_by_names_call extends TAsyncMethodCall { + private List table_names; + public get_tables_by_names_call(List table_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.table_names = table_names; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_tables_by_names", TMessageType.CALL, 0)); + get_tables_by_names_args args = new get_tables_by_names_args(); + args.setTable_names(table_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public List
getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_tables_by_names(); + } + } + public void get_table(String dbname, String tbl_name, AsyncMethodCallback resultHandler) throws TException { checkReady(); get_table_call method_call = new get_table_call(dbname, tbl_name, resultHandler, this, protocolFactory, transport); @@ -4727,6 +4875,8 @@ processMap_.put("drop_table", new drop_table()); processMap_.put("get_tables", new get_tables()); processMap_.put("get_all_tables", new get_all_tables()); + processMap_.put("get_table_names_by_owner", new get_table_names_by_owner()); + processMap_.put("get_tables_by_names", new get_tables_by_names()); processMap_.put("get_table", new get_table()); processMap_.put("alter_table", new alter_table()); processMap_.put("add_partition", new add_partition()); @@ -5436,6 +5586,82 @@ } + private class get_table_names_by_owner implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_table_names_by_owner_args args = new get_table_names_by_owner_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_table_names_by_owner", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_table_names_by_owner_result result = new get_table_names_by_owner_result(); + try { + result.success = iface_.get_table_names_by_owner(args.owner); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_table_names_by_owner", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table_names_by_owner"); + oprot.writeMessageBegin(new TMessage("get_table_names_by_owner", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_table_names_by_owner", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_tables_by_names implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_tables_by_names_args args = new get_tables_by_names_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_tables_by_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_tables_by_names_result result = new get_tables_by_names_result(); + try { + result.success = iface_.get_tables_by_names(args.table_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_tables_by_names", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables_by_names"); + oprot.writeMessageBegin(new TMessage("get_tables_by_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_tables_by_names", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + private class get_table implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { @@ -19285,6 +19511,1404 @@ } + public static class get_table_names_by_owner_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_names_by_owner_args"); + + private static final TField OWNER_FIELD_DESC = new TField("owner", TType.STRING, (short)1); + + private String owner; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + OWNER((short)1, "owner"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // OWNER + return OWNER; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.OWNER, new FieldMetaData("owner", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_table_names_by_owner_args.class, metaDataMap); + } + + public get_table_names_by_owner_args() { + } + + public get_table_names_by_owner_args( + String owner) + { + this(); + this.owner = owner; + } + + /** + * Performs a deep copy on other. + */ + public get_table_names_by_owner_args(get_table_names_by_owner_args other) { + if (other.isSetOwner()) { + this.owner = other.owner; + } + } + + public get_table_names_by_owner_args deepCopy() { + return new get_table_names_by_owner_args(this); + } + + @Override + public void clear() { + this.owner = null; + } + + public String getOwner() { + return this.owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public void unsetOwner() { + this.owner = null; + } + + /** Returns true if field owner is set (has been asigned a value) and false otherwise */ + public boolean isSetOwner() { + return this.owner != null; + } + + public void setOwnerIsSet(boolean value) { + if (!value) { + this.owner = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case OWNER: + if (value == null) { + unsetOwner(); + } else { + setOwner((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case OWNER: + return getOwner(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case OWNER: + return isSetOwner(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_names_by_owner_args) + return this.equals((get_table_names_by_owner_args)that); + return false; + } + + public boolean equals(get_table_names_by_owner_args that) { + if (that == null) + return false; + + boolean this_present_owner = true && this.isSetOwner(); + boolean that_present_owner = true && that.isSetOwner(); + if (this_present_owner || that_present_owner) { + if (!(this_present_owner && that_present_owner)) + return false; + if (!this.owner.equals(that.owner)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_names_by_owner_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_names_by_owner_args typedOther = (get_table_names_by_owner_args)other; + + lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwner()) { + lastComparison = TBaseHelper.compareTo(this.owner, typedOther.owner); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // OWNER + if (field.type == TType.STRING) { + this.owner = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.owner != null) { + oprot.writeFieldBegin(OWNER_FIELD_DESC); + oprot.writeString(this.owner); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_names_by_owner_args("); + boolean first = true; + + sb.append("owner:"); + if (this.owner == null) { + sb.append("null"); + } else { + sb.append(this.owner); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_table_names_by_owner_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_names_by_owner_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List success; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_table_names_by_owner_result.class, metaDataMap); + } + + public get_table_names_by_owner_result() { + } + + public get_table_names_by_owner_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_table_names_by_owner_result(get_table_names_by_owner_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_table_names_by_owner_result deepCopy() { + return new get_table_names_by_owner_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_names_by_owner_result) + return this.equals((get_table_names_by_owner_result)that); + return false; + } + + public boolean equals(get_table_names_by_owner_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_names_by_owner_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_names_by_owner_result typedOther = (get_table_names_by_owner_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list127 = iprot.readListBegin(); + this.success = new ArrayList(_list127.size); + for (int _i128 = 0; _i128 < _list127.size; ++_i128) + { + String _elem129; + _elem129 = iprot.readString(); + this.success.add(_elem129); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter130 : this.success) + { + oprot.writeString(_iter130); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_names_by_owner_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_tables_by_names_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_by_names_args"); + + private static final TField TABLE_NAMES_FIELD_DESC = new TField("table_names", TType.LIST, (short)1); + + private List table_names; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TABLE_NAMES((short)1, "table_names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAMES + return TABLE_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAMES, new FieldMetaData("table_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_tables_by_names_args.class, metaDataMap); + } + + public get_tables_by_names_args() { + } + + public get_tables_by_names_args( + List table_names) + { + this(); + this.table_names = table_names; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_by_names_args(get_tables_by_names_args other) { + if (other.isSetTable_names()) { + List __this__table_names = new ArrayList(); + for (String other_element : other.table_names) { + __this__table_names.add(other_element); + } + this.table_names = __this__table_names; + } + } + + public get_tables_by_names_args deepCopy() { + return new get_tables_by_names_args(this); + } + + @Override + public void clear() { + this.table_names = null; + } + + public int getTable_namesSize() { + return (this.table_names == null) ? 0 : this.table_names.size(); + } + + public java.util.Iterator getTable_namesIterator() { + return (this.table_names == null) ? null : this.table_names.iterator(); + } + + public void addToTable_names(String elem) { + if (this.table_names == null) { + this.table_names = new ArrayList(); + } + this.table_names.add(elem); + } + + public List getTable_names() { + return this.table_names; + } + + public void setTable_names(List table_names) { + this.table_names = table_names; + } + + public void unsetTable_names() { + this.table_names = null; + } + + /** Returns true if field table_names is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_names() { + return this.table_names != null; + } + + public void setTable_namesIsSet(boolean value) { + if (!value) { + this.table_names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAMES: + if (value == null) { + unsetTable_names(); + } else { + setTable_names((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAMES: + return getTable_names(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAMES: + return isSetTable_names(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_by_names_args) + return this.equals((get_tables_by_names_args)that); + return false; + } + + public boolean equals(get_tables_by_names_args that) { + if (that == null) + return false; + + boolean this_present_table_names = true && this.isSetTable_names(); + boolean that_present_table_names = true && that.isSetTable_names(); + if (this_present_table_names || that_present_table_names) { + if (!(this_present_table_names && that_present_table_names)) + return false; + if (!this.table_names.equals(that.table_names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_tables_by_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_by_names_args typedOther = (get_tables_by_names_args)other; + + lastComparison = Boolean.valueOf(isSetTable_names()).compareTo(typedOther.isSetTable_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_names()) { + lastComparison = TBaseHelper.compareTo(this.table_names, typedOther.table_names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TABLE_NAMES + if (field.type == TType.LIST) { + { + TList _list131 = iprot.readListBegin(); + this.table_names = new ArrayList(_list131.size); + for (int _i132 = 0; _i132 < _list131.size; ++_i132) + { + String _elem133; + _elem133 = iprot.readString(); + this.table_names.add(_elem133); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.table_names != null) { + oprot.writeFieldBegin(TABLE_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.table_names.size())); + for (String _iter134 : this.table_names) + { + oprot.writeString(_iter134); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_by_names_args("); + boolean first = true; + + sb.append("table_names:"); + if (this.table_names == null) { + sb.append("null"); + } else { + sb.append(this.table_names); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_tables_by_names_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_by_names_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List
success; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Table.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_tables_by_names_result.class, metaDataMap); + } + + public get_tables_by_names_result() { + } + + public get_tables_by_names_result( + List
success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_by_names_result(get_tables_by_names_result other) { + if (other.isSetSuccess()) { + List
__this__success = new ArrayList
(); + for (Table other_element : other.success) { + __this__success.add(new Table(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_tables_by_names_result deepCopy() { + return new get_tables_by_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator
getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Table elem) { + if (this.success == null) { + this.success = new ArrayList
(); + } + this.success.add(elem); + } + + public List
getSuccess() { + return this.success; + } + + public void setSuccess(List
success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List
)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_by_names_result) + return this.equals((get_tables_by_names_result)that); + return false; + } + + public boolean equals(get_tables_by_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_tables_by_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_by_names_result typedOther = (get_tables_by_names_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list135 = iprot.readListBegin(); + this.success = new ArrayList
(_list135.size); + for (int _i136 = 0; _i136 < _list135.size; ++_i136) + { + Table _elem137; + _elem137 = new Table(); + _elem137.read(iprot); + this.success.add(_elem137); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Table _iter138 : this.success) + { + _iter138.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_by_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + public static class get_table_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_table_args"); @@ -22147,13 +23771,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list127 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list127.size); - for (int _i128 = 0; _i128 < _list127.size; ++_i128) + TList _list139 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list139.size); + for (int _i140 = 0; _i140 < _list139.size; ++_i140) { - String _elem129; - _elem129 = iprot.readString(); - this.part_vals.add(_elem129); + String _elem141; + _elem141 = iprot.readString(); + this.part_vals.add(_elem141); } iprot.readListEnd(); } @@ -22188,9 +23812,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter130 : this.part_vals) + for (String _iter142 : this.part_vals) { - oprot.writeString(_iter130); + oprot.writeString(_iter142); } oprot.writeListEnd(); } @@ -24247,13 +25871,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list131 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list131.size); - for (int _i132 = 0; _i132 < _list131.size; ++_i132) + TList _list143 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list143.size); + for (int _i144 = 0; _i144 < _list143.size; ++_i144) { - String _elem133; - _elem133 = iprot.readString(); - this.part_vals.add(_elem133); + String _elem145; + _elem145 = iprot.readString(); + this.part_vals.add(_elem145); } iprot.readListEnd(); } @@ -24296,9 +25920,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter134 : this.part_vals) + for (String _iter146 : this.part_vals) { - oprot.writeString(_iter134); + oprot.writeString(_iter146); } oprot.writeListEnd(); } @@ -26199,13 +27823,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list135 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list135.size); - for (int _i136 = 0; _i136 < _list135.size; ++_i136) + TList _list147 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list147.size); + for (int _i148 = 0; _i148 < _list147.size; ++_i148) { - String _elem137; - _elem137 = iprot.readString(); - this.part_vals.add(_elem137); + String _elem149; + _elem149 = iprot.readString(); + this.part_vals.add(_elem149); } iprot.readListEnd(); } @@ -26240,9 +27864,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter138 : this.part_vals) + for (String _iter150 : this.part_vals) { - oprot.writeString(_iter138); + oprot.writeString(_iter150); } oprot.writeListEnd(); } @@ -27300,13 +28924,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list139 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list139.size); - for (int _i140 = 0; _i140 < _list139.size; ++_i140) + TList _list151 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list151.size); + for (int _i152 = 0; _i152 < _list151.size; ++_i152) { - String _elem141; - _elem141 = iprot.readString(); - this.part_vals.add(_elem141); + String _elem153; + _elem153 = iprot.readString(); + this.part_vals.add(_elem153); } iprot.readListEnd(); } @@ -27324,13 +28948,13 @@ case 5: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list142 = iprot.readListBegin(); - this.group_names = new ArrayList(_list142.size); - for (int _i143 = 0; _i143 < _list142.size; ++_i143) + TList _list154 = iprot.readListBegin(); + this.group_names = new ArrayList(_list154.size); + for (int _i155 = 0; _i155 < _list154.size; ++_i155) { - String _elem144; - _elem144 = iprot.readString(); - this.group_names.add(_elem144); + String _elem156; + _elem156 = iprot.readString(); + this.group_names.add(_elem156); } iprot.readListEnd(); } @@ -27365,9 +28989,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter145 : this.part_vals) + for (String _iter157 : this.part_vals) { - oprot.writeString(_iter145); + oprot.writeString(_iter157); } oprot.writeListEnd(); } @@ -27382,9 +29006,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter146 : this.group_names) + for (String _iter158 : this.group_names) { - oprot.writeString(_iter146); + oprot.writeString(_iter158); } oprot.writeListEnd(); } @@ -29650,14 +31274,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list147 = iprot.readListBegin(); - this.success = new ArrayList(_list147.size); - for (int _i148 = 0; _i148 < _list147.size; ++_i148) + TList _list159 = iprot.readListBegin(); + this.success = new ArrayList(_list159.size); + for (int _i160 = 0; _i160 < _list159.size; ++_i160) { - Partition _elem149; - _elem149 = new Partition(); - _elem149.read(iprot); - this.success.add(_elem149); + Partition _elem161; + _elem161 = new Partition(); + _elem161.read(iprot); + this.success.add(_elem161); } iprot.readListEnd(); } @@ -29697,9 +31321,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter150 : this.success) + for (Partition _iter162 : this.success) { - _iter150.write(oprot); + _iter162.write(oprot); } oprot.writeListEnd(); } @@ -30311,13 +31935,13 @@ case 5: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list151 = iprot.readListBegin(); - this.group_names = new ArrayList(_list151.size); - for (int _i152 = 0; _i152 < _list151.size; ++_i152) + TList _list163 = iprot.readListBegin(); + this.group_names = new ArrayList(_list163.size); + for (int _i164 = 0; _i164 < _list163.size; ++_i164) { - String _elem153; - _elem153 = iprot.readString(); - this.group_names.add(_elem153); + String _elem165; + _elem165 = iprot.readString(); + this.group_names.add(_elem165); } iprot.readListEnd(); } @@ -30360,9 +31984,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter154 : this.group_names) + for (String _iter166 : this.group_names) { - oprot.writeString(_iter154); + oprot.writeString(_iter166); } oprot.writeListEnd(); } @@ -30808,14 +32432,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list155 = iprot.readListBegin(); - this.success = new ArrayList(_list155.size); - for (int _i156 = 0; _i156 < _list155.size; ++_i156) + TList _list167 = iprot.readListBegin(); + this.success = new ArrayList(_list167.size); + for (int _i168 = 0; _i168 < _list167.size; ++_i168) { - Partition _elem157; - _elem157 = new Partition(); - _elem157.read(iprot); - this.success.add(_elem157); + Partition _elem169; + _elem169 = new Partition(); + _elem169.read(iprot); + this.success.add(_elem169); } iprot.readListEnd(); } @@ -30855,9 +32479,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter158 : this.success) + for (Partition _iter170 : this.success) { - _iter158.write(oprot); + _iter170.write(oprot); } oprot.writeListEnd(); } @@ -31685,13 +33309,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list159 = iprot.readListBegin(); - this.success = new ArrayList(_list159.size); - for (int _i160 = 0; _i160 < _list159.size; ++_i160) + TList _list171 = iprot.readListBegin(); + this.success = new ArrayList(_list171.size); + for (int _i172 = 0; _i172 < _list171.size; ++_i172) { - String _elem161; - _elem161 = iprot.readString(); - this.success.add(_elem161); + String _elem173; + _elem173 = iprot.readString(); + this.success.add(_elem173); } iprot.readListEnd(); } @@ -31723,9 +33347,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter162 : this.success) + for (String _iter174 : this.success) { - oprot.writeString(_iter162); + oprot.writeString(_iter174); } oprot.writeListEnd(); } @@ -32242,13 +33866,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list163 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list163.size); - for (int _i164 = 0; _i164 < _list163.size; ++_i164) + TList _list175 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list175.size); + for (int _i176 = 0; _i176 < _list175.size; ++_i176) { - String _elem165; - _elem165 = iprot.readString(); - this.part_vals.add(_elem165); + String _elem177; + _elem177 = iprot.readString(); + this.part_vals.add(_elem177); } iprot.readListEnd(); } @@ -32291,9 +33915,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter166 : this.part_vals) + for (String _iter178 : this.part_vals) { - oprot.writeString(_iter166); + oprot.writeString(_iter178); } oprot.writeListEnd(); } @@ -32666,14 +34290,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list167 = iprot.readListBegin(); - this.success = new ArrayList(_list167.size); - for (int _i168 = 0; _i168 < _list167.size; ++_i168) + TList _list179 = iprot.readListBegin(); + this.success = new ArrayList(_list179.size); + for (int _i180 = 0; _i180 < _list179.size; ++_i180) { - Partition _elem169; - _elem169 = new Partition(); - _elem169.read(iprot); - this.success.add(_elem169); + Partition _elem181; + _elem181 = new Partition(); + _elem181.read(iprot); + this.success.add(_elem181); } iprot.readListEnd(); } @@ -32705,9 +34329,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter170 : this.success) + for (Partition _iter182 : this.success) { - _iter170.write(oprot); + _iter182.write(oprot); } oprot.writeListEnd(); } @@ -33380,13 +35004,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list171 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list171.size); - for (int _i172 = 0; _i172 < _list171.size; ++_i172) + TList _list183 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list183.size); + for (int _i184 = 0; _i184 < _list183.size; ++_i184) { - String _elem173; - _elem173 = iprot.readString(); - this.part_vals.add(_elem173); + String _elem185; + _elem185 = iprot.readString(); + this.part_vals.add(_elem185); } iprot.readListEnd(); } @@ -33412,13 +35036,13 @@ case 6: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list174 = iprot.readListBegin(); - this.group_names = new ArrayList(_list174.size); - for (int _i175 = 0; _i175 < _list174.size; ++_i175) + TList _list186 = iprot.readListBegin(); + this.group_names = new ArrayList(_list186.size); + for (int _i187 = 0; _i187 < _list186.size; ++_i187) { - String _elem176; - _elem176 = iprot.readString(); - this.group_names.add(_elem176); + String _elem188; + _elem188 = iprot.readString(); + this.group_names.add(_elem188); } iprot.readListEnd(); } @@ -33453,9 +35077,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter177 : this.part_vals) + for (String _iter189 : this.part_vals) { - oprot.writeString(_iter177); + oprot.writeString(_iter189); } oprot.writeListEnd(); } @@ -33473,9 +35097,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter178 : this.group_names) + for (String _iter190 : this.group_names) { - oprot.writeString(_iter178); + oprot.writeString(_iter190); } oprot.writeListEnd(); } @@ -33929,14 +35553,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list179 = iprot.readListBegin(); - this.success = new ArrayList(_list179.size); - for (int _i180 = 0; _i180 < _list179.size; ++_i180) + TList _list191 = iprot.readListBegin(); + this.success = new ArrayList(_list191.size); + for (int _i192 = 0; _i192 < _list191.size; ++_i192) { - Partition _elem181; - _elem181 = new Partition(); - _elem181.read(iprot); - this.success.add(_elem181); + Partition _elem193; + _elem193 = new Partition(); + _elem193.read(iprot); + this.success.add(_elem193); } iprot.readListEnd(); } @@ -33976,9 +35600,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter182 : this.success) + for (Partition _iter194 : this.success) { - _iter182.write(oprot); + _iter194.write(oprot); } oprot.writeListEnd(); } @@ -34507,13 +36131,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list183 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list183.size); - for (int _i184 = 0; _i184 < _list183.size; ++_i184) + TList _list195 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list195.size); + for (int _i196 = 0; _i196 < _list195.size; ++_i196) { - String _elem185; - _elem185 = iprot.readString(); - this.part_vals.add(_elem185); + String _elem197; + _elem197 = iprot.readString(); + this.part_vals.add(_elem197); } iprot.readListEnd(); } @@ -34556,9 +36180,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter186 : this.part_vals) + for (String _iter198 : this.part_vals) { - oprot.writeString(_iter186); + oprot.writeString(_iter198); } oprot.writeListEnd(); } @@ -34931,13 +36555,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list187 = iprot.readListBegin(); - this.success = new ArrayList(_list187.size); - for (int _i188 = 0; _i188 < _list187.size; ++_i188) + TList _list199 = iprot.readListBegin(); + this.success = new ArrayList(_list199.size); + for (int _i200 = 0; _i200 < _list199.size; ++_i200) { - String _elem189; - _elem189 = iprot.readString(); - this.success.add(_elem189); + String _elem201; + _elem201 = iprot.readString(); + this.success.add(_elem201); } iprot.readListEnd(); } @@ -34969,9 +36593,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter190 : this.success) + for (String _iter202 : this.success) { - oprot.writeString(_iter190); + oprot.writeString(_iter202); } oprot.writeListEnd(); } @@ -35943,14 +37567,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list191 = iprot.readListBegin(); - this.success = new ArrayList(_list191.size); - for (int _i192 = 0; _i192 < _list191.size; ++_i192) + TList _list203 = iprot.readListBegin(); + this.success = new ArrayList(_list203.size); + for (int _i204 = 0; _i204 < _list203.size; ++_i204) { - Partition _elem193; - _elem193 = new Partition(); - _elem193.read(iprot); - this.success.add(_elem193); + Partition _elem205; + _elem205 = new Partition(); + _elem205.read(iprot); + this.success.add(_elem205); } iprot.readListEnd(); } @@ -35990,9 +37614,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter194 : this.success) + for (Partition _iter206 : this.success) { - _iter194.write(oprot); + _iter206.write(oprot); } oprot.writeListEnd(); } @@ -38196,13 +39820,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list195 = iprot.readListBegin(); - this.success = new ArrayList(_list195.size); - for (int _i196 = 0; _i196 < _list195.size; ++_i196) + TList _list207 = iprot.readListBegin(); + this.success = new ArrayList(_list207.size); + for (int _i208 = 0; _i208 < _list207.size; ++_i208) { - String _elem197; - _elem197 = iprot.readString(); - this.success.add(_elem197); + String _elem209; + _elem209 = iprot.readString(); + this.success.add(_elem209); } iprot.readListEnd(); } @@ -38234,9 +39858,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter198 : this.success) + for (String _iter210 : this.success) { - oprot.writeString(_iter198); + oprot.writeString(_iter210); } oprot.writeListEnd(); } @@ -38881,15 +40505,15 @@ case 0: // SUCCESS if (field.type == TType.MAP) { { - TMap _map199 = iprot.readMapBegin(); - this.success = new HashMap(2*_map199.size); - for (int _i200 = 0; _i200 < _map199.size; ++_i200) + TMap _map211 = iprot.readMapBegin(); + this.success = new HashMap(2*_map211.size); + for (int _i212 = 0; _i212 < _map211.size; ++_i212) { - String _key201; - String _val202; - _key201 = iprot.readString(); - _val202 = iprot.readString(); - this.success.put(_key201, _val202); + String _key213; + String _val214; + _key213 = iprot.readString(); + _val214 = iprot.readString(); + this.success.put(_key213, _val214); } iprot.readMapEnd(); } @@ -38921,10 +40545,10 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); - for (Map.Entry _iter203 : this.success.entrySet()) + for (Map.Entry _iter215 : this.success.entrySet()) { - oprot.writeString(_iter203.getKey()); - oprot.writeString(_iter203.getValue()); + oprot.writeString(_iter215.getKey()); + oprot.writeString(_iter215.getValue()); } oprot.writeMapEnd(); } @@ -43528,14 +45152,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list204 = iprot.readListBegin(); - this.success = new ArrayList(_list204.size); - for (int _i205 = 0; _i205 < _list204.size; ++_i205) + TList _list216 = iprot.readListBegin(); + this.success = new ArrayList(_list216.size); + for (int _i217 = 0; _i217 < _list216.size; ++_i217) { - Index _elem206; - _elem206 = new Index(); - _elem206.read(iprot); - this.success.add(_elem206); + Index _elem218; + _elem218 = new Index(); + _elem218.read(iprot); + this.success.add(_elem218); } iprot.readListEnd(); } @@ -43575,9 +45199,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Index _iter207 : this.success) + for (Index _iter219 : this.success) { - _iter207.write(oprot); + _iter219.write(oprot); } oprot.writeListEnd(); } @@ -44405,13 +46029,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list208 = iprot.readListBegin(); - this.success = new ArrayList(_list208.size); - for (int _i209 = 0; _i209 < _list208.size; ++_i209) + TList _list220 = iprot.readListBegin(); + this.success = new ArrayList(_list220.size); + for (int _i221 = 0; _i221 < _list220.size; ++_i221) { - String _elem210; - _elem210 = iprot.readString(); - this.success.add(_elem210); + String _elem222; + _elem222 = iprot.readString(); + this.success.add(_elem222); } iprot.readListEnd(); } @@ -44443,9 +46067,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter211 : this.success) + for (String _iter223 : this.success) { - oprot.writeString(_iter211); + oprot.writeString(_iter223); } oprot.writeListEnd(); } @@ -46278,13 +47902,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list212 = iprot.readListBegin(); - this.success = new ArrayList(_list212.size); - for (int _i213 = 0; _i213 < _list212.size; ++_i213) + TList _list224 = iprot.readListBegin(); + this.success = new ArrayList(_list224.size); + for (int _i225 = 0; _i225 < _list224.size; ++_i225) { - String _elem214; - _elem214 = iprot.readString(); - this.success.add(_elem214); + String _elem226; + _elem226 = iprot.readString(); + this.success.add(_elem226); } iprot.readListEnd(); } @@ -46316,9 +47940,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter215 : this.success) + for (String _iter227 : this.success) { - oprot.writeString(_iter215); + oprot.writeString(_iter227); } oprot.writeListEnd(); } @@ -48994,14 +50618,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list216 = iprot.readListBegin(); - this.success = new ArrayList(_list216.size); - for (int _i217 = 0; _i217 < _list216.size; ++_i217) + TList _list228 = iprot.readListBegin(); + this.success = new ArrayList(_list228.size); + for (int _i229 = 0; _i229 < _list228.size; ++_i229) { - Role _elem218; - _elem218 = new Role(); - _elem218.read(iprot); - this.success.add(_elem218); + Role _elem230; + _elem230 = new Role(); + _elem230.read(iprot); + this.success.add(_elem230); } iprot.readListEnd(); } @@ -49033,9 +50657,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Role _iter219 : this.success) + for (Role _iter231 : this.success) { - _iter219.write(oprot); + _iter231.write(oprot); } oprot.writeListEnd(); } @@ -49480,13 +51104,13 @@ case 3: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list220 = iprot.readListBegin(); - this.group_names = new ArrayList(_list220.size); - for (int _i221 = 0; _i221 < _list220.size; ++_i221) + TList _list232 = iprot.readListBegin(); + this.group_names = new ArrayList(_list232.size); + for (int _i233 = 0; _i233 < _list232.size; ++_i233) { - String _elem222; - _elem222 = iprot.readString(); - this.group_names.add(_elem222); + String _elem234; + _elem234 = iprot.readString(); + this.group_names.add(_elem234); } iprot.readListEnd(); } @@ -49521,9 +51145,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter223 : this.group_names) + for (String _iter235 : this.group_names) { - oprot.writeString(_iter223); + oprot.writeString(_iter235); } oprot.writeListEnd(); } @@ -50722,14 +52346,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list224 = iprot.readListBegin(); - this.success = new ArrayList(_list224.size); - for (int _i225 = 0; _i225 < _list224.size; ++_i225) + TList _list236 = iprot.readListBegin(); + this.success = new ArrayList(_list236.size); + for (int _i237 = 0; _i237 < _list236.size; ++_i237) { - HiveObjectPrivilege _elem226; - _elem226 = new HiveObjectPrivilege(); - _elem226.read(iprot); - this.success.add(_elem226); + HiveObjectPrivilege _elem238; + _elem238 = new HiveObjectPrivilege(); + _elem238.read(iprot); + this.success.add(_elem238); } iprot.readListEnd(); } @@ -50761,9 +52385,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (HiveObjectPrivilege _iter227 : this.success) + for (HiveObjectPrivilege _iter239 : this.success) { - _iter227.write(oprot); + _iter239.write(oprot); } oprot.writeListEnd(); } Index: metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php =================================================================== --- metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (revision 1072194) +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (working copy) @@ -26,6 +26,8 @@ public function drop_table($dbname, $name, $deleteData); public function get_tables($db_name, $pattern); public function get_all_tables($db_name); + public function get_table_names_by_owner($owner); + public function get_tables_by_names($table_names); public function get_table($dbname, $tbl_name); public function alter_table($dbname, $tbl_name, $new_tbl); public function add_partition($new_part); @@ -983,6 +985,114 @@ throw new Exception("get_all_tables failed: unknown result"); } + public function get_table_names_by_owner($owner) + { + $this->send_get_table_names_by_owner($owner); + return $this->recv_get_table_names_by_owner(); + } + + public function send_get_table_names_by_owner($owner) + { + $args = new metastore_ThriftHiveMetastore_get_table_names_by_owner_args(); + $args->owner = $owner; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_names_by_owner', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_names_by_owner', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_names_by_owner() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_table_names_by_owner_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_table_names_by_owner_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("get_table_names_by_owner failed: unknown result"); + } + + public function get_tables_by_names($table_names) + { + $this->send_get_tables_by_names($table_names); + return $this->recv_get_tables_by_names(); + } + + public function send_get_tables_by_names($table_names) + { + $args = new metastore_ThriftHiveMetastore_get_tables_by_names_args(); + $args->table_names = $table_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_tables_by_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_tables_by_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_tables_by_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_tables_by_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_tables_by_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("get_tables_by_names failed: unknown result"); + } + public function get_table($dbname, $tbl_name) { $this->send_get_table($dbname, $tbl_name); @@ -6628,6 +6738,418 @@ } +class metastore_ThriftHiveMetastore_get_table_names_by_owner_args { + static $_TSPEC; + + public $owner = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'owner', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['owner'])) { + $this->owner = $vals['owner']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_names_by_owner_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->owner); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_owner_args'); + if ($this->owner !== null) { + $xfer += $output->writeFieldBegin('owner', TType::STRING, 1); + $xfer += $output->writeString($this->owner); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_table_names_by_owner_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_names_by_owner_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size225 = 0; + $_etype228 = 0; + $xfer += $input->readListBegin($_etype228, $_size225); + for ($_i229 = 0; $_i229 < $_size225; ++$_i229) + { + $elem230 = null; + $xfer += $input->readString($elem230); + $this->success []= $elem230; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_owner_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter231) + { + $xfer += $output->writeString($iter231); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_by_names_args { + static $_TSPEC; + + public $table_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'table_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['table_names'])) { + $this->table_names = $vals['table_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_by_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->table_names = array(); + $_size232 = 0; + $_etype235 = 0; + $xfer += $input->readListBegin($_etype235, $_size232); + for ($_i236 = 0; $_i236 < $_size232; ++$_i236) + { + $elem237 = null; + $xfer += $input->readString($elem237); + $this->table_names []= $elem237; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_by_names_args'); + if ($this->table_names !== null) { + if (!is_array($this->table_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('table_names', TType::LST, 1); + { + $output->writeListBegin(TType::STRING, count($this->table_names)); + { + foreach ($this->table_names as $iter238) + { + $xfer += $output->writeString($iter238); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_by_names_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_by_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size239 = 0; + $_etype242 = 0; + $xfer += $input->readListBegin($_etype242, $_size239); + for ($_i243 = 0; $_i243 < $_size239; ++$_i243) + { + $elem244 = null; + $elem244 = new metastore_Table(); + $xfer += $elem244->read($input); + $this->success []= $elem244; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_by_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter245) + { + $xfer += $iter245->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class metastore_ThriftHiveMetastore_get_table_args { static $_TSPEC; @@ -7351,14 +7873,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size225 = 0; - $_etype228 = 0; - $xfer += $input->readListBegin($_etype228, $_size225); - for ($_i229 = 0; $_i229 < $_size225; ++$_i229) + $_size246 = 0; + $_etype249 = 0; + $xfer += $input->readListBegin($_etype249, $_size246); + for ($_i250 = 0; $_i250 < $_size246; ++$_i250) { - $elem230 = null; - $xfer += $input->readString($elem230); - $this->part_vals []= $elem230; + $elem251 = null; + $xfer += $input->readString($elem251); + $this->part_vals []= $elem251; } $xfer += $input->readListEnd(); } else { @@ -7396,9 +7918,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter231) + foreach ($this->part_vals as $iter252) { - $xfer += $output->writeString($iter231); + $xfer += $output->writeString($iter252); } } $output->writeListEnd(); @@ -7895,14 +8417,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size232 = 0; - $_etype235 = 0; - $xfer += $input->readListBegin($_etype235, $_size232); - for ($_i236 = 0; $_i236 < $_size232; ++$_i236) + $_size253 = 0; + $_etype256 = 0; + $xfer += $input->readListBegin($_etype256, $_size253); + for ($_i257 = 0; $_i257 < $_size253; ++$_i257) { - $elem237 = null; - $xfer += $input->readString($elem237); - $this->part_vals []= $elem237; + $elem258 = null; + $xfer += $input->readString($elem258); + $this->part_vals []= $elem258; } $xfer += $input->readListEnd(); } else { @@ -7947,9 +8469,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter238) + foreach ($this->part_vals as $iter259) { - $xfer += $output->writeString($iter238); + $xfer += $output->writeString($iter259); } } $output->writeListEnd(); @@ -8409,14 +8931,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size239 = 0; - $_etype242 = 0; - $xfer += $input->readListBegin($_etype242, $_size239); - for ($_i243 = 0; $_i243 < $_size239; ++$_i243) + $_size260 = 0; + $_etype263 = 0; + $xfer += $input->readListBegin($_etype263, $_size260); + for ($_i264 = 0; $_i264 < $_size260; ++$_i264) { - $elem244 = null; - $xfer += $input->readString($elem244); - $this->part_vals []= $elem244; + $elem265 = null; + $xfer += $input->readString($elem265); + $this->part_vals []= $elem265; } $xfer += $input->readListEnd(); } else { @@ -8454,9 +8976,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter245) + foreach ($this->part_vals as $iter266) { - $xfer += $output->writeString($iter245); + $xfer += $output->writeString($iter266); } } $output->writeListEnd(); @@ -8688,14 +9210,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size246 = 0; - $_etype249 = 0; - $xfer += $input->readListBegin($_etype249, $_size246); - for ($_i250 = 0; $_i250 < $_size246; ++$_i250) + $_size267 = 0; + $_etype270 = 0; + $xfer += $input->readListBegin($_etype270, $_size267); + for ($_i271 = 0; $_i271 < $_size267; ++$_i271) { - $elem251 = null; - $xfer += $input->readString($elem251); - $this->part_vals []= $elem251; + $elem272 = null; + $xfer += $input->readString($elem272); + $this->part_vals []= $elem272; } $xfer += $input->readListEnd(); } else { @@ -8712,14 +9234,14 @@ case 5: if ($ftype == TType::LST) { $this->group_names = array(); - $_size252 = 0; - $_etype255 = 0; - $xfer += $input->readListBegin($_etype255, $_size252); - for ($_i256 = 0; $_i256 < $_size252; ++$_i256) + $_size273 = 0; + $_etype276 = 0; + $xfer += $input->readListBegin($_etype276, $_size273); + for ($_i277 = 0; $_i277 < $_size273; ++$_i277) { - $elem257 = null; - $xfer += $input->readString($elem257); - $this->group_names []= $elem257; + $elem278 = null; + $xfer += $input->readString($elem278); + $this->group_names []= $elem278; } $xfer += $input->readListEnd(); } else { @@ -8757,9 +9279,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter258) + foreach ($this->part_vals as $iter279) { - $xfer += $output->writeString($iter258); + $xfer += $output->writeString($iter279); } } $output->writeListEnd(); @@ -8779,9 +9301,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter259) + foreach ($this->group_names as $iter280) { - $xfer += $output->writeString($iter259); + $xfer += $output->writeString($iter280); } } $output->writeListEnd(); @@ -9327,15 +9849,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size260 = 0; - $_etype263 = 0; - $xfer += $input->readListBegin($_etype263, $_size260); - for ($_i264 = 0; $_i264 < $_size260; ++$_i264) + $_size281 = 0; + $_etype284 = 0; + $xfer += $input->readListBegin($_etype284, $_size281); + for ($_i285 = 0; $_i285 < $_size281; ++$_i285) { - $elem265 = null; - $elem265 = new metastore_Partition(); - $xfer += $elem265->read($input); - $this->success []= $elem265; + $elem286 = null; + $elem286 = new metastore_Partition(); + $xfer += $elem286->read($input); + $this->success []= $elem286; } $xfer += $input->readListEnd(); } else { @@ -9379,9 +9901,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter266) + foreach ($this->success as $iter287) { - $xfer += $iter266->write($output); + $xfer += $iter287->write($output); } } $output->writeListEnd(); @@ -9512,14 +10034,14 @@ case 5: if ($ftype == TType::LST) { $this->group_names = array(); - $_size267 = 0; - $_etype270 = 0; - $xfer += $input->readListBegin($_etype270, $_size267); - for ($_i271 = 0; $_i271 < $_size267; ++$_i271) + $_size288 = 0; + $_etype291 = 0; + $xfer += $input->readListBegin($_etype291, $_size288); + for ($_i292 = 0; $_i292 < $_size288; ++$_i292) { - $elem272 = null; - $xfer += $input->readString($elem272); - $this->group_names []= $elem272; + $elem293 = null; + $xfer += $input->readString($elem293); + $this->group_names []= $elem293; } $xfer += $input->readListEnd(); } else { @@ -9567,9 +10089,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter273) + foreach ($this->group_names as $iter294) { - $xfer += $output->writeString($iter273); + $xfer += $output->writeString($iter294); } } $output->writeListEnd(); @@ -9649,15 +10171,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size274 = 0; - $_etype277 = 0; - $xfer += $input->readListBegin($_etype277, $_size274); - for ($_i278 = 0; $_i278 < $_size274; ++$_i278) + $_size295 = 0; + $_etype298 = 0; + $xfer += $input->readListBegin($_etype298, $_size295); + for ($_i299 = 0; $_i299 < $_size295; ++$_i299) { - $elem279 = null; - $elem279 = new metastore_Partition(); - $xfer += $elem279->read($input); - $this->success []= $elem279; + $elem300 = null; + $elem300 = new metastore_Partition(); + $xfer += $elem300->read($input); + $this->success []= $elem300; } $xfer += $input->readListEnd(); } else { @@ -9701,9 +10223,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter280) + foreach ($this->success as $iter301) { - $xfer += $iter280->write($output); + $xfer += $iter301->write($output); } } $output->writeListEnd(); @@ -9895,14 +10417,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size281 = 0; - $_etype284 = 0; - $xfer += $input->readListBegin($_etype284, $_size281); - for ($_i285 = 0; $_i285 < $_size281; ++$_i285) + $_size302 = 0; + $_etype305 = 0; + $xfer += $input->readListBegin($_etype305, $_size302); + for ($_i306 = 0; $_i306 < $_size302; ++$_i306) { - $elem286 = null; - $xfer += $input->readString($elem286); - $this->success []= $elem286; + $elem307 = null; + $xfer += $input->readString($elem307); + $this->success []= $elem307; } $xfer += $input->readListEnd(); } else { @@ -9938,9 +10460,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter287) + foreach ($this->success as $iter308) { - $xfer += $output->writeString($iter287); + $xfer += $output->writeString($iter308); } } $output->writeListEnd(); @@ -10044,14 +10566,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size288 = 0; - $_etype291 = 0; - $xfer += $input->readListBegin($_etype291, $_size288); - for ($_i292 = 0; $_i292 < $_size288; ++$_i292) + $_size309 = 0; + $_etype312 = 0; + $xfer += $input->readListBegin($_etype312, $_size309); + for ($_i313 = 0; $_i313 < $_size309; ++$_i313) { - $elem293 = null; - $xfer += $input->readString($elem293); - $this->part_vals []= $elem293; + $elem314 = null; + $xfer += $input->readString($elem314); + $this->part_vals []= $elem314; } $xfer += $input->readListEnd(); } else { @@ -10096,9 +10618,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter294) + foreach ($this->part_vals as $iter315) { - $xfer += $output->writeString($iter294); + $xfer += $output->writeString($iter315); } } $output->writeListEnd(); @@ -10174,15 +10696,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size295 = 0; - $_etype298 = 0; - $xfer += $input->readListBegin($_etype298, $_size295); - for ($_i299 = 0; $_i299 < $_size295; ++$_i299) + $_size316 = 0; + $_etype319 = 0; + $xfer += $input->readListBegin($_etype319, $_size316); + for ($_i320 = 0; $_i320 < $_size316; ++$_i320) { - $elem300 = null; - $elem300 = new metastore_Partition(); - $xfer += $elem300->read($input); - $this->success []= $elem300; + $elem321 = null; + $elem321 = new metastore_Partition(); + $xfer += $elem321->read($input); + $this->success []= $elem321; } $xfer += $input->readListEnd(); } else { @@ -10218,9 +10740,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter301) + foreach ($this->success as $iter322) { - $xfer += $iter301->write($output); + $xfer += $iter322->write($output); } } $output->writeListEnd(); @@ -10344,14 +10866,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size302 = 0; - $_etype305 = 0; - $xfer += $input->readListBegin($_etype305, $_size302); - for ($_i306 = 0; $_i306 < $_size302; ++$_i306) + $_size323 = 0; + $_etype326 = 0; + $xfer += $input->readListBegin($_etype326, $_size323); + for ($_i327 = 0; $_i327 < $_size323; ++$_i327) { - $elem307 = null; - $xfer += $input->readString($elem307); - $this->part_vals []= $elem307; + $elem328 = null; + $xfer += $input->readString($elem328); + $this->part_vals []= $elem328; } $xfer += $input->readListEnd(); } else { @@ -10375,14 +10897,14 @@ case 6: if ($ftype == TType::LST) { $this->group_names = array(); - $_size308 = 0; - $_etype311 = 0; - $xfer += $input->readListBegin($_etype311, $_size308); - for ($_i312 = 0; $_i312 < $_size308; ++$_i312) + $_size329 = 0; + $_etype332 = 0; + $xfer += $input->readListBegin($_etype332, $_size329); + for ($_i333 = 0; $_i333 < $_size329; ++$_i333) { - $elem313 = null; - $xfer += $input->readString($elem313); - $this->group_names []= $elem313; + $elem334 = null; + $xfer += $input->readString($elem334); + $this->group_names []= $elem334; } $xfer += $input->readListEnd(); } else { @@ -10420,9 +10942,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter314) + foreach ($this->part_vals as $iter335) { - $xfer += $output->writeString($iter314); + $xfer += $output->writeString($iter335); } } $output->writeListEnd(); @@ -10447,9 +10969,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter315) + foreach ($this->group_names as $iter336) { - $xfer += $output->writeString($iter315); + $xfer += $output->writeString($iter336); } } $output->writeListEnd(); @@ -10529,15 +11051,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size316 = 0; - $_etype319 = 0; - $xfer += $input->readListBegin($_etype319, $_size316); - for ($_i320 = 0; $_i320 < $_size316; ++$_i320) + $_size337 = 0; + $_etype340 = 0; + $xfer += $input->readListBegin($_etype340, $_size337); + for ($_i341 = 0; $_i341 < $_size337; ++$_i341) { - $elem321 = null; - $elem321 = new metastore_Partition(); - $xfer += $elem321->read($input); - $this->success []= $elem321; + $elem342 = null; + $elem342 = new metastore_Partition(); + $xfer += $elem342->read($input); + $this->success []= $elem342; } $xfer += $input->readListEnd(); } else { @@ -10581,9 +11103,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter322) + foreach ($this->success as $iter343) { - $xfer += $iter322->write($output); + $xfer += $iter343->write($output); } } $output->writeListEnd(); @@ -10692,14 +11214,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size323 = 0; - $_etype326 = 0; - $xfer += $input->readListBegin($_etype326, $_size323); - for ($_i327 = 0; $_i327 < $_size323; ++$_i327) + $_size344 = 0; + $_etype347 = 0; + $xfer += $input->readListBegin($_etype347, $_size344); + for ($_i348 = 0; $_i348 < $_size344; ++$_i348) { - $elem328 = null; - $xfer += $input->readString($elem328); - $this->part_vals []= $elem328; + $elem349 = null; + $xfer += $input->readString($elem349); + $this->part_vals []= $elem349; } $xfer += $input->readListEnd(); } else { @@ -10744,9 +11266,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter329) + foreach ($this->part_vals as $iter350) { - $xfer += $output->writeString($iter329); + $xfer += $output->writeString($iter350); } } $output->writeListEnd(); @@ -10821,14 +11343,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size330 = 0; - $_etype333 = 0; - $xfer += $input->readListBegin($_etype333, $_size330); - for ($_i334 = 0; $_i334 < $_size330; ++$_i334) + $_size351 = 0; + $_etype354 = 0; + $xfer += $input->readListBegin($_etype354, $_size351); + for ($_i355 = 0; $_i355 < $_size351; ++$_i355) { - $elem335 = null; - $xfer += $input->readString($elem335); - $this->success []= $elem335; + $elem356 = null; + $xfer += $input->readString($elem356); + $this->success []= $elem356; } $xfer += $input->readListEnd(); } else { @@ -10864,9 +11386,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter336) + foreach ($this->success as $iter357) { - $xfer += $output->writeString($iter336); + $xfer += $output->writeString($iter357); } } $output->writeListEnd(); @@ -11083,15 +11605,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size337 = 0; - $_etype340 = 0; - $xfer += $input->readListBegin($_etype340, $_size337); - for ($_i341 = 0; $_i341 < $_size337; ++$_i341) + $_size358 = 0; + $_etype361 = 0; + $xfer += $input->readListBegin($_etype361, $_size358); + for ($_i362 = 0; $_i362 < $_size358; ++$_i362) { - $elem342 = null; - $elem342 = new metastore_Partition(); - $xfer += $elem342->read($input); - $this->success []= $elem342; + $elem363 = null; + $elem363 = new metastore_Partition(); + $xfer += $elem363->read($input); + $this->success []= $elem363; } $xfer += $input->readListEnd(); } else { @@ -11135,9 +11657,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter343) + foreach ($this->success as $iter364) { - $xfer += $iter343->write($output); + $xfer += $iter364->write($output); } } $output->writeListEnd(); @@ -11688,14 +12210,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size344 = 0; - $_etype347 = 0; - $xfer += $input->readListBegin($_etype347, $_size344); - for ($_i348 = 0; $_i348 < $_size344; ++$_i348) + $_size365 = 0; + $_etype368 = 0; + $xfer += $input->readListBegin($_etype368, $_size365); + for ($_i369 = 0; $_i369 < $_size365; ++$_i369) { - $elem349 = null; - $xfer += $input->readString($elem349); - $this->success []= $elem349; + $elem370 = null; + $xfer += $input->readString($elem370); + $this->success []= $elem370; } $xfer += $input->readListEnd(); } else { @@ -11731,9 +12253,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter350) + foreach ($this->success as $iter371) { - $xfer += $output->writeString($iter350); + $xfer += $output->writeString($iter371); } } $output->writeListEnd(); @@ -11884,17 +12406,17 @@ case 0: if ($ftype == TType::MAP) { $this->success = array(); - $_size351 = 0; - $_ktype352 = 0; - $_vtype353 = 0; - $xfer += $input->readMapBegin($_ktype352, $_vtype353, $_size351); - for ($_i355 = 0; $_i355 < $_size351; ++$_i355) + $_size372 = 0; + $_ktype373 = 0; + $_vtype374 = 0; + $xfer += $input->readMapBegin($_ktype373, $_vtype374, $_size372); + for ($_i376 = 0; $_i376 < $_size372; ++$_i376) { - $key356 = ''; - $val357 = ''; - $xfer += $input->readString($key356); - $xfer += $input->readString($val357); - $this->success[$key356] = $val357; + $key377 = ''; + $val378 = ''; + $xfer += $input->readString($key377); + $xfer += $input->readString($val378); + $this->success[$key377] = $val378; } $xfer += $input->readMapEnd(); } else { @@ -11930,10 +12452,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); { - foreach ($this->success as $kiter358 => $viter359) + foreach ($this->success as $kiter379 => $viter380) { - $xfer += $output->writeString($kiter358); - $xfer += $output->writeString($viter359); + $xfer += $output->writeString($kiter379); + $xfer += $output->writeString($viter380); } } $output->writeMapEnd(); @@ -13089,15 +13611,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size360 = 0; - $_etype363 = 0; - $xfer += $input->readListBegin($_etype363, $_size360); - for ($_i364 = 0; $_i364 < $_size360; ++$_i364) + $_size381 = 0; + $_etype384 = 0; + $xfer += $input->readListBegin($_etype384, $_size381); + for ($_i385 = 0; $_i385 < $_size381; ++$_i385) { - $elem365 = null; - $elem365 = new metastore_Index(); - $xfer += $elem365->read($input); - $this->success []= $elem365; + $elem386 = null; + $elem386 = new metastore_Index(); + $xfer += $elem386->read($input); + $this->success []= $elem386; } $xfer += $input->readListEnd(); } else { @@ -13141,9 +13663,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter366) + foreach ($this->success as $iter387) { - $xfer += $iter366->write($output); + $xfer += $iter387->write($output); } } $output->writeListEnd(); @@ -13335,14 +13857,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size367 = 0; - $_etype370 = 0; - $xfer += $input->readListBegin($_etype370, $_size367); - for ($_i371 = 0; $_i371 < $_size367; ++$_i371) + $_size388 = 0; + $_etype391 = 0; + $xfer += $input->readListBegin($_etype391, $_size388); + for ($_i392 = 0; $_i392 < $_size388; ++$_i392) { - $elem372 = null; - $xfer += $input->readString($elem372); - $this->success []= $elem372; + $elem393 = null; + $xfer += $input->readString($elem393); + $this->success []= $elem393; } $xfer += $input->readListEnd(); } else { @@ -13378,9 +13900,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter373) + foreach ($this->success as $iter394) { - $xfer += $output->writeString($iter373); + $xfer += $output->writeString($iter394); } } $output->writeListEnd(); @@ -13842,14 +14364,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size374 = 0; - $_etype377 = 0; - $xfer += $input->readListBegin($_etype377, $_size374); - for ($_i378 = 0; $_i378 < $_size374; ++$_i378) + $_size395 = 0; + $_etype398 = 0; + $xfer += $input->readListBegin($_etype398, $_size395); + for ($_i399 = 0; $_i399 < $_size395; ++$_i399) { - $elem379 = null; - $xfer += $input->readString($elem379); - $this->success []= $elem379; + $elem400 = null; + $xfer += $input->readString($elem400); + $this->success []= $elem400; } $xfer += $input->readListEnd(); } else { @@ -13885,9 +14407,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter380) + foreach ($this->success as $iter401) { - $xfer += $output->writeString($iter380); + $xfer += $output->writeString($iter401); } } $output->writeListEnd(); @@ -14527,15 +15049,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size381 = 0; - $_etype384 = 0; - $xfer += $input->readListBegin($_etype384, $_size381); - for ($_i385 = 0; $_i385 < $_size381; ++$_i385) + $_size402 = 0; + $_etype405 = 0; + $xfer += $input->readListBegin($_etype405, $_size402); + for ($_i406 = 0; $_i406 < $_size402; ++$_i406) { - $elem386 = null; - $elem386 = new metastore_Role(); - $xfer += $elem386->read($input); - $this->success []= $elem386; + $elem407 = null; + $elem407 = new metastore_Role(); + $xfer += $elem407->read($input); + $this->success []= $elem407; } $xfer += $input->readListEnd(); } else { @@ -14571,9 +15093,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter387) + foreach ($this->success as $iter408) { - $xfer += $iter387->write($output); + $xfer += $iter408->write($output); } } $output->writeListEnd(); @@ -14671,14 +15193,14 @@ case 3: if ($ftype == TType::LST) { $this->group_names = array(); - $_size388 = 0; - $_etype391 = 0; - $xfer += $input->readListBegin($_etype391, $_size388); - for ($_i392 = 0; $_i392 < $_size388; ++$_i392) + $_size409 = 0; + $_etype412 = 0; + $xfer += $input->readListBegin($_etype412, $_size409); + for ($_i413 = 0; $_i413 < $_size409; ++$_i413) { - $elem393 = null; - $xfer += $input->readString($elem393); - $this->group_names []= $elem393; + $elem414 = null; + $xfer += $input->readString($elem414); + $this->group_names []= $elem414; } $xfer += $input->readListEnd(); } else { @@ -14719,9 +15241,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter394) + foreach ($this->group_names as $iter415) { - $xfer += $output->writeString($iter394); + $xfer += $output->writeString($iter415); } } $output->writeListEnd(); @@ -15008,15 +15530,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size395 = 0; - $_etype398 = 0; - $xfer += $input->readListBegin($_etype398, $_size395); - for ($_i399 = 0; $_i399 < $_size395; ++$_i399) + $_size416 = 0; + $_etype419 = 0; + $xfer += $input->readListBegin($_etype419, $_size416); + for ($_i420 = 0; $_i420 < $_size416; ++$_i420) { - $elem400 = null; - $elem400 = new metastore_HiveObjectPrivilege(); - $xfer += $elem400->read($input); - $this->success []= $elem400; + $elem421 = null; + $elem421 = new metastore_HiveObjectPrivilege(); + $xfer += $elem421->read($input); + $this->success []= $elem421; } $xfer += $input->readListEnd(); } else { @@ -15052,9 +15574,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter401) + foreach ($this->success as $iter422) { - $xfer += $iter401->write($output); + $xfer += $iter422->write($output); } } $output->writeListEnd(); Index: metastore/if/hive_metastore.thrift =================================================================== --- metastore/if/hive_metastore.thrift (revision 1072194) +++ metastore/if/hive_metastore.thrift (working copy) @@ -213,7 +213,7 @@ list get_databases(1:string pattern) throws(1:MetaException o1) list get_all_databases() throws(1:MetaException o1) void alter_database(1:string dbname, 2:Database db) throws(1:MetaException o1, 2:NoSuchObjectException o2) - + // returns the type with given name (make seperate calls for the dependent types if needed) Type get_type(1:string name) throws(1:MetaException o1, 2:NoSuchObjectException o2) bool create_type(1:Type type) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3) @@ -243,6 +243,10 @@ throws(1:NoSuchObjectException o1, 2:MetaException o3) list get_tables(1: string db_name, 2: string pattern) throws (1: MetaException o1) list get_all_tables(1: string db_name) throws (1: MetaException o1) + list get_table_names_by_owner(1: string owner) + throws (1: MetaException o1) + list
get_tables_by_names(1: list table_names) + throws (1: MetaException o1) Table get_table(1:string dbname, 2:string tbl_name) throws (1:MetaException o1, 2:NoSuchObjectException o2) @@ -262,11 +266,11 @@ bool drop_partition(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:bool deleteData) throws(1:NoSuchObjectException o1, 2:MetaException o2) bool drop_partition_by_name(1:string db_name, 2:string tbl_name, 3:string part_name, 4:bool deleteData) - throws(1:NoSuchObjectException o1, 2:MetaException o2) + throws(1:NoSuchObjectException o1, 2:MetaException o2) Partition get_partition(1:string db_name, 2:string tbl_name, 3:list part_vals) throws(1:MetaException o1, 2:NoSuchObjectException o2) - Partition get_partition_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, + Partition get_partition_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, 4: string user_name, 5: list group_names) throws(1:MetaException o1, 2:NoSuchObjectException o2) Partition get_partition_by_name(1:string db_name 2:string tbl_name, 3:string part_name) @@ -276,25 +280,25 @@ // If max parts is given then it will return only that many. list get_partitions(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) throws(1:NoSuchObjectException o1, 2:MetaException o2) - list get_partitions_with_auth(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1, - 4: string user_name, 5: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) + list get_partitions_with_auth(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1, + 4: string user_name, 5: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) list get_partition_names(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) throws(1:MetaException o2) - - // get_partition*_ps methods allow filtering by a partial partition specification, - // as needed for dynamic partitions. The values that are not restricted should - // be empty strings. Nulls were considered (instead of "") but caused errors in + + // get_partition*_ps methods allow filtering by a partial partition specification, + // as needed for dynamic partitions. The values that are not restricted should + // be empty strings. Nulls were considered (instead of "") but caused errors in // generated Python code. The size of part_vals may be smaller than the // number of partition columns - the unspecified values are considered the same // as "". - list get_partitions_ps(1:string db_name 2:string tbl_name + list get_partitions_ps(1:string db_name 2:string tbl_name 3:list part_vals, 4:i16 max_parts=-1) throws(1:MetaException o1) - list get_partitions_ps_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1, - 5: string user_name, 6: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) - - list get_partition_names_ps(1:string db_name, + list get_partitions_ps_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1, + 5: string user_name, 6: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) + + list get_partition_names_ps(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1) throws(1:MetaException o1) @@ -315,7 +319,7 @@ // thrown. string get_config_value(1:string name, 2:string defaultValue) throws(1:ConfigValSecurityException o1) - + // converts a partition name into a partition values array list partition_name_to_vals(1: string part_name) throws(1: MetaException o1) @@ -323,14 +327,14 @@ // the partition cols to the values) map partition_name_to_spec(1: string part_name) throws(1: MetaException o1) - + //index Index add_index(1:Index new_index, 2: Table index_table) throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) void alter_index(1:string dbname, 2:string base_tbl_name, 3:string idx_name, 4:Index new_idx) throws (1:InvalidOperationException o1, 2:MetaException o2) bool drop_index_by_name(1:string db_name, 2:string tbl_name, 3:string index_name, 4:bool deleteData) - throws(1:NoSuchObjectException o1, 2:MetaException o2) + throws(1:NoSuchObjectException o1, 2:MetaException o2) Index get_index_by_name(1:string db_name 2:string tbl_name, 3:string index_name) throws(1:MetaException o1, 2:NoSuchObjectException o2) @@ -340,26 +344,26 @@ throws(1:MetaException o2) //authorization privileges - + bool create_role(1:Role role) throws(1:MetaException o1) bool drop_role(1:string role_name) throws(1:MetaException o1) list get_role_names() throws(1:MetaException o1) - bool grant_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type, + bool grant_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type, 4:string grantor, 5:PrincipalType grantorType, 6:bool grant_option) throws(1:MetaException o1) - bool revoke_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type) + bool revoke_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type) throws(1:MetaException o1) list list_roles(1:string principal_name, 2:PrincipalType principal_type) throws(1:MetaException o1) - PrincipalPrivilegeSet get_privilege_set(1:HiveObjectRef hiveObject, 2:string user_name, + PrincipalPrivilegeSet get_privilege_set(1:HiveObjectRef hiveObject, 2:string user_name, 3: list group_names) throws(1:MetaException o1) - list list_privileges(1:string principal_name, 2:PrincipalType principal_type, + list list_privileges(1:string principal_name, 2:PrincipalType principal_type, 3: HiveObjectRef hiveObject) throws(1:MetaException o1) - + bool grant_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) bool revoke_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) - + //Authentication (delegation token) interfaces - + // get metastore server delegation token for use from the map/reduce tasks to authenticate // to metastore server string get_delegation_token(1:string renewer_kerberos_principal_name) throws (1:MetaException o1) @@ -368,7 +372,7 @@ // to metastore server - this method takes an extra token signature string which is just // an identifier to associate with the token - this will be used by the token selector code // to pick the right token given the associated identifier. - string get_delegation_token_with_signature(1:string renewer_kerberos_principal_name, + string get_delegation_token_with_signature(1:string renewer_kerberos_principal_name, 2:string token_signature) throws (1:MetaException o1) // method to renew delegation token obtained from metastore server