Index: metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java =================================================================== --- metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (revision 1150966) +++ metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (working copy) @@ -1590,4 +1590,186 @@ List databases = synchronizedClient.getAllDatabases(); assertEquals(1, databases.size()); } + + public void testTableFilter() throws Exception { + try { + String dbName = "testTableFilter"; + String owner1 = "testOwner1"; + String owner2 = "testOwner2"; + int lastAccessTime1 = 90; + int lastAccessTime2 = 30; + String tableName1 = "table1"; + String tableName2 = "table2"; + String tableName3 = "table3"; + + client.dropTable(dbName, tableName1); + client.dropTable(dbName, tableName2); + client.dropTable(dbName, tableName3); + silentDropDatabase(dbName); + Database db = new Database(); + db.setName(dbName); + db.setDescription("Alter Partition Test database"); + client.createDatabase(db); + + Table table1 = createTableForTestFilter(dbName,tableName1, owner1, lastAccessTime1, true); + Table table2 = createTableForTestFilter(dbName,tableName2, owner2, lastAccessTime2, true); + Table table3 = createTableForTestFilter(dbName,tableName3, owner1, lastAccessTime2, false); + + List tableNames; + String filter; + //test owner + //owner like ".*Owner.*" and owner like "test.*" + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_OWNER + + " like \".*Owner.*\" and " + + org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_OWNER + + " like \"test.*\""; + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + assertEquals(tableNames.size(), 3); + assert(tableNames.contains(table1.getTableName())); + assert(tableNames.contains(table2.getTableName())); + assert(tableNames.contains(table3.getTableName())); + + //owner = "testOwner1" + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_OWNER + + " = \"testOwner1\""; + + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + assertEquals(2, tableNames.size()); + assert(tableNames.contains(table1.getTableName())); + assert(tableNames.contains(table3.getTableName())); + + //lastAccessTime < 90 + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_LAST_ACCESS + + " < 90"; + + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + assertEquals(2, tableNames.size()); + assert(tableNames.contains(table2.getTableName())); + assert(tableNames.contains(table3.getTableName())); + + //lastAccessTime > 90 + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_LAST_ACCESS + + " > 90"; + + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + assertEquals(0, tableNames.size()); + + //test params + //test_param_2 = "50" + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + "test_param_2 = \"50\""; + + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + assertEquals(2, tableNames.size()); + assert(tableNames.contains(table1.getTableName())); + assert(tableNames.contains(table2.getTableName())); + + //test_param_2 = "75" + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + "test_param_2 = \"75\""; + + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + assertEquals(0, tableNames.size()); + + //key_dne = "50" + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + "key_dne = \"50\""; + + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + assertEquals(0, tableNames.size()); + + //test_param_1 != "yellow" + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + "test_param_1 <> \"yellow\""; + + tableNames = client.listTableNamesByFilter(dbName, filter, (short) 2); + assertEquals(2, tableNames.size()); + + //owner = "testOwner1" and (lastAccessTime = 30 or test_param_1 = "hi") + filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_OWNER + + " = \"testOwner1\" and (" + + org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_LAST_ACCESS + + " = 30 or " + + org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + "test_param_1 = \"hi\")"; + tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); + + assertEquals(2, tableNames.size()); + assert(tableNames.contains(table1.getTableName())); + assert(tableNames.contains(table3.getTableName())); + + //Negative tests + Exception me = null; + try { + filter = "badKey = \"testOwner1\""; + tableNames = client.listTableNamesByFilter(dbName, filter, (short) -1); + } catch(MetaException e) { + me = e; + } + assertNotNull(me); + assertTrue("Bad filter key test", me.getMessage().contains( + "Invalid key name in filter")); + + client.dropTable(dbName, tableName1); + client.dropTable(dbName, tableName2); + client.dropTable(dbName, tableName3); + client.dropDatabase(dbName); + } catch (Exception e) { + System.err.println(StringUtils.stringifyException(e)); + System.err.println("testTableFilter() failed."); + throw e; + } + } + + private Table createTableForTestFilter(String dbName, String tableName, String owner, int lastAccessTime, boolean hasSecondParam) throws Exception { + client.dropTable(dbName, tableName); + + ArrayList cols = new ArrayList(2); + cols.add(new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + + Table tbl = new Table(); + tbl.setDbName(dbName); + tbl.setTableName(tableName); + tbl.setParameters(new HashMap()); + tbl.getParameters().put("test_param_1", "hi"); + if (hasSecondParam) { + tbl.getParameters().put("test_param_2", "50"); + } + StorageDescriptor sd = new StorageDescriptor(); + tbl.setSd(sd); + sd.setCols(cols); + sd.setCompressed(false); + sd.setNumBuckets(1); + sd.setParameters(new HashMap()); + sd.getParameters().put("sd_param_1", "Use this for comments etc"); + sd.setBucketCols(new ArrayList(2)); + sd.getBucketCols().add("name"); + sd.setSerdeInfo(new SerDeInfo()); + sd.getSerdeInfo().setName(tbl.getTableName()); + sd.getSerdeInfo().setParameters(new HashMap()); + sd.getSerdeInfo().getParameters() + .put(Constants.SERIALIZATION_FORMAT, "1"); + sd.setSortCols(new ArrayList()); + + tbl.setOwner(owner); + tbl.setLastAccessTime(lastAccessTime); + + tbl.setPartitionKeys(new ArrayList(2)); + tbl.getPartitionKeys().add( + new FieldSchema("ds", Constants.STRING_TYPE_NAME, "")); + tbl.getPartitionKeys().add( + new FieldSchema("hr", Constants.INT_TYPE_NAME, "")); + + client.createTable(tbl); + + if (isThriftClient) { + // the createTable() above does not update the location in the 'tbl' + // object when the client is a thrift client and the code below relies + // on the location being present in the 'tbl' object - so get the table + // from the metastore + tbl = client.getTable(dbName, tableName); + } + return tbl; + } } Index: metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (revision 1150966) +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (working copy) @@ -135,6 +135,23 @@ public List getAllTables(String dbName) throws MetaException; + /** + * Gets a list of tables based on a filter string and filter type. + * @param dbName + * The name of the database from which you will retrieve the table names + * @param filterType + * The type of filter + * @param filter + * The filter string + * @param max_tables + * The maximum number of tables returned + * @return A list of table names that match the desired filter + * @throws MetaException + * @throws UnknownDBException + */ + public abstract List listTableNamesByFilter(String dbName, + String filter, short max_tables) throws MetaException, UnknownDBException; + public abstract List listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException; Index: metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (revision 1150966) +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (working copy) @@ -96,7 +96,48 @@ public List getAllTables(String dbName) throws MetaException, TException, UnknownDBException; + /** + * Get a list of table names that match a filter. + * The filter operators are LIKE, <, <=, >, >=, =, <> + * + * In the filter statement, values interpreted as strings must be enclosed in quotes, + * while values interpreted as integers should not be. Strings and integers are the only + * supported value types. + * + * The currently supported key names in the filter are: + * Constants.HIVE_FILTER_FIELD_OWNER, which filters on the tables' owner's name + * and supports all filter operators + * Constants.HIVE_FILTER_FIELD_LAST_ACCESS, which filters on the last access times + * and supports all filter operators except LIKE + * Constants.HIVE_FILTER_FIELD_PARAMS, which filters on the tables' parameter keys and values + * and only supports the filter operators = and <>. + * Append the parameter key name to HIVE_FILTER_FIELD_PARAMS in the filter statement. + * For example, to filter on parameter keys called "retention", the key name in the filter + * statement should be Constants.HIVE_FILTER_FIELD_PARAMS + "retention" + * Also, = and <> only work for keys that exist in the tables. + * E.g., filtering on tables where key1 <> value will only + * return tables that have a value for the parameter key1. + * Some example filter statements include: + * filter = Constants.HIVE_FILTER_FIELD_OWNER + " like \".*test.*\" and " + + * Constants.HIVE_FILTER_FIELD_LAST_ACCESS + " = 0"; + * filter = Constants.HIVE_FILTER_FIELD_OWNER + " = \"test_user\" and (" + + * Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"30\" or " + + * Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"90\")" + * + * @param dbName + * The name of the database from which you will retrieve the table names + * @param filterType + * The type of filter + * @param filter + * The filter string + * @param max_tables + * The maximum number of tables returned + * @return A list of table names that match the desired filter + */ + public List listTableNamesByFilter(String dbName, String filter, short maxTables) + throws MetaException, TException, InvalidOperationException, UnknownDBException; + /** * Drop the table. * Index: metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java (revision 1150966) +++ metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java (working copy) @@ -25,9 +25,9 @@ import org.antlr.runtime.CharStream; import org.apache.hadoop.hive.common.FileUtils; import org.apache.hadoop.hive.metastore.Warehouse; +import org.apache.hadoop.hive.metastore.api.Constants; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Table; -import org.apache.hadoop.hive.serde.Constants; /** * The Class representing the filter as a binary tree. The tree has TreeNode's @@ -103,7 +103,20 @@ this.rhs = rhs; } - public String generateJDOFilter(Table table, Map params) + /** + * Generates a JDO filter statement + * @param table + * The table on which the filter is applied. If table is not null, + * then this method generates a JDO statement to get all partitions + * of the table that match the filter. + * If table is null, then this method generates a JDO statement to get all + * tables that match the filter. + * @param params + * A map of parameter key to values for the filter statement. + * @return a JDO filter statement + * @throws MetaException + */ + public String generateJDOFilter(Table table, Map params) throws MetaException { StringBuilder filterBuffer = new StringBuilder(); @@ -125,7 +138,6 @@ return filterBuffer.toString(); } - } /** @@ -134,12 +146,83 @@ public static class LeafNode extends TreeNode { public String keyName; public Operator operator; - public String value; + public Object value; public boolean isReverseOrder = false; private static final String PARAM_PREFIX = "hive_filter_param_"; @Override - public String generateJDOFilter(Table table, Map params) + public String generateJDOFilter(Table table, + Map params) + throws MetaException { + if (table != null) { + return generateJDOFilterOverPartitions(table, params); + } else { + return generateJDOFilterOverTables(params); + } + } + + private String generateJDOFilterOverTables(Map params) + throws MetaException { + if (keyName.equals(Constants.HIVE_FILTER_FIELD_OWNER)) { + keyName = "this.owner"; + } else if (keyName.equals(Constants.HIVE_FILTER_FIELD_LAST_ACCESS)) { + //lastAccessTime expects an integer, so we cannot use the "like operator" + if (operator == Operator.LIKE) { + throw new MetaException("Like is not supported for HIVE_FILTER_FIELD_LAST_ACCESS"); + } + keyName = "this.lastAccessTime"; + } else if (keyName.startsWith(Constants.HIVE_FILTER_FIELD_PARAMS)) { + //can only support "=" and "<>" for now, because our JDO lib is buggy when + // using objects from map.get() + if (!(operator == Operator.EQUALS || operator == Operator.NOTEQUALS)) { + throw new MetaException("Only = and <> are supported " + + "opreators for HIVE_FILTER_FIELD_PARAMS"); + } + String paramKeyName = keyName.substring(Constants.HIVE_FILTER_FIELD_PARAMS.length()); + keyName = "this.parameters.get(\"" + paramKeyName + "\")"; + //value is persisted as a string in the db, so make sure it's a string here + // in case we get an integer. + value = value.toString(); + } else { + throw new MetaException("Invalid key name in filter. " + + "Use constants from org.apache.hadoop.hive.metastore.api"); + } + return generateJDOFilterGeneral(params); + } + + /** + * Generates a general filter. Given a map of , + * generates a statement of the form: + * key1 operator value2 (&& | || ) key2 operator value2 ... + * + * Currently supported types for value are String and Integer. + * The LIKE operator for Integers is unsupported. + */ + private String generateJDOFilterGeneral(Map params) + throws MetaException { + String paramName = PARAM_PREFIX + params.size(); + params.put(paramName, value); + String filter; + + if (isReverseOrder) { + if (operator == Operator.LIKE) { + throw new MetaException( + "Value should be on the RHS for LIKE operator : " + + "Key <" + keyName + ">"); + } else { + filter = paramName + " " + operator.getJdoOp() + " " + keyName; + } + } else { + if (operator == Operator.LIKE) { + filter = " " + keyName + "." + operator.getJdoOp() + "(" + paramName + ") "; + } else { + filter = " " + keyName + " " + operator.getJdoOp() + " " + paramName; + } + } + return filter; + } + + private String generateJDOFilterOverPartitions(Table table, Map params) throws MetaException { int partitionColumnCount = table.getPartitionKeys().size(); @@ -159,14 +242,22 @@ "> is not a partitioning key for the table"); } + //Can only support partitions whose types are string if( ! table.getPartitionKeys().get(partitionColumnIndex). - getType().equals(Constants.STRING_TYPE_NAME) ) { + getType().equals(org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME) ) { throw new MetaException ("Filtering is supported only on partition keys of type string"); } + String valueParam = null; + try { + valueParam = (String) value; + } catch (ClassCastException e) { + throw new MetaException("Filtering is supported only on partition keys of type string"); + } + String paramName = PARAM_PREFIX + params.size(); - params.put(paramName, value); + params.put(paramName, valueParam); String filter; String keyEqual = FileUtils.escapePathName(keyName) + "="; @@ -187,9 +278,8 @@ throw new MetaException( "Value should be on the RHS for LIKE operator : " + "Key <" + keyName + ">"); - } - else if (operator == Operator.EQUALS) { - filter = makeFilterForEquals(keyName, value, paramName, params, + } else if (operator == Operator.EQUALS) { + filter = makeFilterForEquals(keyName, valueParam, paramName, params, partitionColumnIndex, partitionColumnCount); } else { filter = paramName + @@ -201,7 +291,7 @@ filter = " " + valString + "." + operator.getJdoOp() + "(" + paramName + ") "; } else if (operator == Operator.EQUALS) { - filter = makeFilterForEquals(keyName, value, paramName, params, + filter = makeFilterForEquals(keyName, valueParam, paramName, params, partitionColumnIndex, partitionColumnCount); } else { filter = " " + valString + " " @@ -231,7 +321,7 @@ * @throws MetaException */ private static String makeFilterForEquals(String keyName, String value, - String paramName, Map params, int keyPos, int keyCount) + String paramName, Map params, int keyPos, int keyCount) throws MetaException { Map partKeyToVal = new HashMap(); partKeyToVal.put(keyName, value); @@ -308,7 +398,7 @@ * @throws MetaException */ public String generateJDOFilter(Table table, - Map params) throws MetaException { + Map params) throws MetaException { if( root == null ) { return ""; } Index: metastore/src/java/org/apache/hadoop/hive/metastore/parser/Filter.g =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/parser/Filter.g (revision 1150966) +++ metastore/src/java/org/apache/hadoop/hive/metastore/parser/Filter.g (working copy) @@ -63,17 +63,26 @@ operatorExpression @init { boolean isReverseOrder = false; + Object val = null; } : ( - (key = Identifier op = operator value = StringLiteral) - | - (value = StringLiteral op = operator key = Identifier) { isReverseOrder = true; } + ( + (key = Identifier op = operator value = StringLiteral) + | + (value = StringLiteral op = operator key = Identifier) { isReverseOrder = true; } + ) { val = TrimQuotes(value.getText()); } + | + ( + (key = Identifier op = operator value = IntLiteral) + | + (value = IntLiteral op = operator key = Identifier) { isReverseOrder = true; } + ) { val = Integer.parseInt(value.getText()); } ) { LeafNode node = new LeafNode(); node.keyName = key.getText(); - node.value = TrimQuotes(value.getText()); + node.value = val; node.operator = op; node.isReverseOrder = isReverseOrder; @@ -121,10 +130,15 @@ ) ; + +IntLiteral + : + (Digit)+ + ; + Identifier : (Letter | Digit) (Letter | Digit | '_')* ; WS : (' '|'\r'|'\t'|'\n')+ { skip(); } ; - Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (revision 1150966) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (working copy) @@ -711,6 +711,12 @@ return deepCopyTables(client.get_table_objects_by_name(dbName, tableNames)); } + /** {@inheritDoc} */ + public List listTableNamesByFilter(String dbName, String filter, short maxTables) + throws MetaException, TException, InvalidOperationException, UnknownDBException { + return client.get_table_names_by_filter(dbName, filter, maxTables); + } + /** * @param name * @return the type Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1150966) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -1240,6 +1240,40 @@ return tables; } + @Override + public List get_table_names_by_filter( + final String dbName, final String filter, final short maxTables) + throws MetaException, InvalidOperationException, UnknownDBException { + List tables = new ArrayList(); + startFunction("get_table_names_by_filter", ": db = " + dbName + ", filter = " + filter); + try { + tables = executeWithRetry(new Command>() { + @Override + public List run(RawStore ms) throws Exception { + if (dbName == null || dbName.isEmpty()) { + throw new UnknownDBException("DB name is null or empty"); + } + if (filter == null) { + throw new InvalidOperationException(filter + " cannot apply null filter"); + } + List tables = ms.listTableNamesByFilter(dbName, filter, maxTables); + return tables; + } + }); + } catch (MetaException e) { + throw e; + } catch (InvalidOperationException e) { + throw e; + } catch (UnknownDBException e) { + throw e; + } catch (Exception e) { + throw new MetaException(e.toString()); + } finally { + endFunction("get_table_names_by_filter"); + } + return tables; + } + public boolean set_table_parameters(String dbname, String name, Map params) throws NoSuchObjectException, MetaException { endFunction(startTableFunction("set_table_parameters", dbname, name)); Index: metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (revision 1150966) +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (working copy) @@ -1483,31 +1483,49 @@ return parts; } - private String makeQueryFilterString(MTable mtable, String filter, - Map params) - throws MetaException { - StringBuilder queryBuilder = new StringBuilder( - "table.tableName == t1 && table.database.name == t2"); + private FilterParser getFilterParser(String filter) throws MetaException { + CharStream cs = new ANTLRNoCaseStringStream(filter); + FilterLexer lexer = new FilterLexer(cs); - if( filter != null && filter.length() > 0) { + CommonTokenStream tokens = new CommonTokenStream(); + tokens.setTokenSource (lexer); - Table table = convertToTable(mtable); + FilterParser parser = new FilterParser(tokens); - CharStream cs = new ANTLRNoCaseStringStream(filter); - FilterLexer lexer = new FilterLexer(cs); + try { + parser.filter(); + } catch(RecognitionException re) { + throw new MetaException("Error parsing partition filter : " + re); + } + return parser; + } - CommonTokenStream tokens = new CommonTokenStream(); - tokens.setTokenSource (lexer); + /** + * Makes a JDO query filter string + * if mtable is not null, generates the query to filter over partitions in a table. + * if mtable is null, generates the query to filter over tables in a database + */ + private String makeQueryFilterString(MTable mtable, String filter, + Map params) + throws MetaException { - FilterParser parser = new FilterParser(tokens); + StringBuilder queryBuilder = new StringBuilder(); + if (mtable != null) { + queryBuilder.append("table.tableName == t1 && table.database.name == t2"); + } else { + queryBuilder.append("database.name == dbName"); + } - try { - parser.filter(); - } catch(RecognitionException re) { - throw new MetaException("Error parsing partition filter : " + re); + if (filter != null && filter.length() > 0) { + FilterParser parser = getFilterParser(filter); + String jdoFilter; + + if (mtable != null) { + Table table = convertToTable(mtable); + jdoFilter = parser.tree.generateJDOFilter(table, params); + } else { + jdoFilter = parser.tree.generateJDOFilter(null, params); } - - String jdoFilter = parser.tree.generateJDOFilter(table, params); LOG.debug("jdoFilter = " + jdoFilter); if( jdoFilter.trim().length() > 0 ) { @@ -1519,15 +1537,33 @@ return queryBuilder.toString(); } + private String makeTableQueryFilterString(String filter, + Map params) + throws MetaException { + return makeQueryFilterString(null, filter, params); + } + private String makeParameterDeclarationString(Map params) { //Create the parameter declaration string StringBuilder paramDecl = new StringBuilder(); - for(String key : params.keySet() ) { - paramDecl.append(", java.lang.String " + key); + for (String key : params.keySet()) { + paramDecl.append(", java.lang.String " + key); } return paramDecl.toString(); } + private String makeParameterDeclarationStringObj(Map params) { + //Create the parameter declaration string + StringBuilder paramDecl = new StringBuilder(); + for (Entry entry : params.entrySet()) { + paramDecl.append(", "); + paramDecl.append(entry.getValue().getClass().getName()); + paramDecl.append(" "); + paramDecl.append(entry.getKey()); + } + return paramDecl.toString(); + } + private List listMPartitionsByFilter(String dbName, String tableName, String filter, short maxParts) throws MetaException, NoSuchObjectException{ boolean success = false; @@ -1543,7 +1579,7 @@ throw new NoSuchObjectException("Specified database/table does not exist : " + dbName + "." + tableName); } - Map params = new HashMap(); + Map params = new HashMap(); String queryFilterString = makeQueryFilterString(mtable, filter, params); @@ -1561,7 +1597,7 @@ params.put("t1", tableName.trim()); params.put("t2", dbName.trim()); - String parameterDeclaration = makeParameterDeclarationString(params); + String parameterDeclaration = makeParameterDeclarationStringObj(params); query.declareParameters(parameterDeclaration); query.setOrdering("partitionName ascending"); @@ -1580,6 +1616,52 @@ } @Override + public List listTableNamesByFilter(String dbName, String filter, short maxTables) + throws MetaException { + boolean success = false; + List tableNames = new ArrayList(); + try { + openTransaction(); + LOG.debug("Executing listTableNamesByFilter"); + dbName = dbName.toLowerCase().trim(); + Map params = new HashMap(); + String queryFilterString = makeTableQueryFilterString(filter, params); + Query query = pm.newQuery(MTable.class); + query.declareImports("import java.lang.String"); + query.setResult("tableName"); + query.setResultClass(java.lang.String.class); + if (maxTables >= 0) { + query.setRange(0, maxTables); + } + LOG.debug("filter specified is " + filter + "," + " JDOQL filter is " + queryFilterString); + params.put("dbName", dbName); + for (Entry entry : params.entrySet()) { + LOG.debug("key: " + entry.getKey() + " value: " + entry.getValue() + + " class: " + entry.getValue().getClass().getName()); + } + String parameterDeclaration = makeParameterDeclarationStringObj(params); + query.declareParameters(parameterDeclaration); + query.setFilter(queryFilterString); + Collection names = (Collection) query.executeWithMap(params); + //have to emulate "distinct", otherwise tables with the same name may be returned + Set tableNamesSet = new HashSet(); + for (Iterator i = names.iterator(); i.hasNext();) { + tableNamesSet.add((String) i.next()); + } + tableNames = new ArrayList(tableNamesSet); + LOG.debug("Done executing query for listTableNamesByFilter"); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listTableNamesByFilter"); + + } finally { + if (!success) { + rollbackTransaction(); + } + } + return tableNames; + } + + @Override public List listPartitionNamesByFilter(String dbName, String tableName, String filter, short maxParts) throws MetaException { boolean success = false; @@ -1596,7 +1678,7 @@ // table or db does not exist, we return an empty list return partNames; } - Map params = new HashMap(); + Map params = new HashMap(); String queryFilterString = makeQueryFilterString(mtable, filter, params); Query query = pm.newQuery( @@ -1615,7 +1697,7 @@ params.put("t1", tableName.trim()); params.put("t2", dbName.trim()); - String parameterDeclaration = makeParameterDeclarationString(params); + String parameterDeclaration = makeParameterDeclarationStringObj(params); query.declareParameters(parameterDeclaration); query.setOrdering("partitionName ascending"); query.setResult("partitionName"); Index: metastore/src/gen/thrift/gen-py/hive_metastore/constants.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/constants.py (revision 1150966) +++ metastore/src/gen/thrift/gen-py/hive_metastore/constants.py (working copy) @@ -8,6 +8,9 @@ from ttypes import * DDL_TIME = "transient_lastDdlTime" +HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" +HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" +HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__" IS_ARCHIVED = "is_archived" ORIGINAL_LOCATION = "original_location" META_TABLE_COLUMNS = "columns" Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (revision 1150966) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -152,6 +152,15 @@ """ pass + def get_table_names_by_filter(self, dbname, filter, max_tables): + """ + Parameters: + - dbname + - filter + - max_tables + """ + pass + def alter_table(self, dbname, tbl_name, new_tbl): """ Parameters: @@ -1159,6 +1168,46 @@ raise result.o3 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); + def get_table_names_by_filter(self, dbname, filter, max_tables): + """ + Parameters: + - dbname + - filter + - max_tables + """ + self.send_get_table_names_by_filter(dbname, filter, max_tables) + return self.recv_get_table_names_by_filter() + + def send_get_table_names_by_filter(self, dbname, filter, max_tables): + self._oprot.writeMessageBegin('get_table_names_by_filter', TMessageType.CALL, self._seqid) + args = get_table_names_by_filter_args() + args.dbname = dbname + args.filter = filter + args.max_tables = max_tables + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_names_by_filter(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_table_names_by_filter_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); + def alter_table(self, dbname, tbl_name, new_tbl): """ Parameters: @@ -2772,6 +2821,7 @@ self._processMap["get_all_tables"] = Processor.process_get_all_tables self._processMap["get_table"] = Processor.process_get_table self._processMap["get_table_objects_by_name"] = Processor.process_get_table_objects_by_name + self._processMap["get_table_names_by_filter"] = Processor.process_get_table_names_by_filter self._processMap["alter_table"] = Processor.process_alter_table self._processMap["add_partition"] = Processor.process_add_partition self._processMap["add_partitions"] = Processor.process_add_partitions @@ -3125,6 +3175,24 @@ oprot.writeMessageEnd() oprot.trans.flush() + def process_get_table_names_by_filter(self, seqid, iprot, oprot): + args = get_table_names_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_names_by_filter_result() + try: + result.success = self._handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables) + except MetaException, o1: + result.o1 = o1 + except InvalidOperationException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_table_names_by_filter", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_alter_table(self, seqid, iprot, oprot): args = alter_table_args() args.read(iprot) @@ -6547,6 +6615,194 @@ def __ne__(self, other): return not (self == other) +class get_table_names_by_filter_args: + """ + Attributes: + - dbname + - filter + - max_tables + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'filter', None, None, ), # 2 + (3, TType.I16, 'max_tables', None, -1, ), # 3 + ) + + def __init__(self, dbname=None, filter=None, max_tables=thrift_spec[3][4],): + self.dbname = dbname + self.filter = filter + self.max_tables = max_tables + + 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.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.filter = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_tables = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_names_by_filter_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.filter != None: + oprot.writeFieldBegin('filter', TType.STRING, 2) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_tables != None: + oprot.writeFieldBegin('max_tables', TType.I16, 3) + oprot.writeI16(self.max_tables) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_names_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype242, _size239) = iprot.readListBegin() + for _i243 in xrange(_size239): + _elem244 = iprot.readString(); + self.success.append(_elem244) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_names_by_filter_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter245 in self.success: + oprot.writeString(iter245) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 alter_table_args: """ Attributes: @@ -6888,11 +7144,11 @@ if fid == 1: if ftype == TType.LIST: self.new_parts = [] - (_etype242, _size239) = iprot.readListBegin() - for _i243 in xrange(_size239): - _elem244 = Partition() - _elem244.read(iprot) - self.new_parts.append(_elem244) + (_etype249, _size246) = iprot.readListBegin() + for _i250 in xrange(_size246): + _elem251 = Partition() + _elem251.read(iprot) + self.new_parts.append(_elem251) iprot.readListEnd() else: iprot.skip(ftype) @@ -6909,8 +7165,8 @@ if self.new_parts != None: oprot.writeFieldBegin('new_parts', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) - for iter245 in self.new_parts: - iter245.write(oprot) + for iter252 in self.new_parts: + iter252.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7069,10 +7325,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) @@ -7097,8 +7353,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter252 in self.part_vals: - oprot.writeString(iter252) + for iter259 in self.part_vals: + oprot.writeString(iter259) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7442,10 +7698,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype256, _size253) = iprot.readListBegin() - for _i257 in xrange(_size253): - _elem258 = iprot.readString(); - self.part_vals.append(_elem258) + (_etype263, _size260) = iprot.readListBegin() + for _i264 in xrange(_size260): + _elem265 = iprot.readString(); + self.part_vals.append(_elem265) iprot.readListEnd() else: iprot.skip(ftype) @@ -7475,8 +7731,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter259 in self.part_vals: - oprot.writeString(iter259) + for iter266 in self.part_vals: + oprot.writeString(iter266) oprot.writeListEnd() oprot.writeFieldEnd() if self.deleteData != None: @@ -7805,10 +8061,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype263, _size260) = iprot.readListBegin() - for _i264 in xrange(_size260): - _elem265 = iprot.readString(); - self.part_vals.append(_elem265) + (_etype270, _size267) = iprot.readListBegin() + for _i271 in xrange(_size267): + _elem272 = iprot.readString(); + self.part_vals.append(_elem272) iprot.readListEnd() else: iprot.skip(ftype) @@ -7833,8 +8089,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter266 in self.part_vals: - oprot.writeString(iter266) + for iter273 in self.part_vals: + oprot.writeString(iter273) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7987,10 +8243,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype270, _size267) = iprot.readListBegin() - for _i271 in xrange(_size267): - _elem272 = iprot.readString(); - self.part_vals.append(_elem272) + (_etype277, _size274) = iprot.readListBegin() + for _i278 in xrange(_size274): + _elem279 = iprot.readString(); + self.part_vals.append(_elem279) iprot.readListEnd() else: iprot.skip(ftype) @@ -8002,10 +8258,10 @@ elif fid == 5: if ftype == TType.LIST: self.group_names = [] - (_etype276, _size273) = iprot.readListBegin() - for _i277 in xrange(_size273): - _elem278 = iprot.readString(); - self.group_names.append(_elem278) + (_etype283, _size280) = iprot.readListBegin() + for _i284 in xrange(_size280): + _elem285 = iprot.readString(); + self.group_names.append(_elem285) iprot.readListEnd() else: iprot.skip(ftype) @@ -8030,8 +8286,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter279 in self.part_vals: - oprot.writeString(iter279) + for iter286 in self.part_vals: + oprot.writeString(iter286) oprot.writeListEnd() oprot.writeFieldEnd() if self.user_name != None: @@ -8041,8 +8297,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter280 in self.group_names: - oprot.writeString(iter280) + for iter287 in self.group_names: + oprot.writeString(iter287) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8429,11 +8685,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype284, _size281) = iprot.readListBegin() - for _i285 in xrange(_size281): - _elem286 = Partition() - _elem286.read(iprot) - self.success.append(_elem286) + (_etype291, _size288) = iprot.readListBegin() + for _i292 in xrange(_size288): + _elem293 = Partition() + _elem293.read(iprot) + self.success.append(_elem293) iprot.readListEnd() else: iprot.skip(ftype) @@ -8462,8 +8718,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter287 in self.success: - iter287.write(oprot) + for iter294 in self.success: + iter294.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -8549,10 +8805,10 @@ elif fid == 5: if ftype == TType.LIST: self.group_names = [] - (_etype291, _size288) = iprot.readListBegin() - for _i292 in xrange(_size288): - _elem293 = iprot.readString(); - self.group_names.append(_elem293) + (_etype298, _size295) = iprot.readListBegin() + for _i299 in xrange(_size295): + _elem300 = iprot.readString(); + self.group_names.append(_elem300) iprot.readListEnd() else: iprot.skip(ftype) @@ -8585,8 +8841,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter294 in self.group_names: - oprot.writeString(iter294) + for iter301 in self.group_names: + oprot.writeString(iter301) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8637,11 +8893,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) @@ -8670,8 +8926,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: @@ -8810,10 +9066,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype305, _size302) = iprot.readListBegin() - for _i306 in xrange(_size302): - _elem307 = iprot.readString(); - self.success.append(_elem307) + (_etype312, _size309) = iprot.readListBegin() + for _i313 in xrange(_size309): + _elem314 = iprot.readString(); + self.success.append(_elem314) iprot.readListEnd() else: iprot.skip(ftype) @@ -8836,8 +9092,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter308 in self.success: - oprot.writeString(iter308) + for iter315 in self.success: + oprot.writeString(iter315) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: @@ -8906,10 +9162,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype312, _size309) = iprot.readListBegin() - for _i313 in xrange(_size309): - _elem314 = iprot.readString(); - self.part_vals.append(_elem314) + (_etype319, _size316) = iprot.readListBegin() + for _i320 in xrange(_size316): + _elem321 = iprot.readString(); + self.part_vals.append(_elem321) iprot.readListEnd() else: iprot.skip(ftype) @@ -8939,8 +9195,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter315 in self.part_vals: - oprot.writeString(iter315) + for iter322 in self.part_vals: + oprot.writeString(iter322) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -8992,11 +9248,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) @@ -9019,8 +9275,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: @@ -9095,10 +9351,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) @@ -9115,10 +9371,10 @@ elif fid == 6: if ftype == TType.LIST: self.group_names = [] - (_etype332, _size329) = iprot.readListBegin() - for _i333 in xrange(_size329): - _elem334 = iprot.readString(); - self.group_names.append(_elem334) + (_etype339, _size336) = iprot.readListBegin() + for _i340 in xrange(_size336): + _elem341 = iprot.readString(); + self.group_names.append(_elem341) iprot.readListEnd() else: iprot.skip(ftype) @@ -9143,8 +9399,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter335 in self.part_vals: - oprot.writeString(iter335) + for iter342 in self.part_vals: + oprot.writeString(iter342) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -9158,8 +9414,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 6) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter336 in self.group_names: - oprot.writeString(iter336) + for iter343 in self.group_names: + oprot.writeString(iter343) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9210,11 +9466,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) @@ -9243,8 +9499,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: @@ -9317,10 +9573,10 @@ elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype347, _size344) = iprot.readListBegin() - for _i348 in xrange(_size344): - _elem349 = iprot.readString(); - self.part_vals.append(_elem349) + (_etype354, _size351) = iprot.readListBegin() + for _i355 in xrange(_size351): + _elem356 = iprot.readString(); + self.part_vals.append(_elem356) iprot.readListEnd() else: iprot.skip(ftype) @@ -9350,8 +9606,8 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter350 in self.part_vals: - oprot.writeString(iter350) + for iter357 in self.part_vals: + oprot.writeString(iter357) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts != None: @@ -9403,10 +9659,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype354, _size351) = iprot.readListBegin() - for _i355 in xrange(_size351): - _elem356 = iprot.readString(); - self.success.append(_elem356) + (_etype361, _size358) = iprot.readListBegin() + for _i362 in xrange(_size358): + _elem363 = iprot.readString(); + self.success.append(_elem363) iprot.readListEnd() else: iprot.skip(ftype) @@ -9429,8 +9685,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter357 in self.success: - oprot.writeString(iter357) + for iter364 in self.success: + oprot.writeString(iter364) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -9580,11 +9836,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype361, _size358) = iprot.readListBegin() - for _i362 in xrange(_size358): - _elem363 = Partition() - _elem363.read(iprot) - self.success.append(_elem363) + (_etype368, _size365) = iprot.readListBegin() + for _i369 in xrange(_size365): + _elem370 = Partition() + _elem370.read(iprot) + self.success.append(_elem370) iprot.readListEnd() else: iprot.skip(ftype) @@ -9613,8 +9869,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter364 in self.success: - iter364.write(oprot) + for iter371 in self.success: + iter371.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -9684,10 +9940,10 @@ elif fid == 3: if ftype == TType.LIST: self.names = [] - (_etype368, _size365) = iprot.readListBegin() - for _i369 in xrange(_size365): - _elem370 = iprot.readString(); - self.names.append(_elem370) + (_etype375, _size372) = iprot.readListBegin() + for _i376 in xrange(_size372): + _elem377 = iprot.readString(); + self.names.append(_elem377) iprot.readListEnd() else: iprot.skip(ftype) @@ -9712,8 +9968,8 @@ if self.names != None: oprot.writeFieldBegin('names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.names)) - for iter371 in self.names: - oprot.writeString(iter371) + for iter378 in self.names: + oprot.writeString(iter378) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9764,11 +10020,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype375, _size372) = iprot.readListBegin() - for _i376 in xrange(_size372): - _elem377 = Partition() - _elem377.read(iprot) - self.success.append(_elem377) + (_etype382, _size379) = iprot.readListBegin() + for _i383 in xrange(_size379): + _elem384 = Partition() + _elem384.read(iprot) + self.success.append(_elem384) iprot.readListEnd() else: iprot.skip(ftype) @@ -9797,8 +10053,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter378 in self.success: - iter378.write(oprot) + for iter385 in self.success: + iter385.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -10212,10 +10468,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype382, _size379) = iprot.readListBegin() - for _i383 in xrange(_size379): - _elem384 = iprot.readString(); - self.success.append(_elem384) + (_etype389, _size386) = iprot.readListBegin() + for _i390 in xrange(_size386): + _elem391 = iprot.readString(); + self.success.append(_elem391) iprot.readListEnd() else: iprot.skip(ftype) @@ -10238,8 +10494,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter385 in self.success: - oprot.writeString(iter385) + for iter392 in self.success: + oprot.writeString(iter392) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -10350,11 +10606,11 @@ if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype387, _vtype388, _size386 ) = iprot.readMapBegin() - for _i390 in xrange(_size386): - _key391 = iprot.readString(); - _val392 = iprot.readString(); - self.success[_key391] = _val392 + (_ktype394, _vtype395, _size393 ) = iprot.readMapBegin() + for _i397 in xrange(_size393): + _key398 = iprot.readString(); + _val399 = iprot.readString(); + self.success[_key398] = _val399 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10377,9 +10633,9 @@ if self.success != None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter393,viter394 in self.success.items(): - oprot.writeString(kiter393) - oprot.writeString(viter394) + for kiter400,viter401 in self.success.items(): + oprot.writeString(kiter400) + oprot.writeString(viter401) oprot.writeMapEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -10448,11 +10704,11 @@ elif fid == 3: if ftype == TType.MAP: self.part_vals = {} - (_ktype396, _vtype397, _size395 ) = iprot.readMapBegin() - for _i399 in xrange(_size395): - _key400 = iprot.readString(); - _val401 = iprot.readString(); - self.part_vals[_key400] = _val401 + (_ktype403, _vtype404, _size402 ) = iprot.readMapBegin() + for _i406 in xrange(_size402): + _key407 = iprot.readString(); + _val408 = iprot.readString(); + self.part_vals[_key407] = _val408 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10482,9 +10738,9 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) - for kiter402,viter403 in self.part_vals.items(): - oprot.writeString(kiter402) - oprot.writeString(viter403) + for kiter409,viter410 in self.part_vals.items(): + oprot.writeString(kiter409) + oprot.writeString(viter410) oprot.writeMapEnd() oprot.writeFieldEnd() if self.eventType != None: @@ -10678,11 +10934,11 @@ elif fid == 3: if ftype == TType.MAP: self.part_vals = {} - (_ktype405, _vtype406, _size404 ) = iprot.readMapBegin() - for _i408 in xrange(_size404): - _key409 = iprot.readString(); - _val410 = iprot.readString(); - self.part_vals[_key409] = _val410 + (_ktype412, _vtype413, _size411 ) = iprot.readMapBegin() + for _i415 in xrange(_size411): + _key416 = iprot.readString(); + _val417 = iprot.readString(); + self.part_vals[_key416] = _val417 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10712,9 +10968,9 @@ if self.part_vals != None: oprot.writeFieldBegin('part_vals', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) - for kiter411,viter412 in self.part_vals.items(): - oprot.writeString(kiter411) - oprot.writeString(viter412) + for kiter418,viter419 in self.part_vals.items(): + oprot.writeString(kiter418) + oprot.writeString(viter419) oprot.writeMapEnd() oprot.writeFieldEnd() if self.eventType != None: @@ -11675,11 +11931,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype416, _size413) = iprot.readListBegin() - for _i417 in xrange(_size413): - _elem418 = Index() - _elem418.read(iprot) - self.success.append(_elem418) + (_etype423, _size420) = iprot.readListBegin() + for _i424 in xrange(_size420): + _elem425 = Index() + _elem425.read(iprot) + self.success.append(_elem425) iprot.readListEnd() else: iprot.skip(ftype) @@ -11708,8 +11964,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter419 in self.success: - iter419.write(oprot) + for iter426 in self.success: + iter426.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -11848,10 +12104,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype423, _size420) = iprot.readListBegin() - for _i424 in xrange(_size420): - _elem425 = iprot.readString(); - self.success.append(_elem425) + (_etype430, _size427) = iprot.readListBegin() + for _i431 in xrange(_size427): + _elem432 = iprot.readString(); + self.success.append(_elem432) iprot.readListEnd() else: iprot.skip(ftype) @@ -11874,8 +12130,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter426 in self.success: - oprot.writeString(iter426) + for iter433 in self.success: + oprot.writeString(iter433) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: @@ -12229,10 +12485,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype430, _size427) = iprot.readListBegin() - for _i431 in xrange(_size427): - _elem432 = iprot.readString(); - self.success.append(_elem432) + (_etype437, _size434) = iprot.readListBegin() + for _i438 in xrange(_size434): + _elem439 = iprot.readString(); + self.success.append(_elem439) iprot.readListEnd() else: iprot.skip(ftype) @@ -12255,8 +12511,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter433 in self.success: - oprot.writeString(iter433) + for iter440 in self.success: + oprot.writeString(iter440) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -12723,11 +12979,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype437, _size434) = iprot.readListBegin() - for _i438 in xrange(_size434): - _elem439 = Role() - _elem439.read(iprot) - self.success.append(_elem439) + (_etype444, _size441) = iprot.readListBegin() + for _i445 in xrange(_size441): + _elem446 = Role() + _elem446.read(iprot) + self.success.append(_elem446) iprot.readListEnd() else: iprot.skip(ftype) @@ -12750,8 +13006,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter440 in self.success: - iter440.write(oprot) + for iter447 in self.success: + iter447.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -12818,10 +13074,10 @@ elif fid == 3: if ftype == TType.LIST: self.group_names = [] - (_etype444, _size441) = iprot.readListBegin() - for _i445 in xrange(_size441): - _elem446 = iprot.readString(); - self.group_names.append(_elem446) + (_etype451, _size448) = iprot.readListBegin() + for _i452 in xrange(_size448): + _elem453 = iprot.readString(); + self.group_names.append(_elem453) iprot.readListEnd() else: iprot.skip(ftype) @@ -12846,8 +13102,8 @@ if self.group_names != None: oprot.writeFieldBegin('group_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter447 in self.group_names: - oprot.writeString(iter447) + for iter454 in self.group_names: + oprot.writeString(iter454) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13051,11 +13307,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype451, _size448) = iprot.readListBegin() - for _i452 in xrange(_size448): - _elem453 = HiveObjectPrivilege() - _elem453.read(iprot) - self.success.append(_elem453) + (_etype458, _size455) = iprot.readListBegin() + for _i459 in xrange(_size455): + _elem460 = HiveObjectPrivilege() + _elem460.read(iprot) + self.success.append(_elem460) iprot.readListEnd() else: iprot.skip(ftype) @@ -13078,8 +13334,8 @@ if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter454 in self.success: - iter454.write(oprot) + for iter461 in self.success: + iter461.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 1150966) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -39,6 +39,7 @@ print ' get_all_tables(string db_name)' print ' Table get_table(string dbname, string tbl_name)' print ' get_table_objects_by_name(string dbname, tbl_names)' + print ' get_table_names_by_filter(string dbname, string filter, i16 max_tables)' print ' void alter_table(string dbname, string tbl_name, Table new_tbl)' print ' Partition add_partition(Partition new_part)' print ' i32 add_partitions( new_parts)' @@ -240,6 +241,12 @@ sys.exit(1) pp.pprint(client.get_table_objects_by_name(args[0],eval(args[1]),)) +elif cmd == 'get_table_names_by_filter': + if len(args) != 3: + print 'get_table_names_by_filter requires 3 args' + sys.exit(1) + pp.pprint(client.get_table_names_by_filter(args[0],args[1],eval(args[2]),)) + elif cmd == 'alter_table': if len(args) != 3: print 'alter_table requires 3 args' Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h (revision 1150966) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h (working copy) @@ -15,6 +15,9 @@ hive_metastoreConstants(); std::string DDL_TIME; + std::string HIVE_FILTER_FIELD_OWNER; + std::string HIVE_FILTER_FIELD_PARAMS; + std::string HIVE_FILTER_FIELD_LAST_ACCESS; std::string IS_ARCHIVED; std::string ORIGINAL_LOCATION; std::string META_TABLE_COLUMNS; Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (revision 1150966) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (working copy) @@ -3948,6 +3948,284 @@ return xfer; } +uint32_t ThriftHiveMetastore_get_table_names_by_filter_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->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_tables); + this->__isset.max_tables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_filter_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->filter); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_tables", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_tables); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_filter_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbname))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->filter))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_tables", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_tables))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size254; + ::apache::thrift::protocol::TType _etype257; + iprot->readListBegin(_etype257, _size254); + this->success.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) + { + xfer += iprot->readString(this->success[_i258]); + } + 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_filter_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter259; + for (_iter259 = this->success.begin(); _iter259 != this->success.end(); ++_iter259) + { + xfer += oprot->writeString((*_iter259)); + } + 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(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size260; + ::apache::thrift::protocol::TType _etype263; + iprot->readListBegin(_etype263, _size260); + (*(this->success)).resize(_size260); + uint32_t _i264; + for (_i264 = 0; _i264 < _size260; ++_i264) + { + xfer += iprot->readString((*(this->success))[_i264]); + } + 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + uint32_t ThriftHiveMetastore_alter_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; @@ -4396,14 +4674,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->new_parts.clear(); - uint32_t _size254; - ::apache::thrift::protocol::TType _etype257; - iprot->readListBegin(_etype257, _size254); - this->new_parts.resize(_size254); - uint32_t _i258; - for (_i258 = 0; _i258 < _size254; ++_i258) + uint32_t _size265; + ::apache::thrift::protocol::TType _etype268; + iprot->readListBegin(_etype268, _size265); + this->new_parts.resize(_size265); + uint32_t _i269; + for (_i269 = 0; _i269 < _size265; ++_i269) { - xfer += this->new_parts[_i258].read(iprot); + xfer += this->new_parts[_i269].read(iprot); } iprot->readListEnd(); } @@ -4430,10 +4708,10 @@ xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->new_parts.size()); - std::vector ::const_iterator _iter259; - for (_iter259 = this->new_parts.begin(); _iter259 != this->new_parts.end(); ++_iter259) + std::vector ::const_iterator _iter270; + for (_iter270 = this->new_parts.begin(); _iter270 != this->new_parts.end(); ++_iter270) { - xfer += (*_iter259).write(oprot); + xfer += (*_iter270).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4449,10 +4727,10 @@ xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, (*(this->new_parts)).size()); - std::vector ::const_iterator _iter260; - for (_iter260 = (*(this->new_parts)).begin(); _iter260 != (*(this->new_parts)).end(); ++_iter260) + std::vector ::const_iterator _iter271; + for (_iter271 = (*(this->new_parts)).begin(); _iter271 != (*(this->new_parts)).end(); ++_iter271) { - xfer += (*_iter260).write(oprot); + xfer += (*_iter271).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4658,14 +4936,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - 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) + uint32_t _size272; + ::apache::thrift::protocol::TType _etype275; + iprot->readListBegin(_etype275, _size272); + this->part_vals.resize(_size272); + uint32_t _i276; + for (_i276 = 0; _i276 < _size272; ++_i276) { - xfer += iprot->readString(this->part_vals[_i265]); + xfer += iprot->readString(this->part_vals[_i276]); } iprot->readListEnd(); } @@ -4698,10 +4976,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 _iter266; - for (_iter266 = this->part_vals.begin(); _iter266 != this->part_vals.end(); ++_iter266) + std::vector ::const_iterator _iter277; + for (_iter277 = this->part_vals.begin(); _iter277 != this->part_vals.end(); ++_iter277) { - xfer += oprot->writeString((*_iter266)); + xfer += oprot->writeString((*_iter277)); } xfer += oprot->writeListEnd(); } @@ -4723,10 +5001,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(); } @@ -5178,14 +5456,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - 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) + uint32_t _size279; + ::apache::thrift::protocol::TType _etype282; + iprot->readListBegin(_etype282, _size279); + this->part_vals.resize(_size279); + uint32_t _i283; + for (_i283 = 0; _i283 < _size279; ++_i283) { - xfer += iprot->readString(this->part_vals[_i272]); + xfer += iprot->readString(this->part_vals[_i283]); } iprot->readListEnd(); } @@ -5226,10 +5504,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 _iter273; - for (_iter273 = this->part_vals.begin(); _iter273 != this->part_vals.end(); ++_iter273) + std::vector ::const_iterator _iter284; + for (_iter284 = this->part_vals.begin(); _iter284 != this->part_vals.end(); ++_iter284) { - xfer += oprot->writeString((*_iter273)); + xfer += oprot->writeString((*_iter284)); } xfer += oprot->writeListEnd(); } @@ -5254,10 +5532,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 _iter274; - for (_iter274 = (*(this->part_vals)).begin(); _iter274 != (*(this->part_vals)).end(); ++_iter274) + std::vector ::const_iterator _iter285; + for (_iter285 = (*(this->part_vals)).begin(); _iter285 != (*(this->part_vals)).end(); ++_iter285) { - xfer += oprot->writeString((*_iter274)); + xfer += oprot->writeString((*_iter285)); } xfer += oprot->writeListEnd(); } @@ -5686,14 +5964,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size275; - ::apache::thrift::protocol::TType _etype278; - iprot->readListBegin(_etype278, _size275); - this->part_vals.resize(_size275); - uint32_t _i279; - for (_i279 = 0; _i279 < _size275; ++_i279) + uint32_t _size286; + ::apache::thrift::protocol::TType _etype289; + iprot->readListBegin(_etype289, _size286); + this->part_vals.resize(_size286); + uint32_t _i290; + for (_i290 = 0; _i290 < _size286; ++_i290) { - xfer += iprot->readString(this->part_vals[_i279]); + xfer += iprot->readString(this->part_vals[_i290]); } iprot->readListEnd(); } @@ -5726,10 +6004,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 _iter280; - for (_iter280 = this->part_vals.begin(); _iter280 != this->part_vals.end(); ++_iter280) + std::vector ::const_iterator _iter291; + for (_iter291 = this->part_vals.begin(); _iter291 != this->part_vals.end(); ++_iter291) { - xfer += oprot->writeString((*_iter280)); + xfer += oprot->writeString((*_iter291)); } xfer += oprot->writeListEnd(); } @@ -5751,10 +6029,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 _iter281; - for (_iter281 = (*(this->part_vals)).begin(); _iter281 != (*(this->part_vals)).end(); ++_iter281) + std::vector ::const_iterator _iter292; + for (_iter292 = (*(this->part_vals)).begin(); _iter292 != (*(this->part_vals)).end(); ++_iter292) { - xfer += oprot->writeString((*_iter281)); + xfer += oprot->writeString((*_iter292)); } xfer += oprot->writeListEnd(); } @@ -5940,14 +6218,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size282; - ::apache::thrift::protocol::TType _etype285; - iprot->readListBegin(_etype285, _size282); - this->part_vals.resize(_size282); - uint32_t _i286; - for (_i286 = 0; _i286 < _size282; ++_i286) + uint32_t _size293; + ::apache::thrift::protocol::TType _etype296; + iprot->readListBegin(_etype296, _size293); + this->part_vals.resize(_size293); + uint32_t _i297; + for (_i297 = 0; _i297 < _size293; ++_i297) { - xfer += iprot->readString(this->part_vals[_i286]); + xfer += iprot->readString(this->part_vals[_i297]); } iprot->readListEnd(); } @@ -5968,14 +6246,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size287; - ::apache::thrift::protocol::TType _etype290; - iprot->readListBegin(_etype290, _size287); - this->group_names.resize(_size287); - uint32_t _i291; - for (_i291 = 0; _i291 < _size287; ++_i291) + uint32_t _size298; + ::apache::thrift::protocol::TType _etype301; + iprot->readListBegin(_etype301, _size298); + this->group_names.resize(_size298); + uint32_t _i302; + for (_i302 = 0; _i302 < _size298; ++_i302) { - xfer += iprot->readString(this->group_names[_i291]); + xfer += iprot->readString(this->group_names[_i302]); } iprot->readListEnd(); } @@ -6008,10 +6286,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 _iter292; - for (_iter292 = this->part_vals.begin(); _iter292 != this->part_vals.end(); ++_iter292) + std::vector ::const_iterator _iter303; + for (_iter303 = this->part_vals.begin(); _iter303 != this->part_vals.end(); ++_iter303) { - xfer += oprot->writeString((*_iter292)); + xfer += oprot->writeString((*_iter303)); } xfer += oprot->writeListEnd(); } @@ -6022,10 +6300,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 _iter293; - for (_iter293 = this->group_names.begin(); _iter293 != this->group_names.end(); ++_iter293) + std::vector ::const_iterator _iter304; + for (_iter304 = this->group_names.begin(); _iter304 != this->group_names.end(); ++_iter304) { - xfer += oprot->writeString((*_iter293)); + xfer += oprot->writeString((*_iter304)); } xfer += oprot->writeListEnd(); } @@ -6047,10 +6325,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 _iter294; - for (_iter294 = (*(this->part_vals)).begin(); _iter294 != (*(this->part_vals)).end(); ++_iter294) + std::vector ::const_iterator _iter305; + for (_iter305 = (*(this->part_vals)).begin(); _iter305 != (*(this->part_vals)).end(); ++_iter305) { - xfer += oprot->writeString((*_iter294)); + xfer += oprot->writeString((*_iter305)); } xfer += oprot->writeListEnd(); } @@ -6061,10 +6339,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 _iter295; - for (_iter295 = (*(this->group_names)).begin(); _iter295 != (*(this->group_names)).end(); ++_iter295) + std::vector ::const_iterator _iter306; + for (_iter306 = (*(this->group_names)).begin(); _iter306 != (*(this->group_names)).end(); ++_iter306) { - xfer += oprot->writeString((*_iter295)); + xfer += oprot->writeString((*_iter306)); } xfer += oprot->writeListEnd(); } @@ -6550,14 +6828,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size296; - ::apache::thrift::protocol::TType _etype299; - iprot->readListBegin(_etype299, _size296); - this->success.resize(_size296); - uint32_t _i300; - for (_i300 = 0; _i300 < _size296; ++_i300) + uint32_t _size307; + ::apache::thrift::protocol::TType _etype310; + iprot->readListBegin(_etype310, _size307); + this->success.resize(_size307); + uint32_t _i311; + for (_i311 = 0; _i311 < _size307; ++_i311) { - xfer += this->success[_i300].read(iprot); + xfer += this->success[_i311].read(iprot); } iprot->readListEnd(); } @@ -6604,10 +6882,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 _iter301; - for (_iter301 = this->success.begin(); _iter301 != this->success.end(); ++_iter301) + std::vector ::const_iterator _iter312; + for (_iter312 = this->success.begin(); _iter312 != this->success.end(); ++_iter312) { - xfer += (*_iter301).write(oprot); + xfer += (*_iter312).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6650,14 +6928,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size302; - ::apache::thrift::protocol::TType _etype305; - iprot->readListBegin(_etype305, _size302); - (*(this->success)).resize(_size302); - uint32_t _i306; - for (_i306 = 0; _i306 < _size302; ++_i306) + uint32_t _size313; + ::apache::thrift::protocol::TType _etype316; + iprot->readListBegin(_etype316, _size313); + (*(this->success)).resize(_size313); + uint32_t _i317; + for (_i317 = 0; _i317 < _size313; ++_i317) { - xfer += (*(this->success))[_i306].read(iprot); + xfer += (*(this->success))[_i317].read(iprot); } iprot->readListEnd(); } @@ -6750,14 +7028,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size307; - ::apache::thrift::protocol::TType _etype310; - iprot->readListBegin(_etype310, _size307); - this->group_names.resize(_size307); - uint32_t _i311; - for (_i311 = 0; _i311 < _size307; ++_i311) + uint32_t _size318; + ::apache::thrift::protocol::TType _etype321; + iprot->readListBegin(_etype321, _size318); + this->group_names.resize(_size318); + uint32_t _i322; + for (_i322 = 0; _i322 < _size318; ++_i322) { - xfer += iprot->readString(this->group_names[_i311]); + xfer += iprot->readString(this->group_names[_i322]); } iprot->readListEnd(); } @@ -6796,10 +7074,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 _iter312; - for (_iter312 = this->group_names.begin(); _iter312 != this->group_names.end(); ++_iter312) + std::vector ::const_iterator _iter323; + for (_iter323 = this->group_names.begin(); _iter323 != this->group_names.end(); ++_iter323) { - xfer += oprot->writeString((*_iter312)); + xfer += oprot->writeString((*_iter323)); } xfer += oprot->writeListEnd(); } @@ -6827,10 +7105,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 _iter313; - for (_iter313 = (*(this->group_names)).begin(); _iter313 != (*(this->group_names)).end(); ++_iter313) + std::vector ::const_iterator _iter324; + for (_iter324 = (*(this->group_names)).begin(); _iter324 != (*(this->group_names)).end(); ++_iter324) { - xfer += oprot->writeString((*_iter313)); + xfer += oprot->writeString((*_iter324)); } xfer += oprot->writeListEnd(); } @@ -6864,14 +7142,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size314; - ::apache::thrift::protocol::TType _etype317; - iprot->readListBegin(_etype317, _size314); - this->success.resize(_size314); - uint32_t _i318; - for (_i318 = 0; _i318 < _size314; ++_i318) + uint32_t _size325; + ::apache::thrift::protocol::TType _etype328; + iprot->readListBegin(_etype328, _size325); + this->success.resize(_size325); + uint32_t _i329; + for (_i329 = 0; _i329 < _size325; ++_i329) { - xfer += this->success[_i318].read(iprot); + xfer += this->success[_i329].read(iprot); } iprot->readListEnd(); } @@ -6918,10 +7196,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 _iter319; - for (_iter319 = this->success.begin(); _iter319 != this->success.end(); ++_iter319) + std::vector ::const_iterator _iter330; + for (_iter330 = this->success.begin(); _iter330 != this->success.end(); ++_iter330) { - xfer += (*_iter319).write(oprot); + xfer += (*_iter330).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6964,14 +7242,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size320; - ::apache::thrift::protocol::TType _etype323; - iprot->readListBegin(_etype323, _size320); - (*(this->success)).resize(_size320); - uint32_t _i324; - for (_i324 = 0; _i324 < _size320; ++_i324) + uint32_t _size331; + ::apache::thrift::protocol::TType _etype334; + iprot->readListBegin(_etype334, _size331); + (*(this->success)).resize(_size331); + uint32_t _i335; + for (_i335 = 0; _i335 < _size331; ++_i335) { - xfer += (*(this->success))[_i324].read(iprot); + xfer += (*(this->success))[_i335].read(iprot); } iprot->readListEnd(); } @@ -7122,14 +7400,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size325; - ::apache::thrift::protocol::TType _etype328; - iprot->readListBegin(_etype328, _size325); - this->success.resize(_size325); - uint32_t _i329; - for (_i329 = 0; _i329 < _size325; ++_i329) + uint32_t _size336; + ::apache::thrift::protocol::TType _etype339; + iprot->readListBegin(_etype339, _size336); + this->success.resize(_size336); + uint32_t _i340; + for (_i340 = 0; _i340 < _size336; ++_i340) { - xfer += iprot->readString(this->success[_i329]); + xfer += iprot->readString(this->success[_i340]); } iprot->readListEnd(); } @@ -7168,10 +7446,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 _iter330; - for (_iter330 = this->success.begin(); _iter330 != this->success.end(); ++_iter330) + std::vector ::const_iterator _iter341; + for (_iter341 = this->success.begin(); _iter341 != this->success.end(); ++_iter341) { - xfer += oprot->writeString((*_iter330)); + xfer += oprot->writeString((*_iter341)); } xfer += oprot->writeListEnd(); } @@ -7210,14 +7488,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size331; - ::apache::thrift::protocol::TType _etype334; - iprot->readListBegin(_etype334, _size331); - (*(this->success)).resize(_size331); - uint32_t _i335; - for (_i335 = 0; _i335 < _size331; ++_i335) + uint32_t _size342; + ::apache::thrift::protocol::TType _etype345; + iprot->readListBegin(_etype345, _size342); + (*(this->success)).resize(_size342); + uint32_t _i346; + for (_i346 = 0; _i346 < _size342; ++_i346) { - xfer += iprot->readString((*(this->success))[_i335]); + xfer += iprot->readString((*(this->success))[_i346]); } iprot->readListEnd(); } @@ -7286,14 +7564,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size336; - ::apache::thrift::protocol::TType _etype339; - iprot->readListBegin(_etype339, _size336); - this->part_vals.resize(_size336); - uint32_t _i340; - for (_i340 = 0; _i340 < _size336; ++_i340) + uint32_t _size347; + ::apache::thrift::protocol::TType _etype350; + iprot->readListBegin(_etype350, _size347); + this->part_vals.resize(_size347); + uint32_t _i351; + for (_i351 = 0; _i351 < _size347; ++_i351) { - xfer += iprot->readString(this->part_vals[_i340]); + xfer += iprot->readString(this->part_vals[_i351]); } iprot->readListEnd(); } @@ -7334,10 +7612,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(); } @@ -7362,10 +7640,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 _iter342; - for (_iter342 = (*(this->part_vals)).begin(); _iter342 != (*(this->part_vals)).end(); ++_iter342) + std::vector ::const_iterator _iter353; + for (_iter353 = (*(this->part_vals)).begin(); _iter353 != (*(this->part_vals)).end(); ++_iter353) { - xfer += oprot->writeString((*_iter342)); + xfer += oprot->writeString((*_iter353)); } xfer += oprot->writeListEnd(); } @@ -7402,14 +7680,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(); } @@ -7448,10 +7726,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(); } @@ -7490,14 +7768,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(); } @@ -7566,14 +7844,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(); } @@ -7602,14 +7880,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size359; - ::apache::thrift::protocol::TType _etype362; - iprot->readListBegin(_etype362, _size359); - this->group_names.resize(_size359); - uint32_t _i363; - for (_i363 = 0; _i363 < _size359; ++_i363) + uint32_t _size370; + ::apache::thrift::protocol::TType _etype373; + iprot->readListBegin(_etype373, _size370); + this->group_names.resize(_size370); + uint32_t _i374; + for (_i374 = 0; _i374 < _size370; ++_i374) { - xfer += iprot->readString(this->group_names[_i363]); + xfer += iprot->readString(this->group_names[_i374]); } iprot->readListEnd(); } @@ -7642,10 +7920,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 _iter364; - for (_iter364 = this->part_vals.begin(); _iter364 != this->part_vals.end(); ++_iter364) + std::vector ::const_iterator _iter375; + for (_iter375 = this->part_vals.begin(); _iter375 != this->part_vals.end(); ++_iter375) { - xfer += oprot->writeString((*_iter364)); + xfer += oprot->writeString((*_iter375)); } xfer += oprot->writeListEnd(); } @@ -7659,10 +7937,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 _iter365; - for (_iter365 = this->group_names.begin(); _iter365 != this->group_names.end(); ++_iter365) + std::vector ::const_iterator _iter376; + for (_iter376 = this->group_names.begin(); _iter376 != this->group_names.end(); ++_iter376) { - xfer += oprot->writeString((*_iter365)); + xfer += oprot->writeString((*_iter376)); } xfer += oprot->writeListEnd(); } @@ -7684,10 +7962,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 _iter366; - for (_iter366 = (*(this->part_vals)).begin(); _iter366 != (*(this->part_vals)).end(); ++_iter366) + std::vector ::const_iterator _iter377; + for (_iter377 = (*(this->part_vals)).begin(); _iter377 != (*(this->part_vals)).end(); ++_iter377) { - xfer += oprot->writeString((*_iter366)); + xfer += oprot->writeString((*_iter377)); } xfer += oprot->writeListEnd(); } @@ -7701,10 +7979,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 _iter367; - for (_iter367 = (*(this->group_names)).begin(); _iter367 != (*(this->group_names)).end(); ++_iter367) + std::vector ::const_iterator _iter378; + for (_iter378 = (*(this->group_names)).begin(); _iter378 != (*(this->group_names)).end(); ++_iter378) { - xfer += oprot->writeString((*_iter367)); + xfer += oprot->writeString((*_iter378)); } xfer += oprot->writeListEnd(); } @@ -7738,14 +8016,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size368; - ::apache::thrift::protocol::TType _etype371; - iprot->readListBegin(_etype371, _size368); - this->success.resize(_size368); - uint32_t _i372; - for (_i372 = 0; _i372 < _size368; ++_i372) + uint32_t _size379; + ::apache::thrift::protocol::TType _etype382; + iprot->readListBegin(_etype382, _size379); + this->success.resize(_size379); + uint32_t _i383; + for (_i383 = 0; _i383 < _size379; ++_i383) { - xfer += this->success[_i372].read(iprot); + xfer += this->success[_i383].read(iprot); } iprot->readListEnd(); } @@ -7792,10 +8070,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 _iter373; - for (_iter373 = this->success.begin(); _iter373 != this->success.end(); ++_iter373) + std::vector ::const_iterator _iter384; + for (_iter384 = this->success.begin(); _iter384 != this->success.end(); ++_iter384) { - xfer += (*_iter373).write(oprot); + xfer += (*_iter384).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7838,14 +8116,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size374; - ::apache::thrift::protocol::TType _etype377; - iprot->readListBegin(_etype377, _size374); - (*(this->success)).resize(_size374); - uint32_t _i378; - for (_i378 = 0; _i378 < _size374; ++_i378) + uint32_t _size385; + ::apache::thrift::protocol::TType _etype388; + iprot->readListBegin(_etype388, _size385); + (*(this->success)).resize(_size385); + uint32_t _i389; + for (_i389 = 0; _i389 < _size385; ++_i389) { - xfer += (*(this->success))[_i378].read(iprot); + xfer += (*(this->success))[_i389].read(iprot); } iprot->readListEnd(); } @@ -7922,14 +8200,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size379; - ::apache::thrift::protocol::TType _etype382; - iprot->readListBegin(_etype382, _size379); - this->part_vals.resize(_size379); - uint32_t _i383; - for (_i383 = 0; _i383 < _size379; ++_i383) + uint32_t _size390; + ::apache::thrift::protocol::TType _etype393; + iprot->readListBegin(_etype393, _size390); + this->part_vals.resize(_size390); + uint32_t _i394; + for (_i394 = 0; _i394 < _size390; ++_i394) { - xfer += iprot->readString(this->part_vals[_i383]); + xfer += iprot->readString(this->part_vals[_i394]); } iprot->readListEnd(); } @@ -7970,10 +8248,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 _iter384; - for (_iter384 = this->part_vals.begin(); _iter384 != this->part_vals.end(); ++_iter384) + std::vector ::const_iterator _iter395; + for (_iter395 = this->part_vals.begin(); _iter395 != this->part_vals.end(); ++_iter395) { - xfer += oprot->writeString((*_iter384)); + xfer += oprot->writeString((*_iter395)); } xfer += oprot->writeListEnd(); } @@ -7998,10 +8276,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 _iter385; - for (_iter385 = (*(this->part_vals)).begin(); _iter385 != (*(this->part_vals)).end(); ++_iter385) + std::vector ::const_iterator _iter396; + for (_iter396 = (*(this->part_vals)).begin(); _iter396 != (*(this->part_vals)).end(); ++_iter396) { - xfer += oprot->writeString((*_iter385)); + xfer += oprot->writeString((*_iter396)); } xfer += oprot->writeListEnd(); } @@ -8038,14 +8316,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size386; - ::apache::thrift::protocol::TType _etype389; - iprot->readListBegin(_etype389, _size386); - this->success.resize(_size386); - uint32_t _i390; - for (_i390 = 0; _i390 < _size386; ++_i390) + uint32_t _size397; + ::apache::thrift::protocol::TType _etype400; + iprot->readListBegin(_etype400, _size397); + this->success.resize(_size397); + uint32_t _i401; + for (_i401 = 0; _i401 < _size397; ++_i401) { - xfer += iprot->readString(this->success[_i390]); + xfer += iprot->readString(this->success[_i401]); } iprot->readListEnd(); } @@ -8084,10 +8362,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 _iter391; - for (_iter391 = this->success.begin(); _iter391 != this->success.end(); ++_iter391) + std::vector ::const_iterator _iter402; + for (_iter402 = this->success.begin(); _iter402 != this->success.end(); ++_iter402) { - xfer += oprot->writeString((*_iter391)); + xfer += oprot->writeString((*_iter402)); } xfer += oprot->writeListEnd(); } @@ -8126,14 +8404,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size392; - ::apache::thrift::protocol::TType _etype395; - iprot->readListBegin(_etype395, _size392); - (*(this->success)).resize(_size392); - uint32_t _i396; - for (_i396 = 0; _i396 < _size392; ++_i396) + uint32_t _size403; + ::apache::thrift::protocol::TType _etype406; + iprot->readListBegin(_etype406, _size403); + (*(this->success)).resize(_size403); + uint32_t _i407; + for (_i407 = 0; _i407 < _size403; ++_i407) { - xfer += iprot->readString((*(this->success))[_i396]); + xfer += iprot->readString((*(this->success))[_i407]); } iprot->readListEnd(); } @@ -8290,14 +8568,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size397; - ::apache::thrift::protocol::TType _etype400; - iprot->readListBegin(_etype400, _size397); - this->success.resize(_size397); - uint32_t _i401; - for (_i401 = 0; _i401 < _size397; ++_i401) + uint32_t _size408; + ::apache::thrift::protocol::TType _etype411; + iprot->readListBegin(_etype411, _size408); + this->success.resize(_size408); + uint32_t _i412; + for (_i412 = 0; _i412 < _size408; ++_i412) { - xfer += this->success[_i401].read(iprot); + xfer += this->success[_i412].read(iprot); } iprot->readListEnd(); } @@ -8344,10 +8622,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 _iter402; - for (_iter402 = this->success.begin(); _iter402 != this->success.end(); ++_iter402) + std::vector ::const_iterator _iter413; + for (_iter413 = this->success.begin(); _iter413 != this->success.end(); ++_iter413) { - xfer += (*_iter402).write(oprot); + xfer += (*_iter413).write(oprot); } xfer += oprot->writeListEnd(); } @@ -8390,14 +8668,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size403; - ::apache::thrift::protocol::TType _etype406; - iprot->readListBegin(_etype406, _size403); - (*(this->success)).resize(_size403); - uint32_t _i407; - for (_i407 = 0; _i407 < _size403; ++_i407) + uint32_t _size414; + ::apache::thrift::protocol::TType _etype417; + iprot->readListBegin(_etype417, _size414); + (*(this->success)).resize(_size414); + uint32_t _i418; + for (_i418 = 0; _i418 < _size414; ++_i418) { - xfer += (*(this->success))[_i407].read(iprot); + xfer += (*(this->success))[_i418].read(iprot); } iprot->readListEnd(); } @@ -8474,14 +8752,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->names.clear(); - uint32_t _size408; - ::apache::thrift::protocol::TType _etype411; - iprot->readListBegin(_etype411, _size408); - this->names.resize(_size408); - uint32_t _i412; - for (_i412 = 0; _i412 < _size408; ++_i412) + uint32_t _size419; + ::apache::thrift::protocol::TType _etype422; + iprot->readListBegin(_etype422, _size419); + this->names.resize(_size419); + uint32_t _i423; + for (_i423 = 0; _i423 < _size419; ++_i423) { - xfer += iprot->readString(this->names[_i412]); + xfer += iprot->readString(this->names[_i423]); } iprot->readListEnd(); } @@ -8514,10 +8792,10 @@ xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->names.size()); - std::vector ::const_iterator _iter413; - for (_iter413 = this->names.begin(); _iter413 != this->names.end(); ++_iter413) + std::vector ::const_iterator _iter424; + for (_iter424 = this->names.begin(); _iter424 != this->names.end(); ++_iter424) { - xfer += oprot->writeString((*_iter413)); + xfer += oprot->writeString((*_iter424)); } xfer += oprot->writeListEnd(); } @@ -8539,10 +8817,10 @@ xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->names)).size()); - std::vector ::const_iterator _iter414; - for (_iter414 = (*(this->names)).begin(); _iter414 != (*(this->names)).end(); ++_iter414) + std::vector ::const_iterator _iter425; + for (_iter425 = (*(this->names)).begin(); _iter425 != (*(this->names)).end(); ++_iter425) { - xfer += oprot->writeString((*_iter414)); + xfer += oprot->writeString((*_iter425)); } xfer += oprot->writeListEnd(); } @@ -8576,14 +8854,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(); } @@ -8630,10 +8908,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 _iter420; - for (_iter420 = this->success.begin(); _iter420 != this->success.end(); ++_iter420) + std::vector ::const_iterator _iter431; + for (_iter431 = this->success.begin(); _iter431 != this->success.end(); ++_iter431) { - xfer += (*_iter420).write(oprot); + xfer += (*_iter431).write(oprot); } xfer += oprot->writeListEnd(); } @@ -8676,14 +8954,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size421; - ::apache::thrift::protocol::TType _etype424; - iprot->readListBegin(_etype424, _size421); - (*(this->success)).resize(_size421); - uint32_t _i425; - for (_i425 = 0; _i425 < _size421; ++_i425) + uint32_t _size432; + ::apache::thrift::protocol::TType _etype435; + iprot->readListBegin(_etype435, _size432); + (*(this->success)).resize(_size432); + uint32_t _i436; + for (_i436 = 0; _i436 < _size432; ++_i436) { - xfer += (*(this->success))[_i425].read(iprot); + xfer += (*(this->success))[_i436].read(iprot); } iprot->readListEnd(); } @@ -9204,14 +9482,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(); } @@ -9250,10 +9528,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 _iter431; - for (_iter431 = this->success.begin(); _iter431 != this->success.end(); ++_iter431) + std::vector ::const_iterator _iter442; + for (_iter442 = this->success.begin(); _iter442 != this->success.end(); ++_iter442) { - xfer += oprot->writeString((*_iter431)); + xfer += oprot->writeString((*_iter442)); } xfer += oprot->writeListEnd(); } @@ -9292,14 +9570,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size432; - ::apache::thrift::protocol::TType _etype435; - iprot->readListBegin(_etype435, _size432); - (*(this->success)).resize(_size432); - uint32_t _i436; - for (_i436 = 0; _i436 < _size432; ++_i436) + uint32_t _size443; + ::apache::thrift::protocol::TType _etype446; + iprot->readListBegin(_etype446, _size443); + (*(this->success)).resize(_size443); + uint32_t _i447; + for (_i447 = 0; _i447 < _size443; ++_i447) { - xfer += iprot->readString((*(this->success))[_i436]); + xfer += iprot->readString((*(this->success))[_i447]); } iprot->readListEnd(); } @@ -9414,17 +9692,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size437; - ::apache::thrift::protocol::TType _ktype438; - ::apache::thrift::protocol::TType _vtype439; - iprot->readMapBegin(_ktype438, _vtype439, _size437); - uint32_t _i441; - for (_i441 = 0; _i441 < _size437; ++_i441) + uint32_t _size448; + ::apache::thrift::protocol::TType _ktype449; + ::apache::thrift::protocol::TType _vtype450; + iprot->readMapBegin(_ktype449, _vtype450, _size448); + uint32_t _i452; + for (_i452 = 0; _i452 < _size448; ++_i452) { - std::string _key442; - xfer += iprot->readString(_key442); - std::string& _val443 = this->success[_key442]; - xfer += iprot->readString(_val443); + std::string _key453; + xfer += iprot->readString(_key453); + std::string& _val454 = this->success[_key453]; + xfer += iprot->readString(_val454); } iprot->readMapEnd(); } @@ -9463,11 +9741,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 _iter444; - for (_iter444 = this->success.begin(); _iter444 != this->success.end(); ++_iter444) + std::map ::const_iterator _iter455; + for (_iter455 = this->success.begin(); _iter455 != this->success.end(); ++_iter455) { - xfer += oprot->writeString(_iter444->first); - xfer += oprot->writeString(_iter444->second); + xfer += oprot->writeString(_iter455->first); + xfer += oprot->writeString(_iter455->second); } xfer += oprot->writeMapEnd(); } @@ -9506,17 +9784,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); - uint32_t _size445; - ::apache::thrift::protocol::TType _ktype446; - ::apache::thrift::protocol::TType _vtype447; - iprot->readMapBegin(_ktype446, _vtype447, _size445); - uint32_t _i449; - for (_i449 = 0; _i449 < _size445; ++_i449) + uint32_t _size456; + ::apache::thrift::protocol::TType _ktype457; + ::apache::thrift::protocol::TType _vtype458; + iprot->readMapBegin(_ktype457, _vtype458, _size456); + uint32_t _i460; + for (_i460 = 0; _i460 < _size456; ++_i460) { - std::string _key450; - xfer += iprot->readString(_key450); - std::string& _val451 = (*(this->success))[_key450]; - xfer += iprot->readString(_val451); + std::string _key461; + xfer += iprot->readString(_key461); + std::string& _val462 = (*(this->success))[_key461]; + xfer += iprot->readString(_val462); } iprot->readMapEnd(); } @@ -9585,17 +9863,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->part_vals.clear(); - uint32_t _size452; - ::apache::thrift::protocol::TType _ktype453; - ::apache::thrift::protocol::TType _vtype454; - iprot->readMapBegin(_ktype453, _vtype454, _size452); - uint32_t _i456; - for (_i456 = 0; _i456 < _size452; ++_i456) + uint32_t _size463; + ::apache::thrift::protocol::TType _ktype464; + ::apache::thrift::protocol::TType _vtype465; + iprot->readMapBegin(_ktype464, _vtype465, _size463); + uint32_t _i467; + for (_i467 = 0; _i467 < _size463; ++_i467) { - std::string _key457; - xfer += iprot->readString(_key457); - std::string& _val458 = this->part_vals[_key457]; - xfer += iprot->readString(_val458); + std::string _key468; + xfer += iprot->readString(_key468); + std::string& _val469 = this->part_vals[_key468]; + xfer += iprot->readString(_val469); } iprot->readMapEnd(); } @@ -9606,9 +9884,9 @@ break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast459; - xfer += iprot->readI32(ecast459); - this->eventType = (PartitionEventType::type)ecast459; + int32_t ecast470; + xfer += iprot->readI32(ecast470); + this->eventType = (PartitionEventType::type)ecast470; this->__isset.eventType = true; } else { xfer += iprot->skip(ftype); @@ -9638,11 +9916,11 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::map ::const_iterator _iter460; - for (_iter460 = this->part_vals.begin(); _iter460 != this->part_vals.end(); ++_iter460) + std::map ::const_iterator _iter471; + for (_iter471 = this->part_vals.begin(); _iter471 != this->part_vals.end(); ++_iter471) { - xfer += oprot->writeString(_iter460->first); - xfer += oprot->writeString(_iter460->second); + xfer += oprot->writeString(_iter471->first); + xfer += oprot->writeString(_iter471->second); } xfer += oprot->writeMapEnd(); } @@ -9667,11 +9945,11 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::map ::const_iterator _iter461; - for (_iter461 = (*(this->part_vals)).begin(); _iter461 != (*(this->part_vals)).end(); ++_iter461) + std::map ::const_iterator _iter472; + for (_iter472 = (*(this->part_vals)).begin(); _iter472 != (*(this->part_vals)).end(); ++_iter472) { - xfer += oprot->writeString(_iter461->first); - xfer += oprot->writeString(_iter461->second); + xfer += oprot->writeString(_iter472->first); + xfer += oprot->writeString(_iter472->second); } xfer += oprot->writeMapEnd(); } @@ -9920,17 +10198,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->part_vals.clear(); - uint32_t _size462; - ::apache::thrift::protocol::TType _ktype463; - ::apache::thrift::protocol::TType _vtype464; - iprot->readMapBegin(_ktype463, _vtype464, _size462); - uint32_t _i466; - for (_i466 = 0; _i466 < _size462; ++_i466) + uint32_t _size473; + ::apache::thrift::protocol::TType _ktype474; + ::apache::thrift::protocol::TType _vtype475; + iprot->readMapBegin(_ktype474, _vtype475, _size473); + uint32_t _i477; + for (_i477 = 0; _i477 < _size473; ++_i477) { - std::string _key467; - xfer += iprot->readString(_key467); - std::string& _val468 = this->part_vals[_key467]; - xfer += iprot->readString(_val468); + std::string _key478; + xfer += iprot->readString(_key478); + std::string& _val479 = this->part_vals[_key478]; + xfer += iprot->readString(_val479); } iprot->readMapEnd(); } @@ -9941,9 +10219,9 @@ break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast469; - xfer += iprot->readI32(ecast469); - this->eventType = (PartitionEventType::type)ecast469; + int32_t ecast480; + xfer += iprot->readI32(ecast480); + this->eventType = (PartitionEventType::type)ecast480; this->__isset.eventType = true; } else { xfer += iprot->skip(ftype); @@ -9973,11 +10251,11 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::map ::const_iterator _iter470; - for (_iter470 = this->part_vals.begin(); _iter470 != this->part_vals.end(); ++_iter470) + std::map ::const_iterator _iter481; + for (_iter481 = this->part_vals.begin(); _iter481 != this->part_vals.end(); ++_iter481) { - xfer += oprot->writeString(_iter470->first); - xfer += oprot->writeString(_iter470->second); + xfer += oprot->writeString(_iter481->first); + xfer += oprot->writeString(_iter481->second); } xfer += oprot->writeMapEnd(); } @@ -10002,11 +10280,11 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::map ::const_iterator _iter471; - for (_iter471 = (*(this->part_vals)).begin(); _iter471 != (*(this->part_vals)).end(); ++_iter471) + std::map ::const_iterator _iter482; + for (_iter482 = (*(this->part_vals)).begin(); _iter482 != (*(this->part_vals)).end(); ++_iter482) { - xfer += oprot->writeString(_iter471->first); - xfer += oprot->writeString(_iter471->second); + xfer += oprot->writeString(_iter482->first); + xfer += oprot->writeString(_iter482->second); } xfer += oprot->writeMapEnd(); } @@ -11267,14 +11545,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size472; - ::apache::thrift::protocol::TType _etype475; - iprot->readListBegin(_etype475, _size472); - this->success.resize(_size472); - uint32_t _i476; - for (_i476 = 0; _i476 < _size472; ++_i476) + uint32_t _size483; + ::apache::thrift::protocol::TType _etype486; + iprot->readListBegin(_etype486, _size483); + this->success.resize(_size483); + uint32_t _i487; + for (_i487 = 0; _i487 < _size483; ++_i487) { - xfer += this->success[_i476].read(iprot); + xfer += this->success[_i487].read(iprot); } iprot->readListEnd(); } @@ -11321,10 +11599,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 _iter477; - for (_iter477 = this->success.begin(); _iter477 != this->success.end(); ++_iter477) + std::vector ::const_iterator _iter488; + for (_iter488 = this->success.begin(); _iter488 != this->success.end(); ++_iter488) { - xfer += (*_iter477).write(oprot); + xfer += (*_iter488).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11367,14 +11645,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size478; - ::apache::thrift::protocol::TType _etype481; - iprot->readListBegin(_etype481, _size478); - (*(this->success)).resize(_size478); - uint32_t _i482; - for (_i482 = 0; _i482 < _size478; ++_i482) + uint32_t _size489; + ::apache::thrift::protocol::TType _etype492; + iprot->readListBegin(_etype492, _size489); + (*(this->success)).resize(_size489); + uint32_t _i493; + for (_i493 = 0; _i493 < _size489; ++_i493) { - xfer += (*(this->success))[_i482].read(iprot); + xfer += (*(this->success))[_i493].read(iprot); } iprot->readListEnd(); } @@ -11525,14 +11803,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size483; - ::apache::thrift::protocol::TType _etype486; - iprot->readListBegin(_etype486, _size483); - this->success.resize(_size483); - uint32_t _i487; - for (_i487 = 0; _i487 < _size483; ++_i487) + uint32_t _size494; + ::apache::thrift::protocol::TType _etype497; + iprot->readListBegin(_etype497, _size494); + this->success.resize(_size494); + uint32_t _i498; + for (_i498 = 0; _i498 < _size494; ++_i498) { - xfer += iprot->readString(this->success[_i487]); + xfer += iprot->readString(this->success[_i498]); } iprot->readListEnd(); } @@ -11571,10 +11849,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 _iter488; - for (_iter488 = this->success.begin(); _iter488 != this->success.end(); ++_iter488) + std::vector ::const_iterator _iter499; + for (_iter499 = this->success.begin(); _iter499 != this->success.end(); ++_iter499) { - xfer += oprot->writeString((*_iter488)); + xfer += oprot->writeString((*_iter499)); } xfer += oprot->writeListEnd(); } @@ -11613,14 +11891,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size489; - ::apache::thrift::protocol::TType _etype492; - iprot->readListBegin(_etype492, _size489); - (*(this->success)).resize(_size489); - uint32_t _i493; - for (_i493 = 0; _i493 < _size489; ++_i493) + uint32_t _size500; + ::apache::thrift::protocol::TType _etype503; + iprot->readListBegin(_etype503, _size500); + (*(this->success)).resize(_size500); + uint32_t _i504; + for (_i504 = 0; _i504 < _size500; ++_i504) { - xfer += iprot->readString((*(this->success))[_i493]); + xfer += iprot->readString((*(this->success))[_i504]); } iprot->readListEnd(); } @@ -12077,14 +12355,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size494; - ::apache::thrift::protocol::TType _etype497; - iprot->readListBegin(_etype497, _size494); - this->success.resize(_size494); - uint32_t _i498; - for (_i498 = 0; _i498 < _size494; ++_i498) + uint32_t _size505; + ::apache::thrift::protocol::TType _etype508; + iprot->readListBegin(_etype508, _size505); + this->success.resize(_size505); + uint32_t _i509; + for (_i509 = 0; _i509 < _size505; ++_i509) { - xfer += iprot->readString(this->success[_i498]); + xfer += iprot->readString(this->success[_i509]); } iprot->readListEnd(); } @@ -12123,10 +12401,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 _iter499; - for (_iter499 = this->success.begin(); _iter499 != this->success.end(); ++_iter499) + std::vector ::const_iterator _iter510; + for (_iter510 = this->success.begin(); _iter510 != this->success.end(); ++_iter510) { - xfer += oprot->writeString((*_iter499)); + xfer += oprot->writeString((*_iter510)); } xfer += oprot->writeListEnd(); } @@ -12165,14 +12443,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size500; - ::apache::thrift::protocol::TType _etype503; - iprot->readListBegin(_etype503, _size500); - (*(this->success)).resize(_size500); - uint32_t _i504; - for (_i504 = 0; _i504 < _size500; ++_i504) + uint32_t _size511; + ::apache::thrift::protocol::TType _etype514; + iprot->readListBegin(_etype514, _size511); + (*(this->success)).resize(_size511); + uint32_t _i515; + for (_i515 = 0; _i515 < _size511; ++_i515) { - xfer += iprot->readString((*(this->success))[_i504]); + xfer += iprot->readString((*(this->success))[_i515]); } iprot->readListEnd(); } @@ -12239,9 +12517,9 @@ break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast505; - xfer += iprot->readI32(ecast505); - this->principal_type = (PrincipalType::type)ecast505; + int32_t ecast516; + xfer += iprot->readI32(ecast516); + this->principal_type = (PrincipalType::type)ecast516; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -12257,9 +12535,9 @@ break; case 5: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast506; - xfer += iprot->readI32(ecast506); - this->grantorType = (PrincipalType::type)ecast506; + int32_t ecast517; + xfer += iprot->readI32(ecast517); + this->grantorType = (PrincipalType::type)ecast517; this->__isset.grantorType = true; } else { xfer += iprot->skip(ftype); @@ -12491,9 +12769,9 @@ break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast507; - xfer += iprot->readI32(ecast507); - this->principal_type = (PrincipalType::type)ecast507; + int32_t ecast518; + xfer += iprot->readI32(ecast518); + this->principal_type = (PrincipalType::type)ecast518; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -12691,9 +12969,9 @@ break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast508; - xfer += iprot->readI32(ecast508); - this->principal_type = (PrincipalType::type)ecast508; + int32_t ecast519; + xfer += iprot->readI32(ecast519); + this->principal_type = (PrincipalType::type)ecast519; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -12763,14 +13041,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size509; - ::apache::thrift::protocol::TType _etype512; - iprot->readListBegin(_etype512, _size509); - this->success.resize(_size509); - uint32_t _i513; - for (_i513 = 0; _i513 < _size509; ++_i513) + uint32_t _size520; + ::apache::thrift::protocol::TType _etype523; + iprot->readListBegin(_etype523, _size520); + this->success.resize(_size520); + uint32_t _i524; + for (_i524 = 0; _i524 < _size520; ++_i524) { - xfer += this->success[_i513].read(iprot); + xfer += this->success[_i524].read(iprot); } iprot->readListEnd(); } @@ -12809,10 +13087,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 _iter514; - for (_iter514 = this->success.begin(); _iter514 != this->success.end(); ++_iter514) + std::vector ::const_iterator _iter525; + for (_iter525 = this->success.begin(); _iter525 != this->success.end(); ++_iter525) { - xfer += (*_iter514).write(oprot); + xfer += (*_iter525).write(oprot); } xfer += oprot->writeListEnd(); } @@ -12851,14 +13129,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size515; - ::apache::thrift::protocol::TType _etype518; - iprot->readListBegin(_etype518, _size515); - (*(this->success)).resize(_size515); - uint32_t _i519; - for (_i519 = 0; _i519 < _size515; ++_i519) + uint32_t _size526; + ::apache::thrift::protocol::TType _etype529; + iprot->readListBegin(_etype529, _size526); + (*(this->success)).resize(_size526); + uint32_t _i530; + for (_i530 = 0; _i530 < _size526; ++_i530) { - xfer += (*(this->success))[_i519].read(iprot); + xfer += (*(this->success))[_i530].read(iprot); } iprot->readListEnd(); } @@ -12927,14 +13205,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size520; - ::apache::thrift::protocol::TType _etype523; - iprot->readListBegin(_etype523, _size520); - this->group_names.resize(_size520); - uint32_t _i524; - for (_i524 = 0; _i524 < _size520; ++_i524) + uint32_t _size531; + ::apache::thrift::protocol::TType _etype534; + iprot->readListBegin(_etype534, _size531); + this->group_names.resize(_size531); + uint32_t _i535; + for (_i535 = 0; _i535 < _size531; ++_i535) { - xfer += iprot->readString(this->group_names[_i524]); + xfer += iprot->readString(this->group_names[_i535]); } iprot->readListEnd(); } @@ -12967,10 +13245,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 _iter525; - for (_iter525 = this->group_names.begin(); _iter525 != this->group_names.end(); ++_iter525) + std::vector ::const_iterator _iter536; + for (_iter536 = this->group_names.begin(); _iter536 != this->group_names.end(); ++_iter536) { - xfer += oprot->writeString((*_iter525)); + xfer += oprot->writeString((*_iter536)); } xfer += oprot->writeListEnd(); } @@ -12992,10 +13270,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 _iter526; - for (_iter526 = (*(this->group_names)).begin(); _iter526 != (*(this->group_names)).end(); ++_iter526) + std::vector ::const_iterator _iter537; + for (_iter537 = (*(this->group_names)).begin(); _iter537 != (*(this->group_names)).end(); ++_iter537) { - xfer += oprot->writeString((*_iter526)); + xfer += oprot->writeString((*_iter537)); } xfer += oprot->writeListEnd(); } @@ -13151,9 +13429,9 @@ break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast527; - xfer += iprot->readI32(ecast527); - this->principal_type = (PrincipalType::type)ecast527; + int32_t ecast538; + xfer += iprot->readI32(ecast538); + this->principal_type = (PrincipalType::type)ecast538; this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); @@ -13237,14 +13515,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size528; - ::apache::thrift::protocol::TType _etype531; - iprot->readListBegin(_etype531, _size528); - this->success.resize(_size528); - uint32_t _i532; - for (_i532 = 0; _i532 < _size528; ++_i532) + uint32_t _size539; + ::apache::thrift::protocol::TType _etype542; + iprot->readListBegin(_etype542, _size539); + this->success.resize(_size539); + uint32_t _i543; + for (_i543 = 0; _i543 < _size539; ++_i543) { - xfer += this->success[_i532].read(iprot); + xfer += this->success[_i543].read(iprot); } iprot->readListEnd(); } @@ -13283,10 +13561,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 _iter533; - for (_iter533 = this->success.begin(); _iter533 != this->success.end(); ++_iter533) + std::vector ::const_iterator _iter544; + for (_iter544 = this->success.begin(); _iter544 != this->success.end(); ++_iter544) { - xfer += (*_iter533).write(oprot); + xfer += (*_iter544).write(oprot); } xfer += oprot->writeListEnd(); } @@ -13325,14 +13603,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size534; - ::apache::thrift::protocol::TType _etype537; - iprot->readListBegin(_etype537, _size534); - (*(this->success)).resize(_size534); - uint32_t _i538; - for (_i538 = 0; _i538 < _size534; ++_i538) + uint32_t _size545; + ::apache::thrift::protocol::TType _etype548; + iprot->readListBegin(_etype548, _size545); + (*(this->success)).resize(_size545); + uint32_t _i549; + for (_i549 = 0; _i549 < _size545; ++_i549) { - xfer += (*(this->success))[_i538].read(iprot); + xfer += (*(this->success))[_i549].read(iprot); } iprot->readListEnd(); } @@ -15426,6 +15704,77 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); } +void ThriftHiveMetastoreClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) +{ + send_get_table_names_by_filter(dbname, filter, max_tables); + recv_get_table_names_by_filter(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_names_by_filter_pargs args; + args.dbname = &dbname; + args.filter = &filter; + args.max_tables = &max_tables; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_table_names_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_table_names_by_filter_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; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); +} + void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { send_alter_table(dbname, tbl_name, new_tbl); @@ -18948,6 +19297,43 @@ oprot->getTransport()->writeEnd(); } +void ThriftHiveMetastoreProcessor::process_get_table_names_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_table_names_by_filter_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_table_names_by_filter_result result; + try { + iface_->get_table_names_by_filter(result.success, args.dbname, args.filter, args.max_tables); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_alter_table_args args; Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (revision 1150966) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -33,6 +33,7 @@ virtual void get_all_tables(std::vector & _return, const std::string& db_name) = 0; virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0; virtual void get_table_objects_by_name(std::vector & _return, const std::string& dbname, const std::vector & tbl_names) = 0; + virtual void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) = 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; virtual int32_t add_partitions(const std::vector & new_parts) = 0; @@ -137,6 +138,9 @@ void get_table_objects_by_name(std::vector
& /* _return */, const std::string& /* dbname */, const std::vector & /* tbl_names */) { return; } + void get_table_names_by_filter(std::vector & /* _return */, const std::string& /* dbname */, const std::string& /* filter */, const int16_t /* max_tables */) { + return; + } void alter_table(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */) { return; } @@ -2324,6 +2328,134 @@ }; +typedef struct _ThriftHiveMetastore_get_table_names_by_filter_args__isset { + _ThriftHiveMetastore_get_table_names_by_filter_args__isset() : dbname(false), filter(false), max_tables(false) {} + bool dbname; + bool filter; + bool max_tables; +} _ThriftHiveMetastore_get_table_names_by_filter_args__isset; + +class ThriftHiveMetastore_get_table_names_by_filter_args { + public: + + ThriftHiveMetastore_get_table_names_by_filter_args() : dbname(""), filter(""), max_tables(-1) { + } + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_args() throw() {} + + std::string dbname; + std::string filter; + int16_t max_tables; + + _ThriftHiveMetastore_get_table_names_by_filter_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_names_by_filter_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(filter == rhs.filter)) + return false; + if (!(max_tables == rhs.max_tables)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_names_by_filter_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_names_by_filter_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_names_by_filter_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_pargs() throw() {} + + const std::string* dbname; + const std::string* filter; + const int16_t* max_tables; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_names_by_filter_result__isset { + _ThriftHiveMetastore_get_table_names_by_filter_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_get_table_names_by_filter_result__isset; + +class ThriftHiveMetastore_get_table_names_by_filter_result { + public: + + ThriftHiveMetastore_get_table_names_by_filter_result() { + } + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_result() throw() {} + + std::vector success; + MetaException o1; + InvalidOperationException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_table_names_by_filter_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_names_by_filter_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_names_by_filter_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_names_by_filter_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_names_by_filter_presult__isset { + _ThriftHiveMetastore_get_table_names_by_filter_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_get_table_names_by_filter_presult__isset; + +class ThriftHiveMetastore_get_table_names_by_filter_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_presult() throw() {} + + std::vector * success; + MetaException o1; + InvalidOperationException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_table_names_by_filter_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_alter_table_args__isset { _ThriftHiveMetastore_alter_table_args__isset() : dbname(false), tbl_name(false), new_tbl(false) {} bool dbname; @@ -7519,6 +7651,9 @@ void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names); void send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names); void recv_get_table_objects_by_name(std::vector
& _return); + void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables); + void send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables); + void recv_get_table_names_by_filter(std::vector & _return); void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); void recv_alter_table(); @@ -7674,6 +7809,7 @@ void process_get_all_tables(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_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_table_names_by_filter(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); void process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); @@ -7739,6 +7875,7 @@ processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables; processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table; processMap_["get_table_objects_by_name"] = &ThriftHiveMetastoreProcessor::process_get_table_objects_by_name; + processMap_["get_table_names_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_table_names_by_filter; processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table; processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition; processMap_["add_partitions"] = &ThriftHiveMetastoreProcessor::process_add_partitions; @@ -7994,6 +8131,18 @@ } } + void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); + return; + } else { + ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); + } + } + } + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { 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 1150966) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -112,6 +112,11 @@ printf("get_table_objects_by_name\n"); } + void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { + // Your implementation goes here + printf("get_table_names_by_filter\n"); + } + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { // Your implementation goes here printf("alter_table\n"); Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp (revision 1150966) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp (working copy) @@ -12,6 +12,12 @@ hive_metastoreConstants::hive_metastoreConstants() { DDL_TIME = "transient_lastDdlTime"; + HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__"; + + HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__"; + + HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__"; + IS_ARCHIVED = "is_archived"; ORIGINAL_LOCATION = "original_location"; Index: metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (revision 1150966) +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (working copy) @@ -316,6 +316,24 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_objects_by_name failed: unknown result') end + def get_table_names_by_filter(dbname, filter, max_tables) + send_get_table_names_by_filter(dbname, filter, max_tables) + return recv_get_table_names_by_filter() + end + + def send_get_table_names_by_filter(dbname, filter, max_tables) + send_message('get_table_names_by_filter', Get_table_names_by_filter_args, :dbname => dbname, :filter => filter, :max_tables => max_tables) + end + + def recv_get_table_names_by_filter() + result = receive_message(Get_table_names_by_filter_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_names_by_filter failed: unknown result') + end + def alter_table(dbname, tbl_name, new_tbl) send_alter_table(dbname, tbl_name, new_tbl) recv_alter_table() @@ -1280,6 +1298,21 @@ write_result(result, oprot, 'get_table_objects_by_name', seqid) end + def process_get_table_names_by_filter(seqid, iprot, oprot) + args = read_args(iprot, Get_table_names_by_filter_args) + result = Get_table_names_by_filter_result.new() + begin + result.success = @handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables) + rescue MetaException => o1 + result.o1 = o1 + rescue InvalidOperationException => o2 + result.o2 = o2 + rescue UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_table_names_by_filter', seqid) + end + def process_alter_table(seqid, iprot, oprot) args = read_args(iprot, Alter_table_args) result = Alter_table_result.new() @@ -2492,6 +2525,48 @@ ::Thrift::Struct.generate_accessors self end + class Get_table_names_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FILTER = 2 + MAX_TABLES = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + MAX_TABLES => {:type => ::Thrift::Types::I16, :name => 'max_tables', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_names_by_filter_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidOperationException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Alter_table_args include ::Thrift::Struct, ::Thrift::Struct_Union DBNAME = 1 Index: metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb (revision 1150966) +++ metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb (working copy) @@ -8,6 +8,12 @@ DDL_TIME = %q"transient_lastDdlTime" +HIVE_FILTER_FIELD_OWNER = %q"hive_filter_field_owner__" + +HIVE_FILTER_FIELD_PARAMS = %q"hive_filter_field_params__" + +HIVE_FILTER_FIELD_LAST_ACCESS = %q"hive_filter_field_last_access__" + IS_ARCHIVED = %q"is_archived" ORIGINAL_LOCATION = %q"original_location" 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 1150966) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -69,6 +69,8 @@ public List
get_table_objects_by_name(String dbname, List tbl_names) throws MetaException, InvalidOperationException, UnknownDBException, TException; + public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, TException; + public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException; public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; @@ -195,6 +197,8 @@ public void get_table_objects_by_name(String dbname, List tbl_names, AsyncMethodCallback resultHandler) throws TException; + public void get_table_names_by_filter(String dbname, String filter, short max_tables, AsyncMethodCallback resultHandler) throws TException; + public void alter_table(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler) throws TException; public void add_partition(Partition new_part, AsyncMethodCallback resultHandler) throws TException; @@ -1063,6 +1067,53 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); } + public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, TException + { + send_get_table_names_by_filter(dbname, filter, max_tables); + return recv_get_table_names_by_filter(); + } + + public void send_get_table_names_by_filter(String dbname, String filter, short max_tables) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_table_names_by_filter", TMessageType.CALL, ++seqid_)); + get_table_names_by_filter_args args = new get_table_names_by_filter_args(); + args.setDbname(dbname); + args.setFilter(filter); + args.setMax_tables(max_tables); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_table_names_by_filter() throws MetaException, InvalidOperationException, UnknownDBException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_table_names_by_filter failed: out of sequence response"); + } + get_table_names_by_filter_result result = new get_table_names_by_filter_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); + } + public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException { send_alter_table(dbname, tbl_name, new_tbl); @@ -3514,6 +3565,43 @@ } } + public void get_table_names_by_filter(String dbname, String filter, short max_tables, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_table_names_by_filter_call method_call = new get_table_names_by_filter_call(dbname, filter, max_tables, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_table_names_by_filter_call extends TAsyncMethodCall { + private String dbname; + private String filter; + private short max_tables; + public get_table_names_by_filter_call(String dbname, String filter, short max_tables, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.filter = filter; + this.max_tables = max_tables; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_table_names_by_filter", TMessageType.CALL, 0)); + get_table_names_by_filter_args args = new get_table_names_by_filter_args(); + args.setDbname(dbname); + args.setFilter(filter); + args.setMax_tables(max_tables); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, InvalidOperationException, UnknownDBException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_names_by_filter(); + } + } + public void alter_table(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler) throws TException { checkReady(); alter_table_call method_call = new alter_table_call(dbname, tbl_name, new_tbl, resultHandler, this, protocolFactory, transport); @@ -5107,6 +5195,7 @@ processMap_.put("get_all_tables", new get_all_tables()); processMap_.put("get_table", new get_table()); processMap_.put("get_table_objects_by_name", new get_table_objects_by_name()); + processMap_.put("get_table_names_by_filter", new get_table_names_by_filter()); processMap_.put("alter_table", new alter_table()); processMap_.put("add_partition", new add_partition()); processMap_.put("add_partitions", new add_partitions()); @@ -5900,6 +5989,48 @@ } + private class get_table_names_by_filter implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_table_names_by_filter_args args = new get_table_names_by_filter_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_table_names_by_filter", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_table_names_by_filter_result result = new get_table_names_by_filter_result(); + try { + result.success = iface_.get_table_names_by_filter(args.dbname, args.filter, args.max_tables); + } catch (MetaException o1) { + result.o1 = o1; + } catch (InvalidOperationException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_table_names_by_filter", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table_names_by_filter"); + oprot.writeMessageBegin(new TMessage("get_table_names_by_filter", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_table_names_by_filter", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + private class alter_table implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { @@ -21736,6 +21867,1038 @@ } + public static class get_table_names_by_filter_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_names_by_filter_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRING, (short)2); + private static final TField MAX_TABLES_FIELD_DESC = new TField("max_tables", TType.I16, (short)3); + + private String dbname; + private String filter; + private short max_tables; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + FILTER((short)2, "filter"), + MAX_TABLES((short)3, "max_tables"); + + 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: // DBNAME + return DBNAME; + case 2: // FILTER + return FILTER; + case 3: // MAX_TABLES + return MAX_TABLES; + 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 __MAX_TABLES_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_TABLES, new FieldMetaData("max_tables", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_args.class, metaDataMap); + } + + public get_table_names_by_filter_args() { + this.max_tables = (short)-1; + + } + + public get_table_names_by_filter_args( + String dbname, + String filter, + short max_tables) + { + this(); + this.dbname = dbname; + this.filter = filter; + this.max_tables = max_tables; + setMax_tablesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_table_names_by_filter_args(get_table_names_by_filter_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetFilter()) { + this.filter = other.filter; + } + this.max_tables = other.max_tables; + } + + public get_table_names_by_filter_args deepCopy() { + return new get_table_names_by_filter_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.filter = null; + this.max_tables = (short)-1; + + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getFilter() { + return this.filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public void unsetFilter() { + this.filter = null; + } + + /** Returns true if field filter is set (has been asigned a value) and false otherwise */ + public boolean isSetFilter() { + return this.filter != null; + } + + public void setFilterIsSet(boolean value) { + if (!value) { + this.filter = null; + } + } + + public short getMax_tables() { + return this.max_tables; + } + + public void setMax_tables(short max_tables) { + this.max_tables = max_tables; + setMax_tablesIsSet(true); + } + + public void unsetMax_tables() { + __isset_bit_vector.clear(__MAX_TABLES_ISSET_ID); + } + + /** Returns true if field max_tables is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_tables() { + return __isset_bit_vector.get(__MAX_TABLES_ISSET_ID); + } + + public void setMax_tablesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_TABLES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case FILTER: + if (value == null) { + unsetFilter(); + } else { + setFilter((String)value); + } + break; + + case MAX_TABLES: + if (value == null) { + unsetMax_tables(); + } else { + setMax_tables((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case FILTER: + return getFilter(); + + case MAX_TABLES: + return new Short(getMax_tables()); + + } + 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 DBNAME: + return isSetDbname(); + case FILTER: + return isSetFilter(); + case MAX_TABLES: + return isSetMax_tables(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_names_by_filter_args) + return this.equals((get_table_names_by_filter_args)that); + return false; + } + + public boolean equals(get_table_names_by_filter_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_filter = true && this.isSetFilter(); + boolean that_present_filter = true && that.isSetFilter(); + if (this_present_filter || that_present_filter) { + if (!(this_present_filter && that_present_filter)) + return false; + if (!this.filter.equals(that.filter)) + return false; + } + + boolean this_present_max_tables = true; + boolean that_present_max_tables = true; + if (this_present_max_tables || that_present_max_tables) { + if (!(this_present_max_tables && that_present_max_tables)) + return false; + if (this.max_tables != that.max_tables) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_names_by_filter_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_names_by_filter_args typedOther = (get_table_names_by_filter_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilter()) { + lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_tables()).compareTo(typedOther.isSetMax_tables()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_tables()) { + lastComparison = TBaseHelper.compareTo(this.max_tables, typedOther.max_tables); + 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: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // FILTER + if (field.type == TType.STRING) { + this.filter = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_TABLES + if (field.type == TType.I16) { + this.max_tables = iprot.readI16(); + setMax_tablesIsSet(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.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(this.filter); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_TABLES_FIELD_DESC); + oprot.writeI16(this.max_tables); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_names_by_filter_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("filter:"); + if (this.filter == null) { + sb.append("null"); + } else { + sb.append(this.filter); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_tables:"); + sb.append(this.max_tables); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_table_names_by_filter_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_names_by_filter_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 static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private List success; + private MetaException o1; + private InvalidOperationException o2; + private UnknownDBException o3; + + /** 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"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_result.class, metaDataMap); + } + + public get_table_names_by_filter_result() { + } + + public get_table_names_by_filter_result( + List success, + MetaException o1, + InvalidOperationException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_table_names_by_filter_result(get_table_names_by_filter_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidOperationException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_table_names_by_filter_result deepCopy() { + return new get_table_names_by_filter_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidOperationException getO2() { + return this.o2; + } + + public void setO2(InvalidOperationException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = 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; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidOperationException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + 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(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_names_by_filter_result) + return this.equals((get_table_names_by_filter_result)that); + return false; + } + + public boolean equals(get_table_names_by_filter_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_names_by_filter_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_names_by_filter_result typedOther = (get_table_names_by_filter_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; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list135 = iprot.readListBegin(); + this.success = new ArrayList(_list135.size); + for (int _i136 = 0; _i136 < _list135.size; ++_i136) + { + String _elem137; + _elem137 = iprot.readString(); + this.success.add(_elem137); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidOperationException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new UnknownDBException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter138 : this.success) + { + oprot.writeString(_iter138); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_names_by_filter_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + public static class alter_table_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("alter_table_args"); @@ -23628,14 +24791,14 @@ case 1: // NEW_PARTS if (field.type == TType.LIST) { { - TList _list135 = iprot.readListBegin(); - this.new_parts = new ArrayList(_list135.size); - for (int _i136 = 0; _i136 < _list135.size; ++_i136) + TList _list139 = iprot.readListBegin(); + this.new_parts = new ArrayList(_list139.size); + for (int _i140 = 0; _i140 < _list139.size; ++_i140) { - Partition _elem137; - _elem137 = new Partition(); - _elem137.read(iprot); - this.new_parts.add(_elem137); + Partition _elem141; + _elem141 = new Partition(); + _elem141.read(iprot); + this.new_parts.add(_elem141); } iprot.readListEnd(); } @@ -23660,9 +24823,9 @@ oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.new_parts.size())); - for (Partition _iter138 : this.new_parts) + for (Partition _iter142 : this.new_parts) { - _iter138.write(oprot); + _iter142.write(oprot); } oprot.writeListEnd(); } @@ -24635,13 +25798,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(); } @@ -24676,9 +25839,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter142 : this.part_vals) + for (String _iter146 : this.part_vals) { - oprot.writeString(_iter142); + oprot.writeString(_iter146); } oprot.writeListEnd(); } @@ -26735,13 +27898,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list143 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list143.size); - for (int _i144 = 0; _i144 < _list143.size; ++_i144) + TList _list147 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list147.size); + for (int _i148 = 0; _i148 < _list147.size; ++_i148) { - String _elem145; - _elem145 = iprot.readString(); - this.part_vals.add(_elem145); + String _elem149; + _elem149 = iprot.readString(); + this.part_vals.add(_elem149); } iprot.readListEnd(); } @@ -26784,9 +27947,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter146 : this.part_vals) + for (String _iter150 : this.part_vals) { - oprot.writeString(_iter146); + oprot.writeString(_iter150); } oprot.writeListEnd(); } @@ -28687,13 +29850,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list147 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list147.size); - for (int _i148 = 0; _i148 < _list147.size; ++_i148) + TList _list151 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list151.size); + for (int _i152 = 0; _i152 < _list151.size; ++_i152) { - String _elem149; - _elem149 = iprot.readString(); - this.part_vals.add(_elem149); + String _elem153; + _elem153 = iprot.readString(); + this.part_vals.add(_elem153); } iprot.readListEnd(); } @@ -28728,9 +29891,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter150 : this.part_vals) + for (String _iter154 : this.part_vals) { - oprot.writeString(_iter150); + oprot.writeString(_iter154); } oprot.writeListEnd(); } @@ -29788,13 +30951,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list151 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list151.size); - for (int _i152 = 0; _i152 < _list151.size; ++_i152) + TList _list155 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list155.size); + for (int _i156 = 0; _i156 < _list155.size; ++_i156) { - String _elem153; - _elem153 = iprot.readString(); - this.part_vals.add(_elem153); + String _elem157; + _elem157 = iprot.readString(); + this.part_vals.add(_elem157); } iprot.readListEnd(); } @@ -29812,13 +30975,13 @@ case 5: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list154 = iprot.readListBegin(); - this.group_names = new ArrayList(_list154.size); - for (int _i155 = 0; _i155 < _list154.size; ++_i155) + TList _list158 = iprot.readListBegin(); + this.group_names = new ArrayList(_list158.size); + for (int _i159 = 0; _i159 < _list158.size; ++_i159) { - String _elem156; - _elem156 = iprot.readString(); - this.group_names.add(_elem156); + String _elem160; + _elem160 = iprot.readString(); + this.group_names.add(_elem160); } iprot.readListEnd(); } @@ -29853,9 +31016,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter157 : this.part_vals) + for (String _iter161 : this.part_vals) { - oprot.writeString(_iter157); + oprot.writeString(_iter161); } oprot.writeListEnd(); } @@ -29870,9 +31033,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter158 : this.group_names) + for (String _iter162 : this.group_names) { - oprot.writeString(_iter158); + oprot.writeString(_iter162); } oprot.writeListEnd(); } @@ -32138,14 +33301,14 @@ 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) { - Partition _elem161; - _elem161 = new Partition(); - _elem161.read(iprot); - this.success.add(_elem161); + Partition _elem165; + _elem165 = new Partition(); + _elem165.read(iprot); + this.success.add(_elem165); } iprot.readListEnd(); } @@ -32185,9 +33348,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter162 : this.success) + for (Partition _iter166 : this.success) { - _iter162.write(oprot); + _iter166.write(oprot); } oprot.writeListEnd(); } @@ -32799,13 +33962,13 @@ case 5: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list163 = iprot.readListBegin(); - this.group_names = new ArrayList(_list163.size); - for (int _i164 = 0; _i164 < _list163.size; ++_i164) + TList _list167 = iprot.readListBegin(); + this.group_names = new ArrayList(_list167.size); + for (int _i168 = 0; _i168 < _list167.size; ++_i168) { - String _elem165; - _elem165 = iprot.readString(); - this.group_names.add(_elem165); + String _elem169; + _elem169 = iprot.readString(); + this.group_names.add(_elem169); } iprot.readListEnd(); } @@ -32848,9 +34011,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter166 : this.group_names) + for (String _iter170 : this.group_names) { - oprot.writeString(_iter166); + oprot.writeString(_iter170); } oprot.writeListEnd(); } @@ -33296,14 +34459,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(); } @@ -33343,9 +34506,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(); } @@ -34173,13 +35336,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list171 = iprot.readListBegin(); - this.success = new ArrayList(_list171.size); - for (int _i172 = 0; _i172 < _list171.size; ++_i172) + TList _list175 = iprot.readListBegin(); + this.success = new ArrayList(_list175.size); + for (int _i176 = 0; _i176 < _list175.size; ++_i176) { - String _elem173; - _elem173 = iprot.readString(); - this.success.add(_elem173); + String _elem177; + _elem177 = iprot.readString(); + this.success.add(_elem177); } iprot.readListEnd(); } @@ -34211,9 +35374,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter174 : this.success) + for (String _iter178 : this.success) { - oprot.writeString(_iter174); + oprot.writeString(_iter178); } oprot.writeListEnd(); } @@ -34730,13 +35893,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list175 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list175.size); - for (int _i176 = 0; _i176 < _list175.size; ++_i176) + TList _list179 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list179.size); + for (int _i180 = 0; _i180 < _list179.size; ++_i180) { - String _elem177; - _elem177 = iprot.readString(); - this.part_vals.add(_elem177); + String _elem181; + _elem181 = iprot.readString(); + this.part_vals.add(_elem181); } iprot.readListEnd(); } @@ -34779,9 +35942,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter178 : this.part_vals) + for (String _iter182 : this.part_vals) { - oprot.writeString(_iter178); + oprot.writeString(_iter182); } oprot.writeListEnd(); } @@ -35154,14 +36317,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(); } @@ -35193,9 +36356,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(); } @@ -35868,13 +37031,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(); } @@ -35900,13 +37063,13 @@ case 6: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list186 = iprot.readListBegin(); - this.group_names = new ArrayList(_list186.size); - for (int _i187 = 0; _i187 < _list186.size; ++_i187) + TList _list190 = iprot.readListBegin(); + this.group_names = new ArrayList(_list190.size); + for (int _i191 = 0; _i191 < _list190.size; ++_i191) { - String _elem188; - _elem188 = iprot.readString(); - this.group_names.add(_elem188); + String _elem192; + _elem192 = iprot.readString(); + this.group_names.add(_elem192); } iprot.readListEnd(); } @@ -35941,9 +37104,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter189 : this.part_vals) + for (String _iter193 : this.part_vals) { - oprot.writeString(_iter189); + oprot.writeString(_iter193); } oprot.writeListEnd(); } @@ -35961,9 +37124,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter190 : this.group_names) + for (String _iter194 : this.group_names) { - oprot.writeString(_iter190); + oprot.writeString(_iter194); } oprot.writeListEnd(); } @@ -36417,14 +37580,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(); } @@ -36464,9 +37627,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(); } @@ -36995,13 +38158,13 @@ case 3: // PART_VALS if (field.type == TType.LIST) { { - TList _list195 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list195.size); - for (int _i196 = 0; _i196 < _list195.size; ++_i196) + TList _list199 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list199.size); + for (int _i200 = 0; _i200 < _list199.size; ++_i200) { - String _elem197; - _elem197 = iprot.readString(); - this.part_vals.add(_elem197); + String _elem201; + _elem201 = iprot.readString(); + this.part_vals.add(_elem201); } iprot.readListEnd(); } @@ -37044,9 +38207,9 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter198 : this.part_vals) + for (String _iter202 : this.part_vals) { - oprot.writeString(_iter198); + oprot.writeString(_iter202); } oprot.writeListEnd(); } @@ -37419,13 +38582,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list199 = iprot.readListBegin(); - this.success = new ArrayList(_list199.size); - for (int _i200 = 0; _i200 < _list199.size; ++_i200) + TList _list203 = iprot.readListBegin(); + this.success = new ArrayList(_list203.size); + for (int _i204 = 0; _i204 < _list203.size; ++_i204) { - String _elem201; - _elem201 = iprot.readString(); - this.success.add(_elem201); + String _elem205; + _elem205 = iprot.readString(); + this.success.add(_elem205); } iprot.readListEnd(); } @@ -37457,9 +38620,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter202 : this.success) + for (String _iter206 : this.success) { - oprot.writeString(_iter202); + oprot.writeString(_iter206); } oprot.writeListEnd(); } @@ -38431,14 +39594,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list203 = iprot.readListBegin(); - this.success = new ArrayList(_list203.size); - for (int _i204 = 0; _i204 < _list203.size; ++_i204) + TList _list207 = iprot.readListBegin(); + this.success = new ArrayList(_list207.size); + for (int _i208 = 0; _i208 < _list207.size; ++_i208) { - Partition _elem205; - _elem205 = new Partition(); - _elem205.read(iprot); - this.success.add(_elem205); + Partition _elem209; + _elem209 = new Partition(); + _elem209.read(iprot); + this.success.add(_elem209); } iprot.readListEnd(); } @@ -38478,9 +39641,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter206 : this.success) + for (Partition _iter210 : this.success) { - _iter206.write(oprot); + _iter210.write(oprot); } oprot.writeListEnd(); } @@ -38936,13 +40099,13 @@ case 3: // NAMES if (field.type == TType.LIST) { { - TList _list207 = iprot.readListBegin(); - this.names = new ArrayList(_list207.size); - for (int _i208 = 0; _i208 < _list207.size; ++_i208) + TList _list211 = iprot.readListBegin(); + this.names = new ArrayList(_list211.size); + for (int _i212 = 0; _i212 < _list211.size; ++_i212) { - String _elem209; - _elem209 = iprot.readString(); - this.names.add(_elem209); + String _elem213; + _elem213 = iprot.readString(); + this.names.add(_elem213); } iprot.readListEnd(); } @@ -38977,9 +40140,9 @@ oprot.writeFieldBegin(NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.names.size())); - for (String _iter210 : this.names) + for (String _iter214 : this.names) { - oprot.writeString(_iter210); + oprot.writeString(_iter214); } oprot.writeListEnd(); } @@ -39413,14 +40576,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list211 = iprot.readListBegin(); - this.success = new ArrayList(_list211.size); - for (int _i212 = 0; _i212 < _list211.size; ++_i212) + TList _list215 = iprot.readListBegin(); + this.success = new ArrayList(_list215.size); + for (int _i216 = 0; _i216 < _list215.size; ++_i216) { - Partition _elem213; - _elem213 = new Partition(); - _elem213.read(iprot); - this.success.add(_elem213); + Partition _elem217; + _elem217 = new Partition(); + _elem217.read(iprot); + this.success.add(_elem217); } iprot.readListEnd(); } @@ -39460,9 +40623,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter214 : this.success) + for (Partition _iter218 : this.success) { - _iter214.write(oprot); + _iter218.write(oprot); } oprot.writeListEnd(); } @@ -41666,13 +42829,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list215 = iprot.readListBegin(); - this.success = new ArrayList(_list215.size); - for (int _i216 = 0; _i216 < _list215.size; ++_i216) + TList _list219 = iprot.readListBegin(); + this.success = new ArrayList(_list219.size); + for (int _i220 = 0; _i220 < _list219.size; ++_i220) { - String _elem217; - _elem217 = iprot.readString(); - this.success.add(_elem217); + String _elem221; + _elem221 = iprot.readString(); + this.success.add(_elem221); } iprot.readListEnd(); } @@ -41704,9 +42867,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter218 : this.success) + for (String _iter222 : this.success) { - oprot.writeString(_iter218); + oprot.writeString(_iter222); } oprot.writeListEnd(); } @@ -42351,15 +43514,15 @@ case 0: // SUCCESS if (field.type == TType.MAP) { { - TMap _map219 = iprot.readMapBegin(); - this.success = new HashMap(2*_map219.size); - for (int _i220 = 0; _i220 < _map219.size; ++_i220) + TMap _map223 = iprot.readMapBegin(); + this.success = new HashMap(2*_map223.size); + for (int _i224 = 0; _i224 < _map223.size; ++_i224) { - String _key221; - String _val222; - _key221 = iprot.readString(); - _val222 = iprot.readString(); - this.success.put(_key221, _val222); + String _key225; + String _val226; + _key225 = iprot.readString(); + _val226 = iprot.readString(); + this.success.put(_key225, _val226); } iprot.readMapEnd(); } @@ -42391,10 +43554,10 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); - for (Map.Entry _iter223 : this.success.entrySet()) + for (Map.Entry _iter227 : this.success.entrySet()) { - oprot.writeString(_iter223.getKey()); - oprot.writeString(_iter223.getValue()); + oprot.writeString(_iter227.getKey()); + oprot.writeString(_iter227.getValue()); } oprot.writeMapEnd(); } @@ -42923,15 +44086,15 @@ case 3: // PART_VALS if (field.type == TType.MAP) { { - TMap _map224 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map224.size); - for (int _i225 = 0; _i225 < _map224.size; ++_i225) + TMap _map228 = iprot.readMapBegin(); + this.part_vals = new HashMap(2*_map228.size); + for (int _i229 = 0; _i229 < _map228.size; ++_i229) { - String _key226; - String _val227; - _key226 = iprot.readString(); - _val227 = iprot.readString(); - this.part_vals.put(_key226, _val227); + String _key230; + String _val231; + _key230 = iprot.readString(); + _val231 = iprot.readString(); + this.part_vals.put(_key230, _val231); } iprot.readMapEnd(); } @@ -42973,10 +44136,10 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.part_vals.size())); - for (Map.Entry _iter228 : this.part_vals.entrySet()) + for (Map.Entry _iter232 : this.part_vals.entrySet()) { - oprot.writeString(_iter228.getKey()); - oprot.writeString(_iter228.getValue()); + oprot.writeString(_iter232.getKey()); + oprot.writeString(_iter232.getValue()); } oprot.writeMapEnd(); } @@ -44240,15 +45403,15 @@ case 3: // PART_VALS if (field.type == TType.MAP) { { - TMap _map229 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map229.size); - for (int _i230 = 0; _i230 < _map229.size; ++_i230) + TMap _map233 = iprot.readMapBegin(); + this.part_vals = new HashMap(2*_map233.size); + for (int _i234 = 0; _i234 < _map233.size; ++_i234) { - String _key231; - String _val232; - _key231 = iprot.readString(); - _val232 = iprot.readString(); - this.part_vals.put(_key231, _val232); + String _key235; + String _val236; + _key235 = iprot.readString(); + _val236 = iprot.readString(); + this.part_vals.put(_key235, _val236); } iprot.readMapEnd(); } @@ -44290,10 +45453,10 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.part_vals.size())); - for (Map.Entry _iter233 : this.part_vals.entrySet()) + for (Map.Entry _iter237 : this.part_vals.entrySet()) { - oprot.writeString(_iter233.getKey()); - oprot.writeString(_iter233.getValue()); + oprot.writeString(_iter237.getKey()); + oprot.writeString(_iter237.getValue()); } oprot.writeMapEnd(); } @@ -49719,14 +50882,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list234 = iprot.readListBegin(); - this.success = new ArrayList(_list234.size); - for (int _i235 = 0; _i235 < _list234.size; ++_i235) + TList _list238 = iprot.readListBegin(); + this.success = new ArrayList(_list238.size); + for (int _i239 = 0; _i239 < _list238.size; ++_i239) { - Index _elem236; - _elem236 = new Index(); - _elem236.read(iprot); - this.success.add(_elem236); + Index _elem240; + _elem240 = new Index(); + _elem240.read(iprot); + this.success.add(_elem240); } iprot.readListEnd(); } @@ -49766,9 +50929,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Index _iter237 : this.success) + for (Index _iter241 : this.success) { - _iter237.write(oprot); + _iter241.write(oprot); } oprot.writeListEnd(); } @@ -50596,13 +51759,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list238 = iprot.readListBegin(); - this.success = new ArrayList(_list238.size); - for (int _i239 = 0; _i239 < _list238.size; ++_i239) + TList _list242 = iprot.readListBegin(); + this.success = new ArrayList(_list242.size); + for (int _i243 = 0; _i243 < _list242.size; ++_i243) { - String _elem240; - _elem240 = iprot.readString(); - this.success.add(_elem240); + String _elem244; + _elem244 = iprot.readString(); + this.success.add(_elem244); } iprot.readListEnd(); } @@ -50634,9 +51797,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter241 : this.success) + for (String _iter245 : this.success) { - oprot.writeString(_iter241); + oprot.writeString(_iter245); } oprot.writeListEnd(); } @@ -52469,13 +53632,13 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list242 = iprot.readListBegin(); - this.success = new ArrayList(_list242.size); - for (int _i243 = 0; _i243 < _list242.size; ++_i243) + TList _list246 = iprot.readListBegin(); + this.success = new ArrayList(_list246.size); + for (int _i247 = 0; _i247 < _list246.size; ++_i247) { - String _elem244; - _elem244 = iprot.readString(); - this.success.add(_elem244); + String _elem248; + _elem248 = iprot.readString(); + this.success.add(_elem248); } iprot.readListEnd(); } @@ -52507,9 +53670,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter245 : this.success) + for (String _iter249 : this.success) { - oprot.writeString(_iter245); + oprot.writeString(_iter249); } oprot.writeListEnd(); } @@ -55185,14 +56348,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list246 = iprot.readListBegin(); - this.success = new ArrayList(_list246.size); - for (int _i247 = 0; _i247 < _list246.size; ++_i247) + TList _list250 = iprot.readListBegin(); + this.success = new ArrayList(_list250.size); + for (int _i251 = 0; _i251 < _list250.size; ++_i251) { - Role _elem248; - _elem248 = new Role(); - _elem248.read(iprot); - this.success.add(_elem248); + Role _elem252; + _elem252 = new Role(); + _elem252.read(iprot); + this.success.add(_elem252); } iprot.readListEnd(); } @@ -55224,9 +56387,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Role _iter249 : this.success) + for (Role _iter253 : this.success) { - _iter249.write(oprot); + _iter253.write(oprot); } oprot.writeListEnd(); } @@ -55671,13 +56834,13 @@ case 3: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list250 = iprot.readListBegin(); - this.group_names = new ArrayList(_list250.size); - for (int _i251 = 0; _i251 < _list250.size; ++_i251) + TList _list254 = iprot.readListBegin(); + this.group_names = new ArrayList(_list254.size); + for (int _i255 = 0; _i255 < _list254.size; ++_i255) { - String _elem252; - _elem252 = iprot.readString(); - this.group_names.add(_elem252); + String _elem256; + _elem256 = iprot.readString(); + this.group_names.add(_elem256); } iprot.readListEnd(); } @@ -55712,9 +56875,9 @@ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); - for (String _iter253 : this.group_names) + for (String _iter257 : this.group_names) { - oprot.writeString(_iter253); + oprot.writeString(_iter257); } oprot.writeListEnd(); } @@ -56913,14 +58076,14 @@ case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list254 = iprot.readListBegin(); - this.success = new ArrayList(_list254.size); - for (int _i255 = 0; _i255 < _list254.size; ++_i255) + TList _list258 = iprot.readListBegin(); + this.success = new ArrayList(_list258.size); + for (int _i259 = 0; _i259 < _list258.size; ++_i259) { - HiveObjectPrivilege _elem256; - _elem256 = new HiveObjectPrivilege(); - _elem256.read(iprot); - this.success.add(_elem256); + HiveObjectPrivilege _elem260; + _elem260 = new HiveObjectPrivilege(); + _elem260.read(iprot); + this.success.add(_elem260); } iprot.readListEnd(); } @@ -56952,9 +58115,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (HiveObjectPrivilege _iter257 : this.success) + for (HiveObjectPrivilege _iter261 : this.success) { - _iter257.write(oprot); + _iter261.write(oprot); } oprot.writeListEnd(); } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java (revision 1150966) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java (working copy) @@ -24,6 +24,12 @@ public static final String DDL_TIME = "transient_lastDdlTime"; + public static final String HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__"; + + public static final String HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__"; + + public static final String HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__"; + public static final String IS_ARCHIVED = "is_archived"; public static final String ORIGINAL_LOCATION = "original_location"; Index: metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_constants.php =================================================================== --- metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_constants.php (revision 1150966) +++ metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_constants.php (working copy) @@ -10,6 +10,12 @@ $GLOBALS['hive_metastore_CONSTANTS']['DDL_TIME'] = "transient_lastDdlTime"; +$GLOBALS['hive_metastore_CONSTANTS']['HIVE_FILTER_FIELD_OWNER'] = "hive_filter_field_owner__"; + +$GLOBALS['hive_metastore_CONSTANTS']['HIVE_FILTER_FIELD_PARAMS'] = "hive_filter_field_params__"; + +$GLOBALS['hive_metastore_CONSTANTS']['HIVE_FILTER_FIELD_LAST_ACCESS'] = "hive_filter_field_last_access__"; + $GLOBALS['hive_metastore_CONSTANTS']['IS_ARCHIVED'] = "is_archived"; $GLOBALS['hive_metastore_CONSTANTS']['ORIGINAL_LOCATION'] = "original_location"; Index: metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php =================================================================== --- metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (revision 1150966) +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (working copy) @@ -28,6 +28,7 @@ public function get_all_tables($db_name); public function get_table($dbname, $tbl_name); public function get_table_objects_by_name($dbname, $tbl_names); + public function get_table_names_by_filter($dbname, $filter, $max_tables); public function alter_table($dbname, $tbl_name, $new_tbl); public function add_partition($new_part); public function add_partitions($new_parts); @@ -1107,6 +1108,68 @@ throw new Exception("get_table_objects_by_name failed: unknown result"); } + public function get_table_names_by_filter($dbname, $filter, $max_tables) + { + $this->send_get_table_names_by_filter($dbname, $filter, $max_tables); + return $this->recv_get_table_names_by_filter(); + } + + public function send_get_table_names_by_filter($dbname, $filter, $max_tables) + { + $args = new metastore_ThriftHiveMetastore_get_table_names_by_filter_args(); + $args->dbname = $dbname; + $args->filter = $filter; + $args->max_tables = $max_tables; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_names_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_names_by_filter', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_names_by_filter() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_table_names_by_filter_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_table_names_by_filter_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("get_table_names_by_filter failed: unknown result"); + } + public function alter_table($dbname, $tbl_name, $new_tbl) { $this->send_alter_table($dbname, $tbl_name, $new_tbl); @@ -7417,6 +7480,282 @@ } +class metastore_ThriftHiveMetastore_get_table_names_by_filter_args { + static $_TSPEC; + + public $dbname = null; + public $filter = null; + public $max_tables = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'filter', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_tables', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_tables'])) { + $this->max_tables = $vals['max_tables']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_names_by_filter_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->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_tables); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_tables !== null) { + $xfer += $output->writeFieldBegin('max_tables', TType::I16, 3); + $xfer += $output->writeI16($this->max_tables); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_table_names_by_filter_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_names_by_filter_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size239 = 0; + $_etype242 = 0; + $xfer += $input->readListBegin($_etype242, $_size239); + for ($_i243 = 0; $_i243 < $_size239; ++$_i243) + { + $elem244 = null; + $xfer += $input->readString($elem244); + $this->success []= $elem244; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter245) + { + $xfer += $output->writeString($iter245); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class metastore_ThriftHiveMetastore_alter_table_args { static $_TSPEC; @@ -7898,15 +8237,15 @@ case 1: if ($ftype == TType::LST) { $this->new_parts = 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; - $elem244 = new metastore_Partition(); - $xfer += $elem244->read($input); - $this->new_parts []= $elem244; + $elem251 = null; + $elem251 = new metastore_Partition(); + $xfer += $elem251->read($input); + $this->new_parts []= $elem251; } $xfer += $input->readListEnd(); } else { @@ -7934,9 +8273,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->new_parts)); { - foreach ($this->new_parts as $iter245) + foreach ($this->new_parts as $iter252) { - $xfer += $iter245->write($output); + $xfer += $iter252->write($output); } } $output->writeListEnd(); @@ -8165,14 +8504,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 { @@ -8210,9 +8549,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter252) + foreach ($this->part_vals as $iter259) { - $xfer += $output->writeString($iter252); + $xfer += $output->writeString($iter259); } } $output->writeListEnd(); @@ -8709,14 +9048,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size253 = 0; - $_etype256 = 0; - $xfer += $input->readListBegin($_etype256, $_size253); - for ($_i257 = 0; $_i257 < $_size253; ++$_i257) + $_size260 = 0; + $_etype263 = 0; + $xfer += $input->readListBegin($_etype263, $_size260); + for ($_i264 = 0; $_i264 < $_size260; ++$_i264) { - $elem258 = null; - $xfer += $input->readString($elem258); - $this->part_vals []= $elem258; + $elem265 = null; + $xfer += $input->readString($elem265); + $this->part_vals []= $elem265; } $xfer += $input->readListEnd(); } else { @@ -8761,9 +9100,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter259) + foreach ($this->part_vals as $iter266) { - $xfer += $output->writeString($iter259); + $xfer += $output->writeString($iter266); } } $output->writeListEnd(); @@ -9223,14 +9562,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = 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; - $xfer += $input->readString($elem265); - $this->part_vals []= $elem265; + $elem272 = null; + $xfer += $input->readString($elem272); + $this->part_vals []= $elem272; } $xfer += $input->readListEnd(); } else { @@ -9268,9 +9607,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter266) + foreach ($this->part_vals as $iter273) { - $xfer += $output->writeString($iter266); + $xfer += $output->writeString($iter273); } } $output->writeListEnd(); @@ -9502,14 +9841,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = 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->part_vals []= $elem272; + $elem279 = null; + $xfer += $input->readString($elem279); + $this->part_vals []= $elem279; } $xfer += $input->readListEnd(); } else { @@ -9526,14 +9865,14 @@ case 5: if ($ftype == TType::LST) { $this->group_names = array(); - $_size273 = 0; - $_etype276 = 0; - $xfer += $input->readListBegin($_etype276, $_size273); - for ($_i277 = 0; $_i277 < $_size273; ++$_i277) + $_size280 = 0; + $_etype283 = 0; + $xfer += $input->readListBegin($_etype283, $_size280); + for ($_i284 = 0; $_i284 < $_size280; ++$_i284) { - $elem278 = null; - $xfer += $input->readString($elem278); - $this->group_names []= $elem278; + $elem285 = null; + $xfer += $input->readString($elem285); + $this->group_names []= $elem285; } $xfer += $input->readListEnd(); } else { @@ -9571,9 +9910,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter279) + foreach ($this->part_vals as $iter286) { - $xfer += $output->writeString($iter279); + $xfer += $output->writeString($iter286); } } $output->writeListEnd(); @@ -9593,9 +9932,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter280) + foreach ($this->group_names as $iter287) { - $xfer += $output->writeString($iter280); + $xfer += $output->writeString($iter287); } } $output->writeListEnd(); @@ -10141,15 +10480,15 @@ 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; - $elem286 = new metastore_Partition(); - $xfer += $elem286->read($input); - $this->success []= $elem286; + $elem293 = null; + $elem293 = new metastore_Partition(); + $xfer += $elem293->read($input); + $this->success []= $elem293; } $xfer += $input->readListEnd(); } else { @@ -10193,9 +10532,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter287) + foreach ($this->success as $iter294) { - $xfer += $iter287->write($output); + $xfer += $iter294->write($output); } } $output->writeListEnd(); @@ -10326,14 +10665,14 @@ case 5: if ($ftype == TType::LST) { $this->group_names = 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->group_names []= $elem293; + $elem300 = null; + $xfer += $input->readString($elem300); + $this->group_names []= $elem300; } $xfer += $input->readListEnd(); } else { @@ -10381,9 +10720,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter294) + foreach ($this->group_names as $iter301) { - $xfer += $output->writeString($iter294); + $xfer += $output->writeString($iter301); } } $output->writeListEnd(); @@ -10463,15 +10802,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 { @@ -10515,9 +10854,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(); @@ -10709,14 +11048,14 @@ case 0: if ($ftype == TType::LST) { $this->success = 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->success []= $elem307; + $elem314 = null; + $xfer += $input->readString($elem314); + $this->success []= $elem314; } $xfer += $input->readListEnd(); } else { @@ -10752,9 +11091,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter308) + foreach ($this->success as $iter315) { - $xfer += $output->writeString($iter308); + $xfer += $output->writeString($iter315); } } $output->writeListEnd(); @@ -10858,14 +11197,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size309 = 0; - $_etype312 = 0; - $xfer += $input->readListBegin($_etype312, $_size309); - for ($_i313 = 0; $_i313 < $_size309; ++$_i313) + $_size316 = 0; + $_etype319 = 0; + $xfer += $input->readListBegin($_etype319, $_size316); + for ($_i320 = 0; $_i320 < $_size316; ++$_i320) { - $elem314 = null; - $xfer += $input->readString($elem314); - $this->part_vals []= $elem314; + $elem321 = null; + $xfer += $input->readString($elem321); + $this->part_vals []= $elem321; } $xfer += $input->readListEnd(); } else { @@ -10910,9 +11249,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter315) + foreach ($this->part_vals as $iter322) { - $xfer += $output->writeString($iter315); + $xfer += $output->writeString($iter322); } } $output->writeListEnd(); @@ -10988,15 +11327,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 { @@ -11032,9 +11371,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(); @@ -11158,14 +11497,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 { @@ -11189,14 +11528,14 @@ case 6: if ($ftype == TType::LST) { $this->group_names = array(); - $_size329 = 0; - $_etype332 = 0; - $xfer += $input->readListBegin($_etype332, $_size329); - for ($_i333 = 0; $_i333 < $_size329; ++$_i333) + $_size336 = 0; + $_etype339 = 0; + $xfer += $input->readListBegin($_etype339, $_size336); + for ($_i340 = 0; $_i340 < $_size336; ++$_i340) { - $elem334 = null; - $xfer += $input->readString($elem334); - $this->group_names []= $elem334; + $elem341 = null; + $xfer += $input->readString($elem341); + $this->group_names []= $elem341; } $xfer += $input->readListEnd(); } else { @@ -11234,9 +11573,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter335) + foreach ($this->part_vals as $iter342) { - $xfer += $output->writeString($iter335); + $xfer += $output->writeString($iter342); } } $output->writeListEnd(); @@ -11261,9 +11600,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter336) + foreach ($this->group_names as $iter343) { - $xfer += $output->writeString($iter336); + $xfer += $output->writeString($iter343); } } $output->writeListEnd(); @@ -11343,15 +11682,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 { @@ -11395,9 +11734,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(); @@ -11506,14 +11845,14 @@ case 3: if ($ftype == TType::LST) { $this->part_vals = 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->part_vals []= $elem349; + $elem356 = null; + $xfer += $input->readString($elem356); + $this->part_vals []= $elem356; } $xfer += $input->readListEnd(); } else { @@ -11558,9 +11897,9 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter350) + foreach ($this->part_vals as $iter357) { - $xfer += $output->writeString($iter350); + $xfer += $output->writeString($iter357); } } $output->writeListEnd(); @@ -11635,14 +11974,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size351 = 0; - $_etype354 = 0; - $xfer += $input->readListBegin($_etype354, $_size351); - for ($_i355 = 0; $_i355 < $_size351; ++$_i355) + $_size358 = 0; + $_etype361 = 0; + $xfer += $input->readListBegin($_etype361, $_size358); + for ($_i362 = 0; $_i362 < $_size358; ++$_i362) { - $elem356 = null; - $xfer += $input->readString($elem356); - $this->success []= $elem356; + $elem363 = null; + $xfer += $input->readString($elem363); + $this->success []= $elem363; } $xfer += $input->readListEnd(); } else { @@ -11678,9 +12017,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter357) + foreach ($this->success as $iter364) { - $xfer += $output->writeString($iter357); + $xfer += $output->writeString($iter364); } } $output->writeListEnd(); @@ -11897,15 +12236,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size358 = 0; - $_etype361 = 0; - $xfer += $input->readListBegin($_etype361, $_size358); - for ($_i362 = 0; $_i362 < $_size358; ++$_i362) + $_size365 = 0; + $_etype368 = 0; + $xfer += $input->readListBegin($_etype368, $_size365); + for ($_i369 = 0; $_i369 < $_size365; ++$_i369) { - $elem363 = null; - $elem363 = new metastore_Partition(); - $xfer += $elem363->read($input); - $this->success []= $elem363; + $elem370 = null; + $elem370 = new metastore_Partition(); + $xfer += $elem370->read($input); + $this->success []= $elem370; } $xfer += $input->readListEnd(); } else { @@ -11949,9 +12288,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter364) + foreach ($this->success as $iter371) { - $xfer += $iter364->write($output); + $xfer += $iter371->write($output); } } $output->writeListEnd(); @@ -12052,14 +12391,14 @@ case 3: if ($ftype == TType::LST) { $this->names = array(); - $_size365 = 0; - $_etype368 = 0; - $xfer += $input->readListBegin($_etype368, $_size365); - for ($_i369 = 0; $_i369 < $_size365; ++$_i369) + $_size372 = 0; + $_etype375 = 0; + $xfer += $input->readListBegin($_etype375, $_size372); + for ($_i376 = 0; $_i376 < $_size372; ++$_i376) { - $elem370 = null; - $xfer += $input->readString($elem370); - $this->names []= $elem370; + $elem377 = null; + $xfer += $input->readString($elem377); + $this->names []= $elem377; } $xfer += $input->readListEnd(); } else { @@ -12097,9 +12436,9 @@ { $output->writeListBegin(TType::STRING, count($this->names)); { - foreach ($this->names as $iter371) + foreach ($this->names as $iter378) { - $xfer += $output->writeString($iter371); + $xfer += $output->writeString($iter378); } } $output->writeListEnd(); @@ -12179,15 +12518,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size372 = 0; - $_etype375 = 0; - $xfer += $input->readListBegin($_etype375, $_size372); - for ($_i376 = 0; $_i376 < $_size372; ++$_i376) + $_size379 = 0; + $_etype382 = 0; + $xfer += $input->readListBegin($_etype382, $_size379); + for ($_i383 = 0; $_i383 < $_size379; ++$_i383) { - $elem377 = null; - $elem377 = new metastore_Partition(); - $xfer += $elem377->read($input); - $this->success []= $elem377; + $elem384 = null; + $elem384 = new metastore_Partition(); + $xfer += $elem384->read($input); + $this->success []= $elem384; } $xfer += $input->readListEnd(); } else { @@ -12231,9 +12570,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter378) + foreach ($this->success as $iter385) { - $xfer += $iter378->write($output); + $xfer += $iter385->write($output); } } $output->writeListEnd(); @@ -12784,14 +13123,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size379 = 0; - $_etype382 = 0; - $xfer += $input->readListBegin($_etype382, $_size379); - for ($_i383 = 0; $_i383 < $_size379; ++$_i383) + $_size386 = 0; + $_etype389 = 0; + $xfer += $input->readListBegin($_etype389, $_size386); + for ($_i390 = 0; $_i390 < $_size386; ++$_i390) { - $elem384 = null; - $xfer += $input->readString($elem384); - $this->success []= $elem384; + $elem391 = null; + $xfer += $input->readString($elem391); + $this->success []= $elem391; } $xfer += $input->readListEnd(); } else { @@ -12827,9 +13166,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter385) + foreach ($this->success as $iter392) { - $xfer += $output->writeString($iter385); + $xfer += $output->writeString($iter392); } } $output->writeListEnd(); @@ -12980,17 +13319,17 @@ case 0: if ($ftype == TType::MAP) { $this->success = array(); - $_size386 = 0; - $_ktype387 = 0; - $_vtype388 = 0; - $xfer += $input->readMapBegin($_ktype387, $_vtype388, $_size386); - for ($_i390 = 0; $_i390 < $_size386; ++$_i390) + $_size393 = 0; + $_ktype394 = 0; + $_vtype395 = 0; + $xfer += $input->readMapBegin($_ktype394, $_vtype395, $_size393); + for ($_i397 = 0; $_i397 < $_size393; ++$_i397) { - $key391 = ''; - $val392 = ''; - $xfer += $input->readString($key391); - $xfer += $input->readString($val392); - $this->success[$key391] = $val392; + $key398 = ''; + $val399 = ''; + $xfer += $input->readString($key398); + $xfer += $input->readString($val399); + $this->success[$key398] = $val399; } $xfer += $input->readMapEnd(); } else { @@ -13026,10 +13365,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); { - foreach ($this->success as $kiter393 => $viter394) + foreach ($this->success as $kiter400 => $viter401) { - $xfer += $output->writeString($kiter393); - $xfer += $output->writeString($viter394); + $xfer += $output->writeString($kiter400); + $xfer += $output->writeString($viter401); } } $output->writeMapEnd(); @@ -13137,17 +13476,17 @@ case 3: if ($ftype == TType::MAP) { $this->part_vals = array(); - $_size395 = 0; - $_ktype396 = 0; - $_vtype397 = 0; - $xfer += $input->readMapBegin($_ktype396, $_vtype397, $_size395); - for ($_i399 = 0; $_i399 < $_size395; ++$_i399) + $_size402 = 0; + $_ktype403 = 0; + $_vtype404 = 0; + $xfer += $input->readMapBegin($_ktype403, $_vtype404, $_size402); + for ($_i406 = 0; $_i406 < $_size402; ++$_i406) { - $key400 = ''; - $val401 = ''; - $xfer += $input->readString($key400); - $xfer += $input->readString($val401); - $this->part_vals[$key400] = $val401; + $key407 = ''; + $val408 = ''; + $xfer += $input->readString($key407); + $xfer += $input->readString($val408); + $this->part_vals[$key407] = $val408; } $xfer += $input->readMapEnd(); } else { @@ -13192,10 +13531,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $kiter402 => $viter403) + foreach ($this->part_vals as $kiter409 => $viter410) { - $xfer += $output->writeString($kiter402); - $xfer += $output->writeString($viter403); + $xfer += $output->writeString($kiter409); + $xfer += $output->writeString($viter410); } } $output->writeMapEnd(); @@ -13487,17 +13826,17 @@ case 3: if ($ftype == TType::MAP) { $this->part_vals = array(); - $_size404 = 0; - $_ktype405 = 0; - $_vtype406 = 0; - $xfer += $input->readMapBegin($_ktype405, $_vtype406, $_size404); - for ($_i408 = 0; $_i408 < $_size404; ++$_i408) + $_size411 = 0; + $_ktype412 = 0; + $_vtype413 = 0; + $xfer += $input->readMapBegin($_ktype412, $_vtype413, $_size411); + for ($_i415 = 0; $_i415 < $_size411; ++$_i415) { - $key409 = ''; - $val410 = ''; - $xfer += $input->readString($key409); - $xfer += $input->readString($val410); - $this->part_vals[$key409] = $val410; + $key416 = ''; + $val417 = ''; + $xfer += $input->readString($key416); + $xfer += $input->readString($val417); + $this->part_vals[$key416] = $val417; } $xfer += $input->readMapEnd(); } else { @@ -13542,10 +13881,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $kiter411 => $viter412) + foreach ($this->part_vals as $kiter418 => $viter419) { - $xfer += $output->writeString($kiter411); - $xfer += $output->writeString($viter412); + $xfer += $output->writeString($kiter418); + $xfer += $output->writeString($viter419); } } $output->writeMapEnd(); @@ -14905,15 +15244,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size413 = 0; - $_etype416 = 0; - $xfer += $input->readListBegin($_etype416, $_size413); - for ($_i417 = 0; $_i417 < $_size413; ++$_i417) + $_size420 = 0; + $_etype423 = 0; + $xfer += $input->readListBegin($_etype423, $_size420); + for ($_i424 = 0; $_i424 < $_size420; ++$_i424) { - $elem418 = null; - $elem418 = new metastore_Index(); - $xfer += $elem418->read($input); - $this->success []= $elem418; + $elem425 = null; + $elem425 = new metastore_Index(); + $xfer += $elem425->read($input); + $this->success []= $elem425; } $xfer += $input->readListEnd(); } else { @@ -14957,9 +15296,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter419) + foreach ($this->success as $iter426) { - $xfer += $iter419->write($output); + $xfer += $iter426->write($output); } } $output->writeListEnd(); @@ -15151,14 +15490,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size420 = 0; - $_etype423 = 0; - $xfer += $input->readListBegin($_etype423, $_size420); - for ($_i424 = 0; $_i424 < $_size420; ++$_i424) + $_size427 = 0; + $_etype430 = 0; + $xfer += $input->readListBegin($_etype430, $_size427); + for ($_i431 = 0; $_i431 < $_size427; ++$_i431) { - $elem425 = null; - $xfer += $input->readString($elem425); - $this->success []= $elem425; + $elem432 = null; + $xfer += $input->readString($elem432); + $this->success []= $elem432; } $xfer += $input->readListEnd(); } else { @@ -15194,9 +15533,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter426) + foreach ($this->success as $iter433) { - $xfer += $output->writeString($iter426); + $xfer += $output->writeString($iter433); } } $output->writeListEnd(); @@ -15658,14 +15997,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size427 = 0; - $_etype430 = 0; - $xfer += $input->readListBegin($_etype430, $_size427); - for ($_i431 = 0; $_i431 < $_size427; ++$_i431) + $_size434 = 0; + $_etype437 = 0; + $xfer += $input->readListBegin($_etype437, $_size434); + for ($_i438 = 0; $_i438 < $_size434; ++$_i438) { - $elem432 = null; - $xfer += $input->readString($elem432); - $this->success []= $elem432; + $elem439 = null; + $xfer += $input->readString($elem439); + $this->success []= $elem439; } $xfer += $input->readListEnd(); } else { @@ -15701,9 +16040,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter433) + foreach ($this->success as $iter440) { - $xfer += $output->writeString($iter433); + $xfer += $output->writeString($iter440); } } $output->writeListEnd(); @@ -16343,15 +16682,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size434 = 0; - $_etype437 = 0; - $xfer += $input->readListBegin($_etype437, $_size434); - for ($_i438 = 0; $_i438 < $_size434; ++$_i438) + $_size441 = 0; + $_etype444 = 0; + $xfer += $input->readListBegin($_etype444, $_size441); + for ($_i445 = 0; $_i445 < $_size441; ++$_i445) { - $elem439 = null; - $elem439 = new metastore_Role(); - $xfer += $elem439->read($input); - $this->success []= $elem439; + $elem446 = null; + $elem446 = new metastore_Role(); + $xfer += $elem446->read($input); + $this->success []= $elem446; } $xfer += $input->readListEnd(); } else { @@ -16387,9 +16726,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter440) + foreach ($this->success as $iter447) { - $xfer += $iter440->write($output); + $xfer += $iter447->write($output); } } $output->writeListEnd(); @@ -16487,14 +16826,14 @@ case 3: if ($ftype == TType::LST) { $this->group_names = array(); - $_size441 = 0; - $_etype444 = 0; - $xfer += $input->readListBegin($_etype444, $_size441); - for ($_i445 = 0; $_i445 < $_size441; ++$_i445) + $_size448 = 0; + $_etype451 = 0; + $xfer += $input->readListBegin($_etype451, $_size448); + for ($_i452 = 0; $_i452 < $_size448; ++$_i452) { - $elem446 = null; - $xfer += $input->readString($elem446); - $this->group_names []= $elem446; + $elem453 = null; + $xfer += $input->readString($elem453); + $this->group_names []= $elem453; } $xfer += $input->readListEnd(); } else { @@ -16535,9 +16874,9 @@ { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter447) + foreach ($this->group_names as $iter454) { - $xfer += $output->writeString($iter447); + $xfer += $output->writeString($iter454); } } $output->writeListEnd(); @@ -16824,15 +17163,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size448 = 0; - $_etype451 = 0; - $xfer += $input->readListBegin($_etype451, $_size448); - for ($_i452 = 0; $_i452 < $_size448; ++$_i452) + $_size455 = 0; + $_etype458 = 0; + $xfer += $input->readListBegin($_etype458, $_size455); + for ($_i459 = 0; $_i459 < $_size455; ++$_i459) { - $elem453 = null; - $elem453 = new metastore_HiveObjectPrivilege(); - $xfer += $elem453->read($input); - $this->success []= $elem453; + $elem460 = null; + $elem460 = new metastore_HiveObjectPrivilege(); + $xfer += $elem460->read($input); + $this->success []= $elem460; } $xfer += $input->readListEnd(); } else { @@ -16868,9 +17207,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter454) + foreach ($this->success as $iter461) { - $xfer += $iter454->write($output); + $xfer += $iter461->write($output); } } $output->writeListEnd(); Index: metastore/if/hive_metastore.thrift =================================================================== --- metastore/if/hive_metastore.thrift (revision 1150966) +++ metastore/if/hive_metastore.thrift (working copy) @@ -43,6 +43,10 @@ GROUP = 3, } +const string HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" +const string HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" +const string HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__" + enum PartitionEventType { LOAD_DONE = 1, } @@ -258,9 +262,46 @@ Table get_table(1:string dbname, 2:string tbl_name) throws (1:MetaException o1, 2:NoSuchObjectException o2) - list
get_table_objects_by_name(1:string dbname, 2:list tbl_names) - throws (1:MetaException o1, 2:InvalidOperationException o2, 3:UnknownDBException o3) - + list
get_table_objects_by_name(1:string dbname, 2:list tbl_names) + throws (1:MetaException o1, 2:InvalidOperationException o2, 3:UnknownDBException o3) + + // Get a list of table names that match a filter. + // The filter operators are LIKE, <, <=, >, >=, =, <> + // + // In the filter statement, values interpreted as strings must be enclosed in quotes, + // while values interpreted as integers should not be. Strings and integers are the only + // supported value types. + // + // The currently supported key names in the filter are: + // Constants.HIVE_FILTER_FIELD_OWNER, which filters on the tables' owner's name + // and supports all filter operators + // Constants.HIVE_FILTER_FIELD_LAST_ACCESS, which filters on the last access times + // and supports all filter operators except LIKE + // Constants.HIVE_FILTER_FIELD_PARAMS, which filters on the tables' parameter keys and values + // and only supports the filter operators = and <>. + // Append the parameter key name to HIVE_FILTER_FIELD_PARAMS in the filter statement. + // For example, to filter on parameter keys called "retention", the key name in the filter + // statement should be Constants.HIVE_FILTER_FIELD_PARAMS + "retention" + // Also, = and <> only work for keys that exist + // in the tables. E.g., if you are looking for tables where key1 <> value, it will only + // look at tables that have a value for the parameter key1. + // Some example filter statements include: + // filter = Constants.HIVE_FILTER_FIELD_OWNER + " like \".*test.*\" and " + + // Constants.HIVE_FILTER_FIELD_LAST_ACCESS + " = 0"; + // filter = Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"30\" or " + + // Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"90\"" + // @param dbName + // The name of the database from which you will retrieve the table names + // @param filterType + // The type of filter + // @param filter + // The filter string + // @param max_tables + // The maximum number of tables returned + // @return A list of table names that match the desired filter + list get_table_names_by_filter(1:string dbname, 2:string filter, 3:i16 max_tables=-1) + throws (1:MetaException o1, 2:InvalidOperationException o2, 3:UnknownDBException o3) + // alter table applies to only future partitions not for existing partitions // * See notes on DDL_TIME void alter_table(1:string dbname, 2:string tbl_name, 3:Table new_tbl)