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 1068698) +++ 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,63 @@ (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 tabs = client.getTablesByOwner(owner1, 0, 1); + 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()); + + tabs = client.getTablesByOwner(owner2, 0, 3); + 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()); + + tabs = client.getTablesByOwner(owner2, 1, 3); + 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()); + + tabs = client.getTablesByOwner("dummy", 0, 1); + assertNotNull(tabs); + assertEquals(tabs.size(), 0); + + tabs = client.getTablesByOwner(owner1, 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 +787,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 1068698) +++ 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 1068698) +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (working copy) @@ -116,6 +116,9 @@ public List getAllTables(String dbName) throws MetaException; + public List
getTablesByOwner(String owner, long offset, int limit) + throws MetaException; + public abstract List listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException; @@ -144,48 +147,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 +196,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 1068698) +++ 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,17 @@ return null; } + /** {@inheritDoc} */ + public List
getTablesByOwner(String owner, long offset, int limit) + throws MetaException { + try { + return client.get_tables_by_owner(owner, offset, limit); + } catch (Exception e) { + MetaStoreUtils.logAndThrowMetaException(e); + } + return null; + } + public boolean tableExists(String databaseName, String tableName) throws MetaException, TException, UnknownDBException { try { @@ -1005,13 +1016,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 1068698) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -1690,6 +1690,29 @@ return ret; } + public List
get_tables_by_owner(final String owner, + final long offset, + final int limit) throws MetaException { + startFunction("get_tables_by_owner", ": owner=" + owner + + " offset = " + offset + " limit = " + limit); + + List
ret; + try { + ret = executeWithRetry(new Command>() { + @Override + List
run(RawStore ms) throws Exception { + return ms.getTablesByOwner(owner, offset, limit); + } + }); + } 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 1068698) +++ 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,35 @@ return getTables(dbName, ".*"); } + public List
getTablesByOwner(String owner, long offset, int limit) + throws MetaException { + + List
tbls = null; + boolean commited = false; + try { + openTransaction(); + String o = owner.toLowerCase().trim(); + Query query = pm.newQuery(MTable.class, "owner == o"); + query.declareParameters("java.lang.String o"); + query.setRange(offset, offset + limit); + query.setOrdering("database.name ascending, tableName ascending"); + Collection c = (Collection) query.execute(o); + 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 +989,7 @@ toPersist.add(partGrant); } } - + if (tabColumnGrants != null) { for (MTableColumnPrivilege col : tabColumnGrants) { MPartitionColumnPrivilege partColumn = new MPartitionColumnPrivilege(col @@ -969,7 +998,7 @@ .getGrantorType(), col.getGrantOption()); toPersist.add(partColumn); } - + if (toPersist.size() > 0) { pm.makePersistentAll(toPersist); } @@ -996,7 +1025,7 @@ } return part; } - + private MPartition getMPartition(String dbName, String tableName, List part_vals) throws MetaException { MPartition mpart = null; @@ -1068,7 +1097,7 @@ colNames.add(col.getName()); } String partName = FileUtils.makePartName(colNames, part_vals); - + List partGrants = listPartitionGrants( dbName, tableName, partName); @@ -1134,7 +1163,7 @@ } } } - + @Override public Partition getPartitionWithAuth(String dbName, String tblName, List partVals, String user_name, List group_names) @@ -1778,7 +1807,7 @@ } return success; } - + private MRoleMap getMSecurityUserRoleMap(String userName, PrincipalType principalType, String roleName) { MRoleMap mRoleMember = null; @@ -1861,7 +1890,7 @@ } return success; } - + private List listRoles(String userName, List groupNames) { List ret = new ArrayList(); @@ -1875,7 +1904,7 @@ } return ret; } - + @SuppressWarnings("unchecked") @Override public List listRoles(String principalName, @@ -1942,7 +1971,7 @@ .getOwnerName()); return ret; } - + private MRole getMRole(String roleName) { MRole mrole = null; boolean commited = false; @@ -1961,7 +1990,7 @@ } return mrole; } - + public List listRoleNames() { boolean success = false; try { @@ -1982,7 +2011,7 @@ } } } - + @Override public PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List groupNames) throws InvalidObjectException, MetaException { @@ -2030,7 +2059,7 @@ } return ret; } - + public List getDBPrivilege(String dbName, String principalName, PrincipalType principalType) throws InvalidObjectException, MetaException { @@ -2054,7 +2083,7 @@ return new ArrayList(0); } - + @Override public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, String userName, List groupNames) throws InvalidObjectException, @@ -2185,7 +2214,7 @@ } return ret; } - + @Override public PrincipalPrivilegeSet getColumnPrivilegeSet(String dbName, String tableName, String partitionName, String columnName, @@ -2231,7 +2260,7 @@ } return ret; } - + private List getPartitionPrivilege(String dbName, String tableName, String partName, String principalName, PrincipalType principalType) { @@ -2262,7 +2291,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 +2315,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 +2501,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 +2524,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 +2568,7 @@ } return committed; } - + @Override public boolean revokePrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException { @@ -2547,13 +2576,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 +2614,7 @@ } } } - + } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) { MDatabase dbObj = getMDatabase(hiveObject.getDbName()); if (dbObj != null) { @@ -2630,7 +2659,7 @@ } } } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) { - + boolean found = false; Table tabObj = this.getTable(hiveObject.getDbName(), hiveObject.getObjectName()); String partName = null; @@ -2664,7 +2693,7 @@ partName = Warehouse.makePartName(tabObj.getPartitionKeys(), hiveObject.getPartValues()); } - + if (partName != null) { List mSecCol = listPrincipalPartitionColumnGrants( userName, principalType, hiveObject.getDbName(), hiveObject @@ -2718,7 +2747,7 @@ } } } - + if (persistentObjs.size() > 0) { pm.deletePersistentAll(persistentObjs); } @@ -2730,7 +2759,7 @@ } return committed; } - + @SuppressWarnings("unchecked") private List listRoleMembers( MRole mRol) { @@ -2756,7 +2785,7 @@ } return mRoleMemeberList; } - + @SuppressWarnings("unchecked") @Override public List listPrincipalGlobalGrants(String principalName, PrincipalType principalType) { @@ -2809,7 +2838,7 @@ } return mSecurityDBList; } - + @SuppressWarnings("unchecked") private List listPrincipalAllDBGrant( String principalName, PrincipalType principalType) { @@ -2866,7 +2895,7 @@ } return mSecurityTabList; } - + @SuppressWarnings("unchecked") public List listTableAllPartitionGrants(String dbName, String tableName) { @@ -2896,7 +2925,7 @@ } return mSecurityTabPartList; } - + @SuppressWarnings("unchecked") public List listTableAllColumnGrants(String dbName, String tableName) { @@ -2924,7 +2953,7 @@ } return mTblColPrivilegeList; } - + @SuppressWarnings("unchecked") public List listTableAllPartitionColumnGrants(String dbName, String tableName) { @@ -2952,7 +2981,7 @@ } return mSecurityColList; } - + @SuppressWarnings("unchecked") public List listPartitionAllColumnGrants(String dbName, String tableName, String partName) { @@ -3006,7 +3035,7 @@ } } } - + @SuppressWarnings("unchecked") private List listPartitionGrants(String dbName, String tableName, String partName) { @@ -3091,7 +3120,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 +3165,7 @@ } return mSecurityColList; } - + @SuppressWarnings("unchecked") public List listPrincipalPartitionColumnGrants( String principalName, PrincipalType principalType, String dbName, @@ -3175,7 +3204,7 @@ } return mSecurityColList; } - + @SuppressWarnings("unchecked") private List listPrincipalAllTableGrants( String principalName, PrincipalType principalType) { @@ -3229,7 +3258,7 @@ } return mSecurityTabPartList; } - + @SuppressWarnings("unchecked") private List listPrincipalAllTableColumnGrants( String principalName, PrincipalType principalType) { @@ -3255,7 +3284,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 1068698) +++ 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 1068698) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -135,6 +135,15 @@ """ pass + def get_tables_by_owner(self, owner, offset, limit): + """ + Parameters: + - owner + - offset + - limit + """ + pass + def get_table(self, dbname, tbl_name): """ Parameters: @@ -1045,6 +1054,42 @@ raise result.o1 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); + def get_tables_by_owner(self, owner, offset, limit): + """ + Parameters: + - owner + - offset + - limit + """ + self.send_get_tables_by_owner(owner, offset, limit) + return self.recv_get_tables_by_owner() + + def send_get_tables_by_owner(self, owner, offset, limit): + self._oprot.writeMessageBegin('get_tables_by_owner', TMessageType.CALL, self._seqid) + args = get_tables_by_owner_args() + args.owner = owner + args.offset = offset + args.limit = limit + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables_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_tables_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_tables_by_owner failed: unknown result"); + def get_table(self, dbname, tbl_name): """ Parameters: @@ -2556,6 +2601,7 @@ 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_tables_by_owner"] = Processor.process_get_tables_by_owner 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 +2919,20 @@ oprot.writeMessageEnd() oprot.trans.flush() + def process_get_tables_by_owner(self, seqid, iprot, oprot): + args = get_tables_by_owner_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_by_owner_result() + try: + result.success = self._handler.get_tables_by_owner(args.owner, args.offset, args.limit) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_tables_by_owner", 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 +5950,169 @@ def __ne__(self, other): return not (self == other) +class get_tables_by_owner_args: + """ + Attributes: + - owner + - offset + - limit + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'owner', None, None, ), # 1 + (2, TType.I64, 'offset', None, None, ), # 2 + (3, TType.I32, 'limit', None, None, ), # 3 + ) + + def __init__(self, owner=None, offset=None, limit=None,): + self.owner = owner + self.offset = offset + self.limit = limit + + 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) + elif fid == 2: + if ftype == TType.I64: + self.offset = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.limit = iprot.readI32(); + 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_owner_args') + if self.owner != None: + oprot.writeFieldBegin('owner', TType.STRING, 1) + oprot.writeString(self.owner) + oprot.writeFieldEnd() + if self.offset != None: + oprot.writeFieldBegin('offset', TType.I64, 2) + oprot.writeI64(self.offset) + oprot.writeFieldEnd() + if self.limit != None: + oprot.writeFieldBegin('limit', TType.I32, 3) + oprot.writeI32(self.limit) + 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_owner_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 = [] + (_etype228, _size225) = iprot.readListBegin() + for _i229 in xrange(_size225): + _elem230 = Table() + _elem230.read(iprot) + 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_tables_by_owner_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter231 in self.success: + iter231.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 +6626,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) + (_etype235, _size232) = iprot.readListBegin() + for _i236 in xrange(_size232): + _elem237 = iprot.readString(); + self.part_vals.append(_elem237) iprot.readListEnd() else: iprot.skip(ftype) @@ -6431,8 +6654,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 iter238 in self.part_vals: + oprot.writeString(iter238) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6776,10 +6999,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) + (_etype242, _size239) = iprot.readListBegin() + for _i243 in xrange(_size239): + _elem244 = iprot.readString(); + self.part_vals.append(_elem244) iprot.readListEnd() else: iprot.skip(ftype) @@ -6809,8 +7032,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 iter245 in self.part_vals: + oprot.writeString(iter245) oprot.writeListEnd() oprot.writeFieldEnd() if self.deleteData != None: @@ -7139,10 +7362,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) + (_etype249, _size246) = iprot.readListBegin() + for _i250 in xrange(_size246): + _elem251 = iprot.readString(); + self.part_vals.append(_elem251) iprot.readListEnd() else: iprot.skip(ftype) @@ -7167,8 +7390,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 iter252 in self.part_vals: + oprot.writeString(iter252) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7321,10 +7544,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) + (_etype256, _size253) = iprot.readListBegin() + for _i257 in xrange(_size253): + _elem258 = iprot.readString(); + self.part_vals.append(_elem258) iprot.readListEnd() else: iprot.skip(ftype) @@ -7336,10 +7559,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) + (_etype262, _size259) = iprot.readListBegin() + for _i263 in xrange(_size259): + _elem264 = iprot.readString(); + self.group_names.append(_elem264) iprot.readListEnd() else: iprot.skip(ftype) @@ -7364,8 +7587,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 iter265 in self.part_vals: + oprot.writeString(iter265) oprot.writeListEnd() oprot.writeFieldEnd() if self.user_name != None: @@ -7375,8 +7598,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 iter266 in self.group_names: + oprot.writeString(iter266) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7763,11 +7986,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) + (_etype270, _size267) = iprot.readListBegin() + for _i271 in xrange(_size267): + _elem272 = Partition() + _elem272.read(iprot) + self.success.append(_elem272) iprot.readListEnd() else: iprot.skip(ftype) @@ -7796,8 +8019,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 iter273 in self.success: + iter273.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -7883,10 +8106,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) + (_etype277, _size274) = iprot.readListBegin() + for _i278 in xrange(_size274): + _elem279 = iprot.readString(); + self.group_names.append(_elem279) iprot.readListEnd() else: iprot.skip(ftype) @@ -7919,8 +8142,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 iter280 in self.group_names: + oprot.writeString(iter280) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7971,11 +8194,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) + (_etype284, _size281) = iprot.readListBegin() + for _i285 in xrange(_size281): + _elem286 = Partition() + _elem286.read(iprot) + self.success.append(_elem286) iprot.readListEnd() else: iprot.skip(ftype) @@ -8004,8 +8227,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 iter287 in self.success: + iter287.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8144,10 +8367,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) + (_etype291, _size288) = iprot.readListBegin() + for _i292 in xrange(_size288): + _elem293 = iprot.readString(); + self.success.append(_elem293) iprot.readListEnd() else: iprot.skip(ftype) @@ -8170,8 +8393,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 iter294 in self.success: + oprot.writeString(iter294) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: @@ -8240,10 +8463,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) + (_etype298, _size295) = iprot.readListBegin() + for _i299 in xrange(_size295): + _elem300 = iprot.readString(); + self.part_vals.append(_elem300) iprot.readListEnd() else: iprot.skip(ftype) @@ -8273,8 +8496,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 iter301 in self.part_vals: + oprot.writeString(iter301) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -8326,11 +8549,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) + (_etype305, _size302) = iprot.readListBegin() + for _i306 in xrange(_size302): + _elem307 = Partition() + _elem307.read(iprot) + self.success.append(_elem307) iprot.readListEnd() else: iprot.skip(ftype) @@ -8353,8 +8576,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 iter308 in self.success: + iter308.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8429,10 +8652,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) + (_etype312, _size309) = iprot.readListBegin() + for _i313 in xrange(_size309): + _elem314 = iprot.readString(); + self.part_vals.append(_elem314) iprot.readListEnd() else: iprot.skip(ftype) @@ -8449,10 +8672,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) + (_etype318, _size315) = iprot.readListBegin() + for _i319 in xrange(_size315): + _elem320 = iprot.readString(); + self.group_names.append(_elem320) iprot.readListEnd() else: iprot.skip(ftype) @@ -8477,8 +8700,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 iter321 in self.part_vals: + oprot.writeString(iter321) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -8492,8 +8715,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 iter322 in self.group_names: + oprot.writeString(iter322) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8544,11 +8767,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) + (_etype326, _size323) = iprot.readListBegin() + for _i327 in xrange(_size323): + _elem328 = Partition() + _elem328.read(iprot) + self.success.append(_elem328) iprot.readListEnd() else: iprot.skip(ftype) @@ -8577,8 +8800,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 iter329 in self.success: + iter329.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8651,10 +8874,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) + (_etype333, _size330) = iprot.readListBegin() + for _i334 in xrange(_size330): + _elem335 = iprot.readString(); + self.part_vals.append(_elem335) iprot.readListEnd() else: iprot.skip(ftype) @@ -8684,8 +8907,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 iter336 in self.part_vals: + oprot.writeString(iter336) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -8737,10 +8960,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) + (_etype340, _size337) = iprot.readListBegin() + for _i341 in xrange(_size337): + _elem342 = iprot.readString(); + self.success.append(_elem342) iprot.readListEnd() else: iprot.skip(ftype) @@ -8763,8 +8986,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 iter343 in self.success: + oprot.writeString(iter343) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8914,11 +9137,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) + (_etype347, _size344) = iprot.readListBegin() + for _i348 in xrange(_size344): + _elem349 = Partition() + _elem349.read(iprot) + self.success.append(_elem349) iprot.readListEnd() else: iprot.skip(ftype) @@ -8947,8 +9170,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 iter350 in self.success: + iter350.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -9362,10 +9585,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) + (_etype354, _size351) = iprot.readListBegin() + for _i355 in xrange(_size351): + _elem356 = iprot.readString(); + self.success.append(_elem356) iprot.readListEnd() else: iprot.skip(ftype) @@ -9388,8 +9611,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 iter357 in self.success: + oprot.writeString(iter357) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -9500,11 +9723,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 + (_ktype359, _vtype360, _size358 ) = iprot.readMapBegin() + for _i362 in xrange(_size358): + _key363 = iprot.readString(); + _val364 = iprot.readString(); + self.success[_key363] = _val364 iprot.readMapEnd() else: iprot.skip(ftype) @@ -9527,9 +9750,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 kiter365,viter366 in self.success.items(): + oprot.writeString(kiter365) + oprot.writeString(viter366) oprot.writeMapEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -10354,11 +10577,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) + (_etype370, _size367) = iprot.readListBegin() + for _i371 in xrange(_size367): + _elem372 = Index() + _elem372.read(iprot) + self.success.append(_elem372) iprot.readListEnd() else: iprot.skip(ftype) @@ -10387,8 +10610,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 iter373 in self.success: + iter373.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -10527,10 +10750,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) + (_etype377, _size374) = iprot.readListBegin() + for _i378 in xrange(_size374): + _elem379 = iprot.readString(); + self.success.append(_elem379) iprot.readListEnd() else: iprot.skip(ftype) @@ -10553,8 +10776,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 iter380 in self.success: + oprot.writeString(iter380) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: @@ -10908,10 +11131,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) + (_etype384, _size381) = iprot.readListBegin() + for _i385 in xrange(_size381): + _elem386 = iprot.readString(); + self.success.append(_elem386) iprot.readListEnd() else: iprot.skip(ftype) @@ -10934,8 +11157,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 iter387 in self.success: + oprot.writeString(iter387) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -11402,11 +11625,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) + (_etype391, _size388) = iprot.readListBegin() + for _i392 in xrange(_size388): + _elem393 = Role() + _elem393.read(iprot) + self.success.append(_elem393) iprot.readListEnd() else: iprot.skip(ftype) @@ -11429,8 +11652,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 iter394 in self.success: + iter394.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -11497,10 +11720,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) + (_etype398, _size395) = iprot.readListBegin() + for _i399 in xrange(_size395): + _elem400 = iprot.readString(); + self.group_names.append(_elem400) iprot.readListEnd() else: iprot.skip(ftype) @@ -11525,8 +11748,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 iter401 in self.group_names: + oprot.writeString(iter401) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11730,11 +11953,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) + (_etype405, _size402) = iprot.readListBegin() + for _i406 in xrange(_size402): + _elem407 = HiveObjectPrivilege() + _elem407.read(iprot) + self.success.append(_elem407) iprot.readListEnd() else: iprot.skip(ftype) @@ -11757,8 +11980,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 iter408 in self.success: + iter408.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 1068698) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -37,6 +37,7 @@ 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_tables_by_owner(string owner, i64 offset, i32 limit)' 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 +225,12 @@ sys.exit(1) pp.pprint(client.get_all_tables(args[0],)) +elif cmd == 'get_tables_by_owner': + if len(args) != 3: + print 'get_tables_by_owner requires 3 args' + sys.exit(1) + pp.pprint(client.get_tables_by_owner(args[0],eval(args[1]),eval(args[2]),)) + 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 1068698) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (working copy) @@ -3430,6 +3430,244 @@ return xfer; } +uint32_t ThriftHiveMetastore_get_tables_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; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->offset); + this->__isset.offset = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->limit); + this->__isset.limit = 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_owner_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_owner_args"); + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->owner); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("offset", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->offset); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("limit", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->limit); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_owner_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_owner_pargs"); + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->owner))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("offset", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->offset))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("limit", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((*(this->limit))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_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 += this->success[_i240].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_owner_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_owner_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 _iter241; + for (_iter241 = this->success.begin(); _iter241 != this->success.end(); ++_iter241) + { + xfer += (*_iter241).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_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 += (*(this->success))[_i246].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 +4344,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 _size247; + ::apache::thrift::protocol::TType _etype250; + iprot->readListBegin(_etype250, _size247); + this->part_vals.resize(_size247); + uint32_t _i251; + for (_i251 = 0; _i251 < _size247; ++_i251) { - xfer += iprot->readString(this->part_vals[_i240]); + xfer += iprot->readString(this->part_vals[_i251]); } iprot->readListEnd(); } @@ -4146,10 +4384,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 _iter252; + for (_iter252 = this->part_vals.begin(); _iter252 != this->part_vals.end(); ++_iter252) { - xfer += oprot->writeString((*_iter241)); + xfer += oprot->writeString((*_iter252)); } xfer += oprot->writeListEnd(); } @@ -4171,10 +4409,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 _iter253; + for (_iter253 = (*(this->part_vals)).begin(); _iter253 != (*(this->part_vals)).end(); ++_iter253) { - xfer += oprot->writeString((*_iter242)); + xfer += oprot->writeString((*_iter253)); } xfer += oprot->writeListEnd(); } @@ -4626,14 +4864,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 _size254; + ::apache::thrift::protocol::TType _etype257; + iprot->readListBegin(_etype257, _size254); + this->part_vals.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) { - xfer += iprot->readString(this->part_vals[_i247]); + xfer += iprot->readString(this->part_vals[_i258]); } iprot->readListEnd(); } @@ -4674,10 +4912,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 _iter259; + for (_iter259 = this->part_vals.begin(); _iter259 != this->part_vals.end(); ++_iter259) { - xfer += oprot->writeString((*_iter248)); + xfer += oprot->writeString((*_iter259)); } xfer += oprot->writeListEnd(); } @@ -4702,10 +4940,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 _iter260; + for (_iter260 = (*(this->part_vals)).begin(); _iter260 != (*(this->part_vals)).end(); ++_iter260) { - xfer += oprot->writeString((*_iter249)); + xfer += oprot->writeString((*_iter260)); } xfer += oprot->writeListEnd(); } @@ -5134,14 +5372,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 _size261; + ::apache::thrift::protocol::TType _etype264; + iprot->readListBegin(_etype264, _size261); + this->part_vals.resize(_size261); + uint32_t _i265; + for (_i265 = 0; _i265 < _size261; ++_i265) { - xfer += iprot->readString(this->part_vals[_i254]); + xfer += iprot->readString(this->part_vals[_i265]); } iprot->readListEnd(); } @@ -5174,10 +5412,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 _iter266; + for (_iter266 = this->part_vals.begin(); _iter266 != this->part_vals.end(); ++_iter266) { - xfer += oprot->writeString((*_iter255)); + xfer += oprot->writeString((*_iter266)); } xfer += oprot->writeListEnd(); } @@ -5199,10 +5437,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 _iter267; + for (_iter267 = (*(this->part_vals)).begin(); _iter267 != (*(this->part_vals)).end(); ++_iter267) { - xfer += oprot->writeString((*_iter256)); + xfer += oprot->writeString((*_iter267)); } xfer += oprot->writeListEnd(); } @@ -5388,14 +5626,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 _size268; + ::apache::thrift::protocol::TType _etype271; + iprot->readListBegin(_etype271, _size268); + this->part_vals.resize(_size268); + uint32_t _i272; + for (_i272 = 0; _i272 < _size268; ++_i272) { - xfer += iprot->readString(this->part_vals[_i261]); + xfer += iprot->readString(this->part_vals[_i272]); } iprot->readListEnd(); } @@ -5416,14 +5654,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 _size273; + ::apache::thrift::protocol::TType _etype276; + iprot->readListBegin(_etype276, _size273); + this->group_names.resize(_size273); + uint32_t _i277; + for (_i277 = 0; _i277 < _size273; ++_i277) { - xfer += iprot->readString(this->group_names[_i266]); + xfer += iprot->readString(this->group_names[_i277]); } iprot->readListEnd(); } @@ -5456,10 +5694,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 _iter278; + for (_iter278 = this->part_vals.begin(); _iter278 != this->part_vals.end(); ++_iter278) { - xfer += oprot->writeString((*_iter267)); + xfer += oprot->writeString((*_iter278)); } xfer += oprot->writeListEnd(); } @@ -5470,10 +5708,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 _iter279; + for (_iter279 = this->group_names.begin(); _iter279 != this->group_names.end(); ++_iter279) { - xfer += oprot->writeString((*_iter268)); + xfer += oprot->writeString((*_iter279)); } xfer += oprot->writeListEnd(); } @@ -5495,10 +5733,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 _iter280; + for (_iter280 = (*(this->part_vals)).begin(); _iter280 != (*(this->part_vals)).end(); ++_iter280) { - xfer += oprot->writeString((*_iter269)); + xfer += oprot->writeString((*_iter280)); } xfer += oprot->writeListEnd(); } @@ -5509,10 +5747,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 _iter281; + for (_iter281 = (*(this->group_names)).begin(); _iter281 != (*(this->group_names)).end(); ++_iter281) { - xfer += oprot->writeString((*_iter270)); + xfer += oprot->writeString((*_iter281)); } xfer += oprot->writeListEnd(); } @@ -5998,14 +6236,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 _size282; + ::apache::thrift::protocol::TType _etype285; + iprot->readListBegin(_etype285, _size282); + this->success.resize(_size282); + uint32_t _i286; + for (_i286 = 0; _i286 < _size282; ++_i286) { - xfer += this->success[_i275].read(iprot); + xfer += this->success[_i286].read(iprot); } iprot->readListEnd(); } @@ -6052,10 +6290,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 _iter287; + for (_iter287 = this->success.begin(); _iter287 != this->success.end(); ++_iter287) { - xfer += (*_iter276).write(oprot); + xfer += (*_iter287).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6098,14 +6336,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 _size288; + ::apache::thrift::protocol::TType _etype291; + iprot->readListBegin(_etype291, _size288); + (*(this->success)).resize(_size288); + uint32_t _i292; + for (_i292 = 0; _i292 < _size288; ++_i292) { - xfer += (*(this->success))[_i281].read(iprot); + xfer += (*(this->success))[_i292].read(iprot); } iprot->readListEnd(); } @@ -6198,14 +6436,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 _size293; + ::apache::thrift::protocol::TType _etype296; + iprot->readListBegin(_etype296, _size293); + this->group_names.resize(_size293); + uint32_t _i297; + for (_i297 = 0; _i297 < _size293; ++_i297) { - xfer += iprot->readString(this->group_names[_i286]); + xfer += iprot->readString(this->group_names[_i297]); } iprot->readListEnd(); } @@ -6244,10 +6482,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 _iter298; + for (_iter298 = this->group_names.begin(); _iter298 != this->group_names.end(); ++_iter298) { - xfer += oprot->writeString((*_iter287)); + xfer += oprot->writeString((*_iter298)); } xfer += oprot->writeListEnd(); } @@ -6275,10 +6513,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 _iter299; + for (_iter299 = (*(this->group_names)).begin(); _iter299 != (*(this->group_names)).end(); ++_iter299) { - xfer += oprot->writeString((*_iter288)); + xfer += oprot->writeString((*_iter299)); } xfer += oprot->writeListEnd(); } @@ -6312,14 +6550,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 _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[_i293].read(iprot); + xfer += this->success[_i304].read(iprot); } iprot->readListEnd(); } @@ -6366,10 +6604,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 _iter305; + for (_iter305 = this->success.begin(); _iter305 != this->success.end(); ++_iter305) { - xfer += (*_iter294).write(oprot); + xfer += (*_iter305).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6412,14 +6650,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 _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))[_i299].read(iprot); + xfer += (*(this->success))[_i310].read(iprot); } iprot->readListEnd(); } @@ -6570,14 +6808,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 _size311; + ::apache::thrift::protocol::TType _etype314; + iprot->readListBegin(_etype314, _size311); + this->success.resize(_size311); + uint32_t _i315; + for (_i315 = 0; _i315 < _size311; ++_i315) { - xfer += iprot->readString(this->success[_i304]); + xfer += iprot->readString(this->success[_i315]); } iprot->readListEnd(); } @@ -6616,10 +6854,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 _iter316; + for (_iter316 = this->success.begin(); _iter316 != this->success.end(); ++_iter316) { - xfer += oprot->writeString((*_iter305)); + xfer += oprot->writeString((*_iter316)); } xfer += oprot->writeListEnd(); } @@ -6658,14 +6896,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 _size317; + ::apache::thrift::protocol::TType _etype320; + iprot->readListBegin(_etype320, _size317); + (*(this->success)).resize(_size317); + uint32_t _i321; + for (_i321 = 0; _i321 < _size317; ++_i321) { - xfer += iprot->readString((*(this->success))[_i310]); + xfer += iprot->readString((*(this->success))[_i321]); } iprot->readListEnd(); } @@ -6734,14 +6972,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 _size322; + ::apache::thrift::protocol::TType _etype325; + iprot->readListBegin(_etype325, _size322); + this->part_vals.resize(_size322); + uint32_t _i326; + for (_i326 = 0; _i326 < _size322; ++_i326) { - xfer += iprot->readString(this->part_vals[_i315]); + xfer += iprot->readString(this->part_vals[_i326]); } iprot->readListEnd(); } @@ -6782,10 +7020,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 _iter327; + for (_iter327 = this->part_vals.begin(); _iter327 != this->part_vals.end(); ++_iter327) { - xfer += oprot->writeString((*_iter316)); + xfer += oprot->writeString((*_iter327)); } xfer += oprot->writeListEnd(); } @@ -6810,10 +7048,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 _iter328; + for (_iter328 = (*(this->part_vals)).begin(); _iter328 != (*(this->part_vals)).end(); ++_iter328) { - xfer += oprot->writeString((*_iter317)); + xfer += oprot->writeString((*_iter328)); } xfer += oprot->writeListEnd(); } @@ -6850,14 +7088,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 _size329; + ::apache::thrift::protocol::TType _etype332; + iprot->readListBegin(_etype332, _size329); + this->success.resize(_size329); + uint32_t _i333; + for (_i333 = 0; _i333 < _size329; ++_i333) { - xfer += this->success[_i322].read(iprot); + xfer += this->success[_i333].read(iprot); } iprot->readListEnd(); } @@ -6896,10 +7134,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 _iter334; + for (_iter334 = this->success.begin(); _iter334 != this->success.end(); ++_iter334) { - xfer += (*_iter323).write(oprot); + xfer += (*_iter334).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6938,14 +7176,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 _size335; + ::apache::thrift::protocol::TType _etype338; + iprot->readListBegin(_etype338, _size335); + (*(this->success)).resize(_size335); + uint32_t _i339; + for (_i339 = 0; _i339 < _size335; ++_i339) { - xfer += (*(this->success))[_i328].read(iprot); + xfer += (*(this->success))[_i339].read(iprot); } iprot->readListEnd(); } @@ -7014,14 +7252,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 _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[_i333]); + xfer += iprot->readString(this->part_vals[_i344]); } iprot->readListEnd(); } @@ -7050,14 +7288,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 _size345; + ::apache::thrift::protocol::TType _etype348; + iprot->readListBegin(_etype348, _size345); + this->group_names.resize(_size345); + uint32_t _i349; + for (_i349 = 0; _i349 < _size345; ++_i349) { - xfer += iprot->readString(this->group_names[_i338]); + xfer += iprot->readString(this->group_names[_i349]); } iprot->readListEnd(); } @@ -7090,10 +7328,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 _iter350; + for (_iter350 = this->part_vals.begin(); _iter350 != this->part_vals.end(); ++_iter350) { - xfer += oprot->writeString((*_iter339)); + xfer += oprot->writeString((*_iter350)); } xfer += oprot->writeListEnd(); } @@ -7107,10 +7345,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 _iter351; + for (_iter351 = this->group_names.begin(); _iter351 != this->group_names.end(); ++_iter351) { - xfer += oprot->writeString((*_iter340)); + xfer += oprot->writeString((*_iter351)); } xfer += oprot->writeListEnd(); } @@ -7132,10 +7370,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 _iter352; + for (_iter352 = (*(this->part_vals)).begin(); _iter352 != (*(this->part_vals)).end(); ++_iter352) { - xfer += oprot->writeString((*_iter341)); + xfer += oprot->writeString((*_iter352)); } xfer += oprot->writeListEnd(); } @@ -7149,10 +7387,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 _iter353; + for (_iter353 = (*(this->group_names)).begin(); _iter353 != (*(this->group_names)).end(); ++_iter353) { - xfer += oprot->writeString((*_iter342)); + xfer += oprot->writeString((*_iter353)); } xfer += oprot->writeListEnd(); } @@ -7186,14 +7424,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 _size354; + ::apache::thrift::protocol::TType _etype357; + iprot->readListBegin(_etype357, _size354); + this->success.resize(_size354); + uint32_t _i358; + for (_i358 = 0; _i358 < _size354; ++_i358) { - xfer += this->success[_i347].read(iprot); + xfer += this->success[_i358].read(iprot); } iprot->readListEnd(); } @@ -7240,10 +7478,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 _iter359; + for (_iter359 = this->success.begin(); _iter359 != this->success.end(); ++_iter359) { - xfer += (*_iter348).write(oprot); + xfer += (*_iter359).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7286,14 +7524,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 _size360; + ::apache::thrift::protocol::TType _etype363; + iprot->readListBegin(_etype363, _size360); + (*(this->success)).resize(_size360); + uint32_t _i364; + for (_i364 = 0; _i364 < _size360; ++_i364) { - xfer += (*(this->success))[_i353].read(iprot); + xfer += (*(this->success))[_i364].read(iprot); } iprot->readListEnd(); } @@ -7370,14 +7608,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 _size365; + ::apache::thrift::protocol::TType _etype368; + iprot->readListBegin(_etype368, _size365); + this->part_vals.resize(_size365); + uint32_t _i369; + for (_i369 = 0; _i369 < _size365; ++_i369) { - xfer += iprot->readString(this->part_vals[_i358]); + xfer += iprot->readString(this->part_vals[_i369]); } iprot->readListEnd(); } @@ -7418,10 +7656,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 _iter370; + for (_iter370 = this->part_vals.begin(); _iter370 != this->part_vals.end(); ++_iter370) { - xfer += oprot->writeString((*_iter359)); + xfer += oprot->writeString((*_iter370)); } xfer += oprot->writeListEnd(); } @@ -7446,10 +7684,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 _iter371; + for (_iter371 = (*(this->part_vals)).begin(); _iter371 != (*(this->part_vals)).end(); ++_iter371) { - xfer += oprot->writeString((*_iter360)); + xfer += oprot->writeString((*_iter371)); } xfer += oprot->writeListEnd(); } @@ -7486,14 +7724,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 _size372; + ::apache::thrift::protocol::TType _etype375; + iprot->readListBegin(_etype375, _size372); + this->success.resize(_size372); + uint32_t _i376; + for (_i376 = 0; _i376 < _size372; ++_i376) { - xfer += iprot->readString(this->success[_i365]); + xfer += iprot->readString(this->success[_i376]); } iprot->readListEnd(); } @@ -7532,10 +7770,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 _iter377; + for (_iter377 = this->success.begin(); _iter377 != this->success.end(); ++_iter377) { - xfer += oprot->writeString((*_iter366)); + xfer += oprot->writeString((*_iter377)); } xfer += oprot->writeListEnd(); } @@ -7574,14 +7812,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 _size378; + ::apache::thrift::protocol::TType _etype381; + iprot->readListBegin(_etype381, _size378); + (*(this->success)).resize(_size378); + uint32_t _i382; + for (_i382 = 0; _i382 < _size378; ++_i382) { - xfer += iprot->readString((*(this->success))[_i371]); + xfer += iprot->readString((*(this->success))[_i382]); } iprot->readListEnd(); } @@ -7738,14 +7976,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 _size383; + ::apache::thrift::protocol::TType _etype386; + iprot->readListBegin(_etype386, _size383); + this->success.resize(_size383); + uint32_t _i387; + for (_i387 = 0; _i387 < _size383; ++_i387) { - xfer += this->success[_i376].read(iprot); + xfer += this->success[_i387].read(iprot); } iprot->readListEnd(); } @@ -7792,10 +8030,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 _iter388; + for (_iter388 = this->success.begin(); _iter388 != this->success.end(); ++_iter388) { - xfer += (*_iter377).write(oprot); + xfer += (*_iter388).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7838,14 +8076,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 _size389; + ::apache::thrift::protocol::TType _etype392; + iprot->readListBegin(_etype392, _size389); + (*(this->success)).resize(_size389); + uint32_t _i393; + for (_i393 = 0; _i393 < _size389; ++_i393) { - xfer += (*(this->success))[_i382].read(iprot); + xfer += (*(this->success))[_i393].read(iprot); } iprot->readListEnd(); } @@ -8366,14 +8604,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 _size394; + ::apache::thrift::protocol::TType _etype397; + iprot->readListBegin(_etype397, _size394); + this->success.resize(_size394); + uint32_t _i398; + for (_i398 = 0; _i398 < _size394; ++_i398) { - xfer += iprot->readString(this->success[_i387]); + xfer += iprot->readString(this->success[_i398]); } iprot->readListEnd(); } @@ -8412,10 +8650,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 _iter399; + for (_iter399 = this->success.begin(); _iter399 != this->success.end(); ++_iter399) { - xfer += oprot->writeString((*_iter388)); + xfer += oprot->writeString((*_iter399)); } xfer += oprot->writeListEnd(); } @@ -8454,14 +8692,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 _size400; + ::apache::thrift::protocol::TType _etype403; + iprot->readListBegin(_etype403, _size400); + (*(this->success)).resize(_size400); + uint32_t _i404; + for (_i404 = 0; _i404 < _size400; ++_i404) { - xfer += iprot->readString((*(this->success))[_i393]); + xfer += iprot->readString((*(this->success))[_i404]); } iprot->readListEnd(); } @@ -8576,17 +8814,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 _size405; + ::apache::thrift::protocol::TType _ktype406; + ::apache::thrift::protocol::TType _vtype407; + iprot->readMapBegin(_ktype406, _vtype407, _size405); + uint32_t _i409; + for (_i409 = 0; _i409 < _size405; ++_i409) { - std::string _key399; - xfer += iprot->readString(_key399); - std::string& _val400 = this->success[_key399]; - xfer += iprot->readString(_val400); + std::string _key410; + xfer += iprot->readString(_key410); + std::string& _val411 = this->success[_key410]; + xfer += iprot->readString(_val411); } iprot->readMapEnd(); } @@ -8625,11 +8863,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 _iter412; + for (_iter412 = this->success.begin(); _iter412 != this->success.end(); ++_iter412) { - xfer += oprot->writeString(_iter401->first); - xfer += oprot->writeString(_iter401->second); + xfer += oprot->writeString(_iter412->first); + xfer += oprot->writeString(_iter412->second); } xfer += oprot->writeMapEnd(); } @@ -8668,17 +8906,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 _size413; + ::apache::thrift::protocol::TType _ktype414; + ::apache::thrift::protocol::TType _vtype415; + iprot->readMapBegin(_ktype414, _vtype415, _size413); + uint32_t _i417; + for (_i417 = 0; _i417 < _size413; ++_i417) { - std::string _key407; - xfer += iprot->readString(_key407); - std::string& _val408 = (*(this->success))[_key407]; - xfer += iprot->readString(_val408); + std::string _key418; + xfer += iprot->readString(_key418); + std::string& _val419 = (*(this->success))[_key418]; + xfer += iprot->readString(_val419); } iprot->readMapEnd(); } @@ -9739,14 +9977,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 _size420; + ::apache::thrift::protocol::TType _etype423; + iprot->readListBegin(_etype423, _size420); + this->success.resize(_size420); + uint32_t _i424; + for (_i424 = 0; _i424 < _size420; ++_i424) { - xfer += this->success[_i413].read(iprot); + xfer += this->success[_i424].read(iprot); } iprot->readListEnd(); } @@ -9793,10 +10031,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 _iter425; + for (_iter425 = this->success.begin(); _iter425 != this->success.end(); ++_iter425) { - xfer += (*_iter414).write(oprot); + xfer += (*_iter425).write(oprot); } xfer += oprot->writeListEnd(); } @@ -9839,14 +10077,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 _size426; + ::apache::thrift::protocol::TType _etype429; + iprot->readListBegin(_etype429, _size426); + (*(this->success)).resize(_size426); + uint32_t _i430; + for (_i430 = 0; _i430 < _size426; ++_i430) { - xfer += (*(this->success))[_i419].read(iprot); + xfer += (*(this->success))[_i430].read(iprot); } iprot->readListEnd(); } @@ -9997,14 +10235,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 _size431; + ::apache::thrift::protocol::TType _etype434; + iprot->readListBegin(_etype434, _size431); + this->success.resize(_size431); + uint32_t _i435; + for (_i435 = 0; _i435 < _size431; ++_i435) { - xfer += iprot->readString(this->success[_i424]); + xfer += iprot->readString(this->success[_i435]); } iprot->readListEnd(); } @@ -10043,10 +10281,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 _iter436; + for (_iter436 = this->success.begin(); _iter436 != this->success.end(); ++_iter436) { - xfer += oprot->writeString((*_iter425)); + xfer += oprot->writeString((*_iter436)); } xfer += oprot->writeListEnd(); } @@ -10085,14 +10323,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 _size437; + ::apache::thrift::protocol::TType _etype440; + iprot->readListBegin(_etype440, _size437); + (*(this->success)).resize(_size437); + uint32_t _i441; + for (_i441 = 0; _i441 < _size437; ++_i441) { - xfer += iprot->readString((*(this->success))[_i430]); + xfer += iprot->readString((*(this->success))[_i441]); } iprot->readListEnd(); } @@ -10549,14 +10787,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 _size442; + ::apache::thrift::protocol::TType _etype445; + iprot->readListBegin(_etype445, _size442); + this->success.resize(_size442); + uint32_t _i446; + for (_i446 = 0; _i446 < _size442; ++_i446) { - xfer += iprot->readString(this->success[_i435]); + xfer += iprot->readString(this->success[_i446]); } iprot->readListEnd(); } @@ -10595,10 +10833,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 _iter447; + for (_iter447 = this->success.begin(); _iter447 != this->success.end(); ++_iter447) { - xfer += oprot->writeString((*_iter436)); + xfer += oprot->writeString((*_iter447)); } xfer += oprot->writeListEnd(); } @@ -10637,14 +10875,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 _size448; + ::apache::thrift::protocol::TType _etype451; + iprot->readListBegin(_etype451, _size448); + (*(this->success)).resize(_size448); + uint32_t _i452; + for (_i452 = 0; _i452 < _size448; ++_i452) { - xfer += iprot->readString((*(this->success))[_i441]); + xfer += iprot->readString((*(this->success))[_i452]); } iprot->readListEnd(); } @@ -10711,9 +10949,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 ecast453; + xfer += iprot->readI32(ecast453); + this->principal_type = (PrincipalType::type)ecast453; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -10729,9 +10967,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 ecast454; + xfer += iprot->readI32(ecast454); + this->grantorType = (PrincipalType::type)ecast454; this->__isset.grantorType = true; } else { xfer += iprot->skip(ftype); @@ -10963,9 +11201,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 ecast455; + xfer += iprot->readI32(ecast455); + this->principal_type = (PrincipalType::type)ecast455; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -11163,9 +11401,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 ecast456; + xfer += iprot->readI32(ecast456); + this->principal_type = (PrincipalType::type)ecast456; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -11235,14 +11473,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 _size457; + ::apache::thrift::protocol::TType _etype460; + iprot->readListBegin(_etype460, _size457); + this->success.resize(_size457); + uint32_t _i461; + for (_i461 = 0; _i461 < _size457; ++_i461) { - xfer += this->success[_i450].read(iprot); + xfer += this->success[_i461].read(iprot); } iprot->readListEnd(); } @@ -11281,10 +11519,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 _iter462; + for (_iter462 = this->success.begin(); _iter462 != this->success.end(); ++_iter462) { - xfer += (*_iter451).write(oprot); + xfer += (*_iter462).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11323,14 +11561,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 _size463; + ::apache::thrift::protocol::TType _etype466; + iprot->readListBegin(_etype466, _size463); + (*(this->success)).resize(_size463); + uint32_t _i467; + for (_i467 = 0; _i467 < _size463; ++_i467) { - xfer += (*(this->success))[_i456].read(iprot); + xfer += (*(this->success))[_i467].read(iprot); } iprot->readListEnd(); } @@ -11399,14 +11637,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 _size468; + ::apache::thrift::protocol::TType _etype471; + iprot->readListBegin(_etype471, _size468); + this->group_names.resize(_size468); + uint32_t _i472; + for (_i472 = 0; _i472 < _size468; ++_i472) { - xfer += iprot->readString(this->group_names[_i461]); + xfer += iprot->readString(this->group_names[_i472]); } iprot->readListEnd(); } @@ -11439,10 +11677,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 _iter473; + for (_iter473 = this->group_names.begin(); _iter473 != this->group_names.end(); ++_iter473) { - xfer += oprot->writeString((*_iter462)); + xfer += oprot->writeString((*_iter473)); } xfer += oprot->writeListEnd(); } @@ -11464,10 +11702,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 _iter474; + for (_iter474 = (*(this->group_names)).begin(); _iter474 != (*(this->group_names)).end(); ++_iter474) { - xfer += oprot->writeString((*_iter463)); + xfer += oprot->writeString((*_iter474)); } xfer += oprot->writeListEnd(); } @@ -11623,9 +11861,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 ecast475; + xfer += iprot->readI32(ecast475); + this->principal_type = (PrincipalType::type)ecast475; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -11709,14 +11947,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 _size476; + ::apache::thrift::protocol::TType _etype479; + iprot->readListBegin(_etype479, _size476); + this->success.resize(_size476); + uint32_t _i480; + for (_i480 = 0; _i480 < _size476; ++_i480) { - xfer += this->success[_i469].read(iprot); + xfer += this->success[_i480].read(iprot); } iprot->readListEnd(); } @@ -11755,10 +11993,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 _iter481; + for (_iter481 = this->success.begin(); _iter481 != this->success.end(); ++_iter481) { - xfer += (*_iter470).write(oprot); + xfer += (*_iter481).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11797,14 +12035,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 _size482; + ::apache::thrift::protocol::TType _etype485; + iprot->readListBegin(_etype485, _size482); + (*(this->success)).resize(_size482); + uint32_t _i486; + for (_i486 = 0; _i486 < _size482; ++_i486) { - xfer += (*(this->success))[_i475].read(iprot); + xfer += (*(this->success))[_i486].read(iprot); } iprot->readListEnd(); } @@ -13938,6 +14176,71 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); } +void ThriftHiveMetastoreClient::get_tables_by_owner(std::vector
& _return, const std::string& owner, const int64_t offset, const int32_t limit) +{ + send_get_tables_by_owner(owner, offset, limit); + recv_get_tables_by_owner(_return); +} + +void ThriftHiveMetastoreClient::send_get_tables_by_owner(const std::string& owner, const int64_t offset, const int32_t limit) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_tables_by_owner", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_by_owner_pargs args; + args.owner = &owner; + args.offset = &offset; + args.limit = &limit; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_tables_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_tables_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_tables_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_tables_by_owner 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 +17528,37 @@ oprot->getTransport()->writeEnd(); } +void ThriftHiveMetastoreProcessor::process_get_tables_by_owner(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_tables_by_owner_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_tables_by_owner_result result; + try { + iface_->get_tables_by_owner(result.success, args.owner, args.offset, args.limit); + 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_owner", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_tables_by_owner", ::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 1068698) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -31,6 +31,7 @@ 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_tables_by_owner(std::vector
& _return, const std::string& owner, const int64_t offset, const int32_t limit) = 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 +128,9 @@ void get_all_tables(std::vector & /* _return */, const std::string& /* db_name */) { return; } + void get_tables_by_owner(std::vector
& /* _return */, const std::string& /* owner */, const int64_t /* offset */, const int32_t /* limit */) { + return; + } void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) { return; } @@ -2061,6 +2065,122 @@ }; +typedef struct _ThriftHiveMetastore_get_tables_by_owner_args__isset { + _ThriftHiveMetastore_get_tables_by_owner_args__isset() : owner(false), offset(false), limit(false) {} + bool owner; + bool offset; + bool limit; +} _ThriftHiveMetastore_get_tables_by_owner_args__isset; + +class ThriftHiveMetastore_get_tables_by_owner_args { + public: + + ThriftHiveMetastore_get_tables_by_owner_args() : owner(""), offset(0), limit(0) { + } + + virtual ~ThriftHiveMetastore_get_tables_by_owner_args() throw() {} + + std::string owner; + int64_t offset; + int32_t limit; + + _ThriftHiveMetastore_get_tables_by_owner_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_tables_by_owner_args & rhs) const + { + if (!(owner == rhs.owner)) + return false; + if (!(offset == rhs.offset)) + return false; + if (!(limit == rhs.limit)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_by_owner_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_by_owner_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_tables_by_owner_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_tables_by_owner_pargs() throw() {} + + const std::string* owner; + const int64_t* offset; + const int32_t* limit; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_tables_by_owner_result__isset { + _ThriftHiveMetastore_get_tables_by_owner_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_tables_by_owner_result__isset; + +class ThriftHiveMetastore_get_tables_by_owner_result { + public: + + ThriftHiveMetastore_get_tables_by_owner_result() { + } + + virtual ~ThriftHiveMetastore_get_tables_by_owner_result() throw() {} + + std::vector
success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_by_owner_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_tables_by_owner_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_by_owner_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_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_tables_by_owner_presult__isset { + _ThriftHiveMetastore_get_tables_by_owner_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_tables_by_owner_presult__isset; + +class ThriftHiveMetastore_get_tables_by_owner_presult { + public: + + + virtual ~ThriftHiveMetastore_get_tables_by_owner_presult() throw() {} + + std::vector
* success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_by_owner_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 +7057,9 @@ 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_tables_by_owner(std::vector
& _return, const std::string& owner, const int64_t offset, const int32_t limit); + void send_get_tables_by_owner(const std::string& owner, const int64_t offset, const int32_t limit); + void recv_get_tables_by_owner(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 +7207,7 @@ 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_tables_by_owner(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 +7269,7 @@ 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_tables_by_owner"] = &ThriftHiveMetastoreProcessor::process_get_tables_by_owner; processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table; processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table; processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition; @@ -7374,6 +7499,18 @@ } } + void get_tables_by_owner(std::vector
& _return, const std::string& owner, const int64_t offset, const int32_t limit) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_tables_by_owner(_return, owner, offset, limit); + return; + } else { + ifaces_[i]->get_tables_by_owner(_return, owner, offset, limit); + } + } + } + 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 1068698) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -102,6 +102,11 @@ printf("get_all_tables\n"); } + void get_tables_by_owner(std::vector
& _return, const std::string& owner, const int64_t offset, const int32_t limit) { + // Your implementation goes here + printf("get_tables_by_owner\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 1068698) +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (working copy) @@ -281,6 +281,22 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_tables failed: unknown result') end + def get_tables_by_owner(owner, offset, limit) + send_get_tables_by_owner(owner, offset, limit) + return recv_get_tables_by_owner() + end + + def send_get_tables_by_owner(owner, offset, limit) + send_message('get_tables_by_owner', Get_tables_by_owner_args, :owner => owner, :offset => offset, :limit => limit) + end + + def recv_get_tables_by_owner() + result = receive_message(Get_tables_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_tables_by_owner failed: unknown result') + end + def get_table(dbname, tbl_name) send_get_table(dbname, tbl_name) return recv_get_table() @@ -1174,6 +1190,17 @@ write_result(result, oprot, 'get_all_tables', seqid) end + def process_get_tables_by_owner(seqid, iprot, oprot) + args = read_args(iprot, Get_tables_by_owner_args) + result = Get_tables_by_owner_result.new() + begin + result.success = @handler.get_tables_by_owner(args.owner, args.offset, args.limit) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_tables_by_owner', seqid) + end + def process_get_table(seqid, iprot, oprot) args = read_args(iprot, Get_table_args) result = Get_table_result.new() @@ -2260,6 +2287,44 @@ ::Thrift::Struct.generate_accessors self end + class Get_tables_by_owner_args + include ::Thrift::Struct, ::Thrift::Struct_Union + OWNER = 1 + OFFSET = 2 + LIMIT = 3 + + FIELDS = { + OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'}, + OFFSET => {:type => ::Thrift::Types::I64, :name => 'offset'}, + LIMIT => {:type => ::Thrift::Types::I32, :name => 'limit'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_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::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 1068698) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -65,6 +65,8 @@ public List get_all_tables(String db_name) throws MetaException, TException; + public List
get_tables_by_owner(String owner, long offset, int limit) 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 +185,8 @@ public void get_all_tables(String db_name, AsyncMethodCallback resultHandler) throws TException; + public void get_tables_by_owner(String owner, long offset, int limit, 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 +961,47 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); } + public List
get_tables_by_owner(String owner, long offset, int limit) throws MetaException, TException + { + send_get_tables_by_owner(owner, offset, limit); + return recv_get_tables_by_owner(); + } + + public void send_get_tables_by_owner(String owner, long offset, int limit) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_tables_by_owner", TMessageType.CALL, ++seqid_)); + get_tables_by_owner_args args = new get_tables_by_owner_args(); + args.setOwner(owner); + args.setOffset(offset); + args.setLimit(limit); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List
recv_get_tables_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_tables_by_owner failed: out of sequence response"); + } + get_tables_by_owner_result result = new get_tables_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_tables_by_owner failed: unknown result"); + } + public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException { send_get_table(dbname, tbl_name); @@ -3219,6 +3264,43 @@ } } + public void get_tables_by_owner(String owner, long offset, int limit, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_tables_by_owner_call method_call = new get_tables_by_owner_call(owner, offset, limit, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_tables_by_owner_call extends TAsyncMethodCall { + private String owner; + private long offset; + private int limit; + public get_tables_by_owner_call(String owner, long offset, int limit, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.owner = owner; + this.offset = offset; + this.limit = limit; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_tables_by_owner", TMessageType.CALL, 0)); + get_tables_by_owner_args args = new get_tables_by_owner_args(); + args.setOwner(owner); + args.setOffset(offset); + args.setLimit(limit); + 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_owner(); + } + } + 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 +4809,7 @@ 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_tables_by_owner", new get_tables_by_owner()); processMap_.put("get_table", new get_table()); processMap_.put("alter_table", new alter_table()); processMap_.put("add_partition", new add_partition()); @@ -5436,6 +5519,44 @@ } + private class get_tables_by_owner implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_tables_by_owner_args args = new get_tables_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_tables_by_owner", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_tables_by_owner_result result = new get_tables_by_owner_result(); + try { + result.success = iface_.get_tables_by_owner(args.owner, args.offset, args.limit); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_tables_by_owner", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables_by_owner"); + oprot.writeMessageBegin(new TMessage("get_tables_by_owner", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_tables_by_owner", 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 +19406,856 @@ } + public static class get_tables_by_owner_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_by_owner_args"); + + private static final TField OWNER_FIELD_DESC = new TField("owner", TType.STRING, (short)1); + private static final TField OFFSET_FIELD_DESC = new TField("offset", TType.I64, (short)2); + private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I32, (short)3); + + private String owner; + private long offset; + private int limit; + + /** 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"), + OFFSET((short)2, "offset"), + LIMIT((short)3, "limit"); + + 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; + case 2: // OFFSET + return OFFSET; + case 3: // LIMIT + return LIMIT; + 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 + private static final int __OFFSET_ISSET_ID = 0; + private static final int __LIMIT_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + 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))); + tmpMap.put(_Fields.OFFSET, new FieldMetaData("offset", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + tmpMap.put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_tables_by_owner_args.class, metaDataMap); + } + + public get_tables_by_owner_args() { + } + + public get_tables_by_owner_args( + String owner, + long offset, + int limit) + { + this(); + this.owner = owner; + this.offset = offset; + setOffsetIsSet(true); + this.limit = limit; + setLimitIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_tables_by_owner_args(get_tables_by_owner_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetOwner()) { + this.owner = other.owner; + } + this.offset = other.offset; + this.limit = other.limit; + } + + public get_tables_by_owner_args deepCopy() { + return new get_tables_by_owner_args(this); + } + + @Override + public void clear() { + this.owner = null; + setOffsetIsSet(false); + this.offset = 0; + setLimitIsSet(false); + this.limit = 0; + } + + 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 long getOffset() { + return this.offset; + } + + public void setOffset(long offset) { + this.offset = offset; + setOffsetIsSet(true); + } + + public void unsetOffset() { + __isset_bit_vector.clear(__OFFSET_ISSET_ID); + } + + /** Returns true if field offset is set (has been asigned a value) and false otherwise */ + public boolean isSetOffset() { + return __isset_bit_vector.get(__OFFSET_ISSET_ID); + } + + public void setOffsetIsSet(boolean value) { + __isset_bit_vector.set(__OFFSET_ISSET_ID, value); + } + + public int getLimit() { + return this.limit; + } + + public void setLimit(int limit) { + this.limit = limit; + setLimitIsSet(true); + } + + public void unsetLimit() { + __isset_bit_vector.clear(__LIMIT_ISSET_ID); + } + + /** Returns true if field limit is set (has been asigned a value) and false otherwise */ + public boolean isSetLimit() { + return __isset_bit_vector.get(__LIMIT_ISSET_ID); + } + + public void setLimitIsSet(boolean value) { + __isset_bit_vector.set(__LIMIT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case OWNER: + if (value == null) { + unsetOwner(); + } else { + setOwner((String)value); + } + break; + + case OFFSET: + if (value == null) { + unsetOffset(); + } else { + setOffset((Long)value); + } + break; + + case LIMIT: + if (value == null) { + unsetLimit(); + } else { + setLimit((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case OWNER: + return getOwner(); + + case OFFSET: + return new Long(getOffset()); + + case LIMIT: + return new Integer(getLimit()); + + } + 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(); + case OFFSET: + return isSetOffset(); + case LIMIT: + return isSetLimit(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_by_owner_args) + return this.equals((get_tables_by_owner_args)that); + return false; + } + + public boolean equals(get_tables_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; + } + + boolean this_present_offset = true; + boolean that_present_offset = true; + if (this_present_offset || that_present_offset) { + if (!(this_present_offset && that_present_offset)) + return false; + if (this.offset != that.offset) + return false; + } + + boolean this_present_limit = true; + boolean that_present_limit = true; + if (this_present_limit || that_present_limit) { + if (!(this_present_limit && that_present_limit)) + return false; + if (this.limit != that.limit) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_tables_by_owner_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_by_owner_args typedOther = (get_tables_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; + } + } + lastComparison = Boolean.valueOf(isSetOffset()).compareTo(typedOther.isSetOffset()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOffset()) { + lastComparison = TBaseHelper.compareTo(this.offset, typedOther.offset); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLimit()).compareTo(typedOther.isSetLimit()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLimit()) { + lastComparison = TBaseHelper.compareTo(this.limit, typedOther.limit); + 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; + case 2: // OFFSET + if (field.type == TType.I64) { + this.offset = iprot.readI64(); + setOffsetIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // LIMIT + if (field.type == TType.I32) { + this.limit = iprot.readI32(); + setLimitIsSet(true); + } 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.writeFieldBegin(OFFSET_FIELD_DESC); + oprot.writeI64(this.offset); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LIMIT_FIELD_DESC); + oprot.writeI32(this.limit); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_by_owner_args("); + boolean first = true; + + sb.append("owner:"); + if (this.owner == null) { + sb.append("null"); + } else { + sb.append(this.owner); + } + first = false; + if (!first) sb.append(", "); + sb.append("offset:"); + sb.append(this.offset); + first = false; + if (!first) sb.append(", "); + sb.append("limit:"); + sb.append(this.limit); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_tables_by_owner_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_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 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_owner_result.class, metaDataMap); + } + + public get_tables_by_owner_result() { + } + + public get_tables_by_owner_result( + List
success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_by_owner_result(get_tables_by_owner_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_owner_result deepCopy() { + return new get_tables_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(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_owner_result) + return this.equals((get_tables_by_owner_result)that); + return false; + } + + public boolean equals(get_tables_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_tables_by_owner_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_by_owner_result typedOther = (get_tables_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) + { + Table _elem129; + _elem129 = new Table(); + _elem129.read(iprot); + 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.STRUCT, this.success.size())); + for (Table _iter130 : this.success) + { + _iter130.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_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_table_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_table_args"); @@ -22147,13 +23118,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 _list131 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list131.size); + for (int _i132 = 0; _i132 < _list131.size; ++_i132) { - String _elem129; - _elem129 = iprot.readString(); - this.part_vals.add(_elem129); + String _elem133; + _elem133 = iprot.readString(); + this.part_vals.add(_elem133); } iprot.readListEnd(); } @@ -22188,9 +23159,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 _iter134 : this.part_vals) { - oprot.writeString(_iter130); + oprot.writeString(_iter134); } oprot.writeListEnd(); } @@ -24247,13 +25218,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 _list135 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list135.size); + for (int _i136 = 0; _i136 < _list135.size; ++_i136) { - String _elem133; - _elem133 = iprot.readString(); - this.part_vals.add(_elem133); + String _elem137; + _elem137 = iprot.readString(); + this.part_vals.add(_elem137); } iprot.readListEnd(); } @@ -24296,9 +25267,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 _iter138 : this.part_vals) { - oprot.writeString(_iter134); + oprot.writeString(_iter138); } oprot.writeListEnd(); } @@ -26199,13 +27170,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 _list139 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list139.size); + for (int _i140 = 0; _i140 < _list139.size; ++_i140) { - String _elem137; - _elem137 = iprot.readString(); - this.part_vals.add(_elem137); + String _elem141; + _elem141 = iprot.readString(); + this.part_vals.add(_elem141); } iprot.readListEnd(); } @@ -26240,9 +27211,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 _iter142 : this.part_vals) { - oprot.writeString(_iter138); + oprot.writeString(_iter142); } oprot.writeListEnd(); } @@ -27300,13 +28271,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 _list143 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list143.size); + for (int _i144 = 0; _i144 < _list143.size; ++_i144) { - String _elem141; - _elem141 = iprot.readString(); - this.part_vals.add(_elem141); + String _elem145; + _elem145 = iprot.readString(); + this.part_vals.add(_elem145); } iprot.readListEnd(); } @@ -27324,13 +28295,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 _list146 = iprot.readListBegin(); + this.group_names = new ArrayList(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) { - String _elem144; - _elem144 = iprot.readString(); - this.group_names.add(_elem144); + String _elem148; + _elem148 = iprot.readString(); + this.group_names.add(_elem148); } iprot.readListEnd(); } @@ -27365,9 +28336,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 _iter149 : this.part_vals) { - oprot.writeString(_iter145); + oprot.writeString(_iter149); } oprot.writeListEnd(); } @@ -27382,9 +28353,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 _iter150 : this.group_names) { - oprot.writeString(_iter146); + oprot.writeString(_iter150); } oprot.writeListEnd(); } @@ -29650,14 +30621,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 _list151 = iprot.readListBegin(); + this.success = new ArrayList(_list151.size); + for (int _i152 = 0; _i152 < _list151.size; ++_i152) { - Partition _elem149; - _elem149 = new Partition(); - _elem149.read(iprot); - this.success.add(_elem149); + Partition _elem153; + _elem153 = new Partition(); + _elem153.read(iprot); + this.success.add(_elem153); } iprot.readListEnd(); } @@ -29697,9 +30668,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter150 : this.success) + for (Partition _iter154 : this.success) { - _iter150.write(oprot); + _iter154.write(oprot); } oprot.writeListEnd(); } @@ -30311,13 +31282,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 _list155 = iprot.readListBegin(); + this.group_names = new ArrayList(_list155.size); + for (int _i156 = 0; _i156 < _list155.size; ++_i156) { - String _elem153; - _elem153 = iprot.readString(); - this.group_names.add(_elem153); + String _elem157; + _elem157 = iprot.readString(); + this.group_names.add(_elem157); } iprot.readListEnd(); } @@ -30360,9 +31331,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 _iter158 : this.group_names) { - oprot.writeString(_iter154); + oprot.writeString(_iter158); } oprot.writeListEnd(); } @@ -30808,14 +31779,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 _list159 = iprot.readListBegin(); + this.success = new ArrayList(_list159.size); + for (int _i160 = 0; _i160 < _list159.size; ++_i160) { - Partition _elem157; - _elem157 = new Partition(); - _elem157.read(iprot); - this.success.add(_elem157); + Partition _elem161; + _elem161 = new Partition(); + _elem161.read(iprot); + this.success.add(_elem161); } iprot.readListEnd(); } @@ -30855,9 +31826,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter158 : this.success) + for (Partition _iter162 : this.success) { - _iter158.write(oprot); + _iter162.write(oprot); } oprot.writeListEnd(); } @@ -31685,13 +32656,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 _list163 = iprot.readListBegin(); + this.success = new ArrayList(_list163.size); + for (int _i164 = 0; _i164 < _list163.size; ++_i164) { - String _elem161; - _elem161 = iprot.readString(); - this.success.add(_elem161); + String _elem165; + _elem165 = iprot.readString(); + this.success.add(_elem165); } iprot.readListEnd(); } @@ -31723,9 +32694,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter162 : this.success) + for (String _iter166 : this.success) { - oprot.writeString(_iter162); + oprot.writeString(_iter166); } oprot.writeListEnd(); } @@ -32242,13 +33213,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 _list167 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list167.size); + for (int _i168 = 0; _i168 < _list167.size; ++_i168) { - String _elem165; - _elem165 = iprot.readString(); - this.part_vals.add(_elem165); + String _elem169; + _elem169 = iprot.readString(); + this.part_vals.add(_elem169); } iprot.readListEnd(); } @@ -32291,9 +33262,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 _iter170 : this.part_vals) { - oprot.writeString(_iter166); + oprot.writeString(_iter170); } oprot.writeListEnd(); } @@ -32666,14 +33637,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 _list171 = iprot.readListBegin(); + this.success = new ArrayList(_list171.size); + for (int _i172 = 0; _i172 < _list171.size; ++_i172) { - Partition _elem169; - _elem169 = new Partition(); - _elem169.read(iprot); - this.success.add(_elem169); + Partition _elem173; + _elem173 = new Partition(); + _elem173.read(iprot); + this.success.add(_elem173); } iprot.readListEnd(); } @@ -32705,9 +33676,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter170 : this.success) + for (Partition _iter174 : this.success) { - _iter170.write(oprot); + _iter174.write(oprot); } oprot.writeListEnd(); } @@ -33380,13 +34351,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 _list175 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list175.size); + for (int _i176 = 0; _i176 < _list175.size; ++_i176) { - String _elem173; - _elem173 = iprot.readString(); - this.part_vals.add(_elem173); + String _elem177; + _elem177 = iprot.readString(); + this.part_vals.add(_elem177); } iprot.readListEnd(); } @@ -33412,13 +34383,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 _list178 = iprot.readListBegin(); + this.group_names = new ArrayList(_list178.size); + for (int _i179 = 0; _i179 < _list178.size; ++_i179) { - String _elem176; - _elem176 = iprot.readString(); - this.group_names.add(_elem176); + String _elem180; + _elem180 = iprot.readString(); + this.group_names.add(_elem180); } iprot.readListEnd(); } @@ -33453,9 +34424,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 _iter181 : this.part_vals) { - oprot.writeString(_iter177); + oprot.writeString(_iter181); } oprot.writeListEnd(); } @@ -33473,9 +34444,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 _iter182 : this.group_names) { - oprot.writeString(_iter178); + oprot.writeString(_iter182); } oprot.writeListEnd(); } @@ -33929,14 +34900,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 _list183 = iprot.readListBegin(); + this.success = new ArrayList(_list183.size); + for (int _i184 = 0; _i184 < _list183.size; ++_i184) { - Partition _elem181; - _elem181 = new Partition(); - _elem181.read(iprot); - this.success.add(_elem181); + Partition _elem185; + _elem185 = new Partition(); + _elem185.read(iprot); + this.success.add(_elem185); } iprot.readListEnd(); } @@ -33976,9 +34947,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter182 : this.success) + for (Partition _iter186 : this.success) { - _iter182.write(oprot); + _iter186.write(oprot); } oprot.writeListEnd(); } @@ -34507,13 +35478,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 _list187 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list187.size); + for (int _i188 = 0; _i188 < _list187.size; ++_i188) { - String _elem185; - _elem185 = iprot.readString(); - this.part_vals.add(_elem185); + String _elem189; + _elem189 = iprot.readString(); + this.part_vals.add(_elem189); } iprot.readListEnd(); } @@ -34556,9 +35527,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 _iter190 : this.part_vals) { - oprot.writeString(_iter186); + oprot.writeString(_iter190); } oprot.writeListEnd(); } @@ -34931,13 +35902,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 _list191 = iprot.readListBegin(); + this.success = new ArrayList(_list191.size); + for (int _i192 = 0; _i192 < _list191.size; ++_i192) { - String _elem189; - _elem189 = iprot.readString(); - this.success.add(_elem189); + String _elem193; + _elem193 = iprot.readString(); + this.success.add(_elem193); } iprot.readListEnd(); } @@ -34969,9 +35940,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter190 : this.success) + for (String _iter194 : this.success) { - oprot.writeString(_iter190); + oprot.writeString(_iter194); } oprot.writeListEnd(); } @@ -35943,14 +36914,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 _list195 = iprot.readListBegin(); + this.success = new ArrayList(_list195.size); + for (int _i196 = 0; _i196 < _list195.size; ++_i196) { - Partition _elem193; - _elem193 = new Partition(); - _elem193.read(iprot); - this.success.add(_elem193); + Partition _elem197; + _elem197 = new Partition(); + _elem197.read(iprot); + this.success.add(_elem197); } iprot.readListEnd(); } @@ -35990,9 +36961,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter194 : this.success) + for (Partition _iter198 : this.success) { - _iter194.write(oprot); + _iter198.write(oprot); } oprot.writeListEnd(); } @@ -38196,13 +39167,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 _list199 = iprot.readListBegin(); + this.success = new ArrayList(_list199.size); + for (int _i200 = 0; _i200 < _list199.size; ++_i200) { - String _elem197; - _elem197 = iprot.readString(); - this.success.add(_elem197); + String _elem201; + _elem201 = iprot.readString(); + this.success.add(_elem201); } iprot.readListEnd(); } @@ -38234,9 +39205,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter198 : this.success) + for (String _iter202 : this.success) { - oprot.writeString(_iter198); + oprot.writeString(_iter202); } oprot.writeListEnd(); } @@ -38881,15 +39852,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 _map203 = iprot.readMapBegin(); + this.success = new HashMap(2*_map203.size); + for (int _i204 = 0; _i204 < _map203.size; ++_i204) { - String _key201; - String _val202; - _key201 = iprot.readString(); - _val202 = iprot.readString(); - this.success.put(_key201, _val202); + String _key205; + String _val206; + _key205 = iprot.readString(); + _val206 = iprot.readString(); + this.success.put(_key205, _val206); } iprot.readMapEnd(); } @@ -38921,10 +39892,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 _iter207 : this.success.entrySet()) { - oprot.writeString(_iter203.getKey()); - oprot.writeString(_iter203.getValue()); + oprot.writeString(_iter207.getKey()); + oprot.writeString(_iter207.getValue()); } oprot.writeMapEnd(); } @@ -43528,14 +44499,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 _list208 = iprot.readListBegin(); + this.success = new ArrayList(_list208.size); + for (int _i209 = 0; _i209 < _list208.size; ++_i209) { - Index _elem206; - _elem206 = new Index(); - _elem206.read(iprot); - this.success.add(_elem206); + Index _elem210; + _elem210 = new Index(); + _elem210.read(iprot); + this.success.add(_elem210); } iprot.readListEnd(); } @@ -43575,9 +44546,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Index _iter207 : this.success) + for (Index _iter211 : this.success) { - _iter207.write(oprot); + _iter211.write(oprot); } oprot.writeListEnd(); } @@ -44405,13 +45376,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 _list212 = iprot.readListBegin(); + this.success = new ArrayList(_list212.size); + for (int _i213 = 0; _i213 < _list212.size; ++_i213) { - String _elem210; - _elem210 = iprot.readString(); - this.success.add(_elem210); + String _elem214; + _elem214 = iprot.readString(); + this.success.add(_elem214); } iprot.readListEnd(); } @@ -44443,9 +45414,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter211 : this.success) + for (String _iter215 : this.success) { - oprot.writeString(_iter211); + oprot.writeString(_iter215); } oprot.writeListEnd(); } @@ -46278,13 +47249,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 _list216 = iprot.readListBegin(); + this.success = new ArrayList(_list216.size); + for (int _i217 = 0; _i217 < _list216.size; ++_i217) { - String _elem214; - _elem214 = iprot.readString(); - this.success.add(_elem214); + String _elem218; + _elem218 = iprot.readString(); + this.success.add(_elem218); } iprot.readListEnd(); } @@ -46316,9 +47287,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter215 : this.success) + for (String _iter219 : this.success) { - oprot.writeString(_iter215); + oprot.writeString(_iter219); } oprot.writeListEnd(); } @@ -48994,14 +49965,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 _list220 = iprot.readListBegin(); + this.success = new ArrayList(_list220.size); + for (int _i221 = 0; _i221 < _list220.size; ++_i221) { - Role _elem218; - _elem218 = new Role(); - _elem218.read(iprot); - this.success.add(_elem218); + Role _elem222; + _elem222 = new Role(); + _elem222.read(iprot); + this.success.add(_elem222); } iprot.readListEnd(); } @@ -49033,9 +50004,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Role _iter219 : this.success) + for (Role _iter223 : this.success) { - _iter219.write(oprot); + _iter223.write(oprot); } oprot.writeListEnd(); } @@ -49480,13 +50451,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 _list224 = iprot.readListBegin(); + this.group_names = new ArrayList(_list224.size); + for (int _i225 = 0; _i225 < _list224.size; ++_i225) { - String _elem222; - _elem222 = iprot.readString(); - this.group_names.add(_elem222); + String _elem226; + _elem226 = iprot.readString(); + this.group_names.add(_elem226); } iprot.readListEnd(); } @@ -49521,9 +50492,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 _iter227 : this.group_names) { - oprot.writeString(_iter223); + oprot.writeString(_iter227); } oprot.writeListEnd(); } @@ -50722,14 +51693,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 _list228 = iprot.readListBegin(); + this.success = new ArrayList(_list228.size); + for (int _i229 = 0; _i229 < _list228.size; ++_i229) { - HiveObjectPrivilege _elem226; - _elem226 = new HiveObjectPrivilege(); - _elem226.read(iprot); - this.success.add(_elem226); + HiveObjectPrivilege _elem230; + _elem230 = new HiveObjectPrivilege(); + _elem230.read(iprot); + this.success.add(_elem230); } iprot.readListEnd(); } @@ -50761,9 +51732,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (HiveObjectPrivilege _iter227 : this.success) + for (HiveObjectPrivilege _iter231 : this.success) { - _iter227.write(oprot); + _iter231.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 1068698) +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (working copy) @@ -26,6 +26,7 @@ public function drop_table($dbname, $name, $deleteData); public function get_tables($db_name, $pattern); public function get_all_tables($db_name); + public function get_tables_by_owner($owner, $offset, $limit); public function get_table($dbname, $tbl_name); public function alter_table($dbname, $tbl_name, $new_tbl); public function add_partition($new_part); @@ -983,6 +984,62 @@ throw new Exception("get_all_tables failed: unknown result"); } + public function get_tables_by_owner($owner, $offset, $limit) + { + $this->send_get_tables_by_owner($owner, $offset, $limit); + return $this->recv_get_tables_by_owner(); + } + + public function send_get_tables_by_owner($owner, $offset, $limit) + { + $args = new metastore_ThriftHiveMetastore_get_tables_by_owner_args(); + $args->owner = $owner; + $args->offset = $offset; + $args->limit = $limit; + $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_owner', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_tables_by_owner', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_tables_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_tables_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_tables_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_tables_by_owner failed: unknown result"); + } + public function get_table($dbname, $tbl_name) { $this->send_get_table($dbname, $tbl_name); @@ -6628,6 +6685,240 @@ } +class metastore_ThriftHiveMetastore_get_tables_by_owner_args { + static $_TSPEC; + + public $owner = null; + public $offset = null; + public $limit = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'owner', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'offset', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'limit', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['owner'])) { + $this->owner = $vals['owner']; + } + if (isset($vals['offset'])) { + $this->offset = $vals['offset']; + } + if (isset($vals['limit'])) { + $this->limit = $vals['limit']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_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; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->offset); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->limit); + } 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_owner_args'); + if ($this->owner !== null) { + $xfer += $output->writeFieldBegin('owner', TType::STRING, 1); + $xfer += $output->writeString($this->owner); + $xfer += $output->writeFieldEnd(); + } + if ($this->offset !== null) { + $xfer += $output->writeFieldBegin('offset', TType::I64, 2); + $xfer += $output->writeI64($this->offset); + $xfer += $output->writeFieldEnd(); + } + if ($this->limit !== null) { + $xfer += $output->writeFieldBegin('limit', TType::I32, 3); + $xfer += $output->writeI32($this->limit); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_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::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_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; + $elem230 = new metastore_Table(); + $xfer += $elem230->read($input); + $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_tables_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::STRUCT, count($this->success)); + { + foreach ($this->success as $iter231) + { + $xfer += $iter231->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 +7642,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) + $_size232 = 0; + $_etype235 = 0; + $xfer += $input->readListBegin($_etype235, $_size232); + for ($_i236 = 0; $_i236 < $_size232; ++$_i236) { - $elem230 = null; - $xfer += $input->readString($elem230); - $this->part_vals []= $elem230; + $elem237 = null; + $xfer += $input->readString($elem237); + $this->part_vals []= $elem237; } $xfer += $input->readListEnd(); } else { @@ -7396,9 +7687,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter231) + foreach ($this->part_vals as $iter238) { - $xfer += $output->writeString($iter231); + $xfer += $output->writeString($iter238); } } $output->writeListEnd(); @@ -7895,14 +8186,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) + $_size239 = 0; + $_etype242 = 0; + $xfer += $input->readListBegin($_etype242, $_size239); + for ($_i243 = 0; $_i243 < $_size239; ++$_i243) { - $elem237 = null; - $xfer += $input->readString($elem237); - $this->part_vals []= $elem237; + $elem244 = null; + $xfer += $input->readString($elem244); + $this->part_vals []= $elem244; } $xfer += $input->readListEnd(); } else { @@ -7947,9 +8238,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter238) + foreach ($this->part_vals as $iter245) { - $xfer += $output->writeString($iter238); + $xfer += $output->writeString($iter245); } } $output->writeListEnd(); @@ -8409,14 +8700,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) + $_size246 = 0; + $_etype249 = 0; + $xfer += $input->readListBegin($_etype249, $_size246); + for ($_i250 = 0; $_i250 < $_size246; ++$_i250) { - $elem244 = null; - $xfer += $input->readString($elem244); - $this->part_vals []= $elem244; + $elem251 = null; + $xfer += $input->readString($elem251); + $this->part_vals []= $elem251; } $xfer += $input->readListEnd(); } else { @@ -8454,9 +8745,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter245) + foreach ($this->part_vals as $iter252) { - $xfer += $output->writeString($iter245); + $xfer += $output->writeString($iter252); } } $output->writeListEnd(); @@ -8688,14 +8979,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) + $_size253 = 0; + $_etype256 = 0; + $xfer += $input->readListBegin($_etype256, $_size253); + for ($_i257 = 0; $_i257 < $_size253; ++$_i257) { - $elem251 = null; - $xfer += $input->readString($elem251); - $this->part_vals []= $elem251; + $elem258 = null; + $xfer += $input->readString($elem258); + $this->part_vals []= $elem258; } $xfer += $input->readListEnd(); } else { @@ -8712,14 +9003,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) + $_size259 = 0; + $_etype262 = 0; + $xfer += $input->readListBegin($_etype262, $_size259); + for ($_i263 = 0; $_i263 < $_size259; ++$_i263) { - $elem257 = null; - $xfer += $input->readString($elem257); - $this->group_names []= $elem257; + $elem264 = null; + $xfer += $input->readString($elem264); + $this->group_names []= $elem264; } $xfer += $input->readListEnd(); } else { @@ -8757,9 +9048,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter258) + foreach ($this->part_vals as $iter265) { - $xfer += $output->writeString($iter258); + $xfer += $output->writeString($iter265); } } $output->writeListEnd(); @@ -8779,9 +9070,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter259) + foreach ($this->group_names as $iter266) { - $xfer += $output->writeString($iter259); + $xfer += $output->writeString($iter266); } } $output->writeListEnd(); @@ -9327,15 +9618,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) + $_size267 = 0; + $_etype270 = 0; + $xfer += $input->readListBegin($_etype270, $_size267); + for ($_i271 = 0; $_i271 < $_size267; ++$_i271) { - $elem265 = null; - $elem265 = new metastore_Partition(); - $xfer += $elem265->read($input); - $this->success []= $elem265; + $elem272 = null; + $elem272 = new metastore_Partition(); + $xfer += $elem272->read($input); + $this->success []= $elem272; } $xfer += $input->readListEnd(); } else { @@ -9379,9 +9670,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter266) + foreach ($this->success as $iter273) { - $xfer += $iter266->write($output); + $xfer += $iter273->write($output); } } $output->writeListEnd(); @@ -9512,14 +9803,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) + $_size274 = 0; + $_etype277 = 0; + $xfer += $input->readListBegin($_etype277, $_size274); + for ($_i278 = 0; $_i278 < $_size274; ++$_i278) { - $elem272 = null; - $xfer += $input->readString($elem272); - $this->group_names []= $elem272; + $elem279 = null; + $xfer += $input->readString($elem279); + $this->group_names []= $elem279; } $xfer += $input->readListEnd(); } else { @@ -9567,9 +9858,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter273) + foreach ($this->group_names as $iter280) { - $xfer += $output->writeString($iter273); + $xfer += $output->writeString($iter280); } } $output->writeListEnd(); @@ -9649,15 +9940,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) + $_size281 = 0; + $_etype284 = 0; + $xfer += $input->readListBegin($_etype284, $_size281); + for ($_i285 = 0; $_i285 < $_size281; ++$_i285) { - $elem279 = null; - $elem279 = new metastore_Partition(); - $xfer += $elem279->read($input); - $this->success []= $elem279; + $elem286 = null; + $elem286 = new metastore_Partition(); + $xfer += $elem286->read($input); + $this->success []= $elem286; } $xfer += $input->readListEnd(); } else { @@ -9701,9 +9992,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter280) + foreach ($this->success as $iter287) { - $xfer += $iter280->write($output); + $xfer += $iter287->write($output); } } $output->writeListEnd(); @@ -9895,14 +10186,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) + $_size288 = 0; + $_etype291 = 0; + $xfer += $input->readListBegin($_etype291, $_size288); + for ($_i292 = 0; $_i292 < $_size288; ++$_i292) { - $elem286 = null; - $xfer += $input->readString($elem286); - $this->success []= $elem286; + $elem293 = null; + $xfer += $input->readString($elem293); + $this->success []= $elem293; } $xfer += $input->readListEnd(); } else { @@ -9938,9 +10229,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter287) + foreach ($this->success as $iter294) { - $xfer += $output->writeString($iter287); + $xfer += $output->writeString($iter294); } } $output->writeListEnd(); @@ -10044,14 +10335,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) + $_size295 = 0; + $_etype298 = 0; + $xfer += $input->readListBegin($_etype298, $_size295); + for ($_i299 = 0; $_i299 < $_size295; ++$_i299) { - $elem293 = null; - $xfer += $input->readString($elem293); - $this->part_vals []= $elem293; + $elem300 = null; + $xfer += $input->readString($elem300); + $this->part_vals []= $elem300; } $xfer += $input->readListEnd(); } else { @@ -10096,9 +10387,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter294) + foreach ($this->part_vals as $iter301) { - $xfer += $output->writeString($iter294); + $xfer += $output->writeString($iter301); } } $output->writeListEnd(); @@ -10174,15 +10465,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) + $_size302 = 0; + $_etype305 = 0; + $xfer += $input->readListBegin($_etype305, $_size302); + for ($_i306 = 0; $_i306 < $_size302; ++$_i306) { - $elem300 = null; - $elem300 = new metastore_Partition(); - $xfer += $elem300->read($input); - $this->success []= $elem300; + $elem307 = null; + $elem307 = new metastore_Partition(); + $xfer += $elem307->read($input); + $this->success []= $elem307; } $xfer += $input->readListEnd(); } else { @@ -10218,9 +10509,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter301) + foreach ($this->success as $iter308) { - $xfer += $iter301->write($output); + $xfer += $iter308->write($output); } } $output->writeListEnd(); @@ -10344,14 +10635,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) + $_size309 = 0; + $_etype312 = 0; + $xfer += $input->readListBegin($_etype312, $_size309); + for ($_i313 = 0; $_i313 < $_size309; ++$_i313) { - $elem307 = null; - $xfer += $input->readString($elem307); - $this->part_vals []= $elem307; + $elem314 = null; + $xfer += $input->readString($elem314); + $this->part_vals []= $elem314; } $xfer += $input->readListEnd(); } else { @@ -10375,14 +10666,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) + $_size315 = 0; + $_etype318 = 0; + $xfer += $input->readListBegin($_etype318, $_size315); + for ($_i319 = 0; $_i319 < $_size315; ++$_i319) { - $elem313 = null; - $xfer += $input->readString($elem313); - $this->group_names []= $elem313; + $elem320 = null; + $xfer += $input->readString($elem320); + $this->group_names []= $elem320; } $xfer += $input->readListEnd(); } else { @@ -10420,9 +10711,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter314) + foreach ($this->part_vals as $iter321) { - $xfer += $output->writeString($iter314); + $xfer += $output->writeString($iter321); } } $output->writeListEnd(); @@ -10447,9 +10738,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter315) + foreach ($this->group_names as $iter322) { - $xfer += $output->writeString($iter315); + $xfer += $output->writeString($iter322); } } $output->writeListEnd(); @@ -10529,15 +10820,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) + $_size323 = 0; + $_etype326 = 0; + $xfer += $input->readListBegin($_etype326, $_size323); + for ($_i327 = 0; $_i327 < $_size323; ++$_i327) { - $elem321 = null; - $elem321 = new metastore_Partition(); - $xfer += $elem321->read($input); - $this->success []= $elem321; + $elem328 = null; + $elem328 = new metastore_Partition(); + $xfer += $elem328->read($input); + $this->success []= $elem328; } $xfer += $input->readListEnd(); } else { @@ -10581,9 +10872,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter322) + foreach ($this->success as $iter329) { - $xfer += $iter322->write($output); + $xfer += $iter329->write($output); } } $output->writeListEnd(); @@ -10692,14 +10983,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) + $_size330 = 0; + $_etype333 = 0; + $xfer += $input->readListBegin($_etype333, $_size330); + for ($_i334 = 0; $_i334 < $_size330; ++$_i334) { - $elem328 = null; - $xfer += $input->readString($elem328); - $this->part_vals []= $elem328; + $elem335 = null; + $xfer += $input->readString($elem335); + $this->part_vals []= $elem335; } $xfer += $input->readListEnd(); } else { @@ -10744,9 +11035,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter329) + foreach ($this->part_vals as $iter336) { - $xfer += $output->writeString($iter329); + $xfer += $output->writeString($iter336); } } $output->writeListEnd(); @@ -10821,14 +11112,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) + $_size337 = 0; + $_etype340 = 0; + $xfer += $input->readListBegin($_etype340, $_size337); + for ($_i341 = 0; $_i341 < $_size337; ++$_i341) { - $elem335 = null; - $xfer += $input->readString($elem335); - $this->success []= $elem335; + $elem342 = null; + $xfer += $input->readString($elem342); + $this->success []= $elem342; } $xfer += $input->readListEnd(); } else { @@ -10864,9 +11155,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter336) + foreach ($this->success as $iter343) { - $xfer += $output->writeString($iter336); + $xfer += $output->writeString($iter343); } } $output->writeListEnd(); @@ -11083,15 +11374,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) + $_size344 = 0; + $_etype347 = 0; + $xfer += $input->readListBegin($_etype347, $_size344); + for ($_i348 = 0; $_i348 < $_size344; ++$_i348) { - $elem342 = null; - $elem342 = new metastore_Partition(); - $xfer += $elem342->read($input); - $this->success []= $elem342; + $elem349 = null; + $elem349 = new metastore_Partition(); + $xfer += $elem349->read($input); + $this->success []= $elem349; } $xfer += $input->readListEnd(); } else { @@ -11135,9 +11426,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter343) + foreach ($this->success as $iter350) { - $xfer += $iter343->write($output); + $xfer += $iter350->write($output); } } $output->writeListEnd(); @@ -11688,14 +11979,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) + $_size351 = 0; + $_etype354 = 0; + $xfer += $input->readListBegin($_etype354, $_size351); + for ($_i355 = 0; $_i355 < $_size351; ++$_i355) { - $elem349 = null; - $xfer += $input->readString($elem349); - $this->success []= $elem349; + $elem356 = null; + $xfer += $input->readString($elem356); + $this->success []= $elem356; } $xfer += $input->readListEnd(); } else { @@ -11731,9 +12022,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter350) + foreach ($this->success as $iter357) { - $xfer += $output->writeString($iter350); + $xfer += $output->writeString($iter357); } } $output->writeListEnd(); @@ -11884,17 +12175,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) + $_size358 = 0; + $_ktype359 = 0; + $_vtype360 = 0; + $xfer += $input->readMapBegin($_ktype359, $_vtype360, $_size358); + for ($_i362 = 0; $_i362 < $_size358; ++$_i362) { - $key356 = ''; - $val357 = ''; - $xfer += $input->readString($key356); - $xfer += $input->readString($val357); - $this->success[$key356] = $val357; + $key363 = ''; + $val364 = ''; + $xfer += $input->readString($key363); + $xfer += $input->readString($val364); + $this->success[$key363] = $val364; } $xfer += $input->readMapEnd(); } else { @@ -11930,10 +12221,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); { - foreach ($this->success as $kiter358 => $viter359) + foreach ($this->success as $kiter365 => $viter366) { - $xfer += $output->writeString($kiter358); - $xfer += $output->writeString($viter359); + $xfer += $output->writeString($kiter365); + $xfer += $output->writeString($viter366); } } $output->writeMapEnd(); @@ -13089,15 +13380,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) + $_size367 = 0; + $_etype370 = 0; + $xfer += $input->readListBegin($_etype370, $_size367); + for ($_i371 = 0; $_i371 < $_size367; ++$_i371) { - $elem365 = null; - $elem365 = new metastore_Index(); - $xfer += $elem365->read($input); - $this->success []= $elem365; + $elem372 = null; + $elem372 = new metastore_Index(); + $xfer += $elem372->read($input); + $this->success []= $elem372; } $xfer += $input->readListEnd(); } else { @@ -13141,9 +13432,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter366) + foreach ($this->success as $iter373) { - $xfer += $iter366->write($output); + $xfer += $iter373->write($output); } } $output->writeListEnd(); @@ -13335,14 +13626,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) + $_size374 = 0; + $_etype377 = 0; + $xfer += $input->readListBegin($_etype377, $_size374); + for ($_i378 = 0; $_i378 < $_size374; ++$_i378) { - $elem372 = null; - $xfer += $input->readString($elem372); - $this->success []= $elem372; + $elem379 = null; + $xfer += $input->readString($elem379); + $this->success []= $elem379; } $xfer += $input->readListEnd(); } else { @@ -13378,9 +13669,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter373) + foreach ($this->success as $iter380) { - $xfer += $output->writeString($iter373); + $xfer += $output->writeString($iter380); } } $output->writeListEnd(); @@ -13842,14 +14133,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) + $_size381 = 0; + $_etype384 = 0; + $xfer += $input->readListBegin($_etype384, $_size381); + for ($_i385 = 0; $_i385 < $_size381; ++$_i385) { - $elem379 = null; - $xfer += $input->readString($elem379); - $this->success []= $elem379; + $elem386 = null; + $xfer += $input->readString($elem386); + $this->success []= $elem386; } $xfer += $input->readListEnd(); } else { @@ -13885,9 +14176,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter380) + foreach ($this->success as $iter387) { - $xfer += $output->writeString($iter380); + $xfer += $output->writeString($iter387); } } $output->writeListEnd(); @@ -14527,15 +14818,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) + $_size388 = 0; + $_etype391 = 0; + $xfer += $input->readListBegin($_etype391, $_size388); + for ($_i392 = 0; $_i392 < $_size388; ++$_i392) { - $elem386 = null; - $elem386 = new metastore_Role(); - $xfer += $elem386->read($input); - $this->success []= $elem386; + $elem393 = null; + $elem393 = new metastore_Role(); + $xfer += $elem393->read($input); + $this->success []= $elem393; } $xfer += $input->readListEnd(); } else { @@ -14571,9 +14862,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter387) + foreach ($this->success as $iter394) { - $xfer += $iter387->write($output); + $xfer += $iter394->write($output); } } $output->writeListEnd(); @@ -14671,14 +14962,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) + $_size395 = 0; + $_etype398 = 0; + $xfer += $input->readListBegin($_etype398, $_size395); + for ($_i399 = 0; $_i399 < $_size395; ++$_i399) { - $elem393 = null; - $xfer += $input->readString($elem393); - $this->group_names []= $elem393; + $elem400 = null; + $xfer += $input->readString($elem400); + $this->group_names []= $elem400; } $xfer += $input->readListEnd(); } else { @@ -14719,9 +15010,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter394) + foreach ($this->group_names as $iter401) { - $xfer += $output->writeString($iter394); + $xfer += $output->writeString($iter401); } } $output->writeListEnd(); @@ -15008,15 +15299,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) + $_size402 = 0; + $_etype405 = 0; + $xfer += $input->readListBegin($_etype405, $_size402); + for ($_i406 = 0; $_i406 < $_size402; ++$_i406) { - $elem400 = null; - $elem400 = new metastore_HiveObjectPrivilege(); - $xfer += $elem400->read($input); - $this->success []= $elem400; + $elem407 = null; + $elem407 = new metastore_HiveObjectPrivilege(); + $xfer += $elem407->read($input); + $this->success []= $elem407; } $xfer += $input->readListEnd(); } else { @@ -15052,9 +15343,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter401) + foreach ($this->success as $iter408) { - $xfer += $iter401->write($output); + $xfer += $iter408->write($output); } } $output->writeListEnd(); Index: metastore/if/hive_metastore.thrift =================================================================== --- metastore/if/hive_metastore.thrift (revision 1068698) +++ 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,8 @@ 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_tables_by_owner(1: string owner, 2: i64 offset, 3: i32 limit) + throws (1: MetaException o1) Table get_table(1:string dbname, 2:string tbl_name) throws (1:MetaException o1, 2:NoSuchObjectException o2) @@ -262,11 +264,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 +278,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 +317,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 +325,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 +342,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 +370,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