Index: hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java =================================================================== --- hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java (revision 1406838) +++ hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java (working copy) @@ -30,7 +30,7 @@ import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.io.ByteWritable; import org.apache.hadoop.hive.serde2.io.DoubleWritable; @@ -234,7 +234,7 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "key,abyte,ashort,aint,along,afloat,adouble,astring,abool"); tbl.setProperty("columns.types", "string,tinyint:smallint:int:bigint:float:double:string:boolean"); @@ -249,7 +249,7 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "key,abyte,ashort,aint,along,afloat,adouble,astring,abool"); tbl.setProperty("columns.types", "string,tinyint:smallint:int:bigint:float:double:string:boolean"); @@ -264,7 +264,7 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "key,abyte,ashort,aint,along,afloat,adouble,astring,abool"); tbl.setProperty("columns.types", "string,tinyint:smallint:int:bigint:float:double:string:boolean"); @@ -281,7 +281,7 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "key,abyte,ashort,aint,along,afloat,adouble,astring,abool"); tbl.setProperty("columns.types", "string,tinyint:smallint:int:bigint:float:double:string:boolean"); @@ -375,7 +375,7 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "key,abyte,ashort,aint,along,afloat,adouble,astring,abool"); tbl.setProperty("columns.types", "string,tinyint:smallint:int:bigint:float:double:string:boolean"); @@ -390,7 +390,7 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "key,abyte,ashort,aint,along,afloat,adouble,astring,abool"); tbl.setProperty("columns.types", "string,tinyint:smallint:int:bigint:float:double:string:boolean"); @@ -405,7 +405,7 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "key,abyte,ashort,aint,along,afloat,adouble,astring,abool"); tbl.setProperty("columns.types", "string,tinyint:smallint:int:bigint:float:double:string:boolean"); @@ -542,10 +542,10 @@ private Properties createPropertiesForHiveMapHBaseColumnFamily() { Properties tbl = new Properties(); - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); - tbl.setProperty(Constants.LIST_COLUMNS, + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.LIST_COLUMNS, "key,valint,valbyte,valshort,vallong,valfloat,valdouble,valbool"); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string:map:map:map:map:" + "map:map:map"); tbl.setProperty(HBaseSerDe.HBASE_COLUMNS_MAPPING, @@ -556,10 +556,10 @@ private Properties createPropertiesForHiveMapHBaseColumnFamilyII() { Properties tbl = new Properties(); - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); - tbl.setProperty(Constants.LIST_COLUMNS, + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.LIST_COLUMNS, "key,valint,valbyte,valshort,vallong,valfloat,valdouble,valbool"); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string:map:map:map:map:" + "map:map:map"); tbl.setProperty(HBaseSerDe.HBASE_COLUMNS_MAPPING, @@ -627,10 +627,10 @@ private Properties createPropertiesForHiveMapHBaseColumnFamilyII_I() { Properties tbl = new Properties(); - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); - tbl.setProperty(Constants.LIST_COLUMNS, + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.LIST_COLUMNS, "key,valbyte,valshort,valint,vallong,valfloat,valdouble,valstring,valbool"); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string:map:map:map:map:" + "map:map:map:map"); tbl.setProperty(HBaseSerDe.HBASE_COLUMNS_MAPPING, @@ -641,10 +641,10 @@ private Properties createPropertiesForHiveMapHBaseColumnFamilyII_II() { Properties tbl = new Properties(); - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); - tbl.setProperty(Constants.LIST_COLUMNS, + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.LIST_COLUMNS, "key,valbyte,valshort,valint,vallong,valfloat,valdouble,valstring,valbool"); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string:map:map:map:map:" + "map:map:map:map"); tbl.setProperty(HBaseSerDe.HBASE_COLUMNS_MAPPING, Index: metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java =================================================================== --- metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java (revision 1406838) +++ metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java (working copy) @@ -36,7 +36,7 @@ import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.tools.HiveMetaTool; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.avro.AvroSerdeUtils; import org.apache.hadoop.util.StringUtils; @@ -92,9 +92,9 @@ typ1.setName(typeName); typ1.setFields(new ArrayList(2)); typ1.getFields().add( - new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); typ1.getFields().add( - new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); client.createType(typ1); Table tbl = new Table(); @@ -113,7 +113,7 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "1"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "1"); sd.getParameters().put(AvroSerdeUtils.SCHEMA_URL, avroUri); sd.getSerdeInfo().setSerializationLib( org.apache.hadoop.hive.serde2.avro.AvroSerDe.class.getName()); @@ -137,7 +137,7 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "1"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "1"); sd.getParameters().put(AvroSerdeUtils.SCHEMA_URL, badAvroUri); sd.getSerdeInfo().setSerializationLib( org.apache.hadoop.hive.serde2.avro.AvroSerDe.class.getName()); Index: metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java =================================================================== --- metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (revision 1406838) +++ metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (working copy) @@ -59,7 +59,7 @@ import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.api.UnknownDBException; import org.apache.hadoop.hive.ql.exec.Utilities; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.util.StringUtils; import org.apache.thrift.TException; @@ -155,9 +155,9 @@ typ1.setName(typeName); typ1.setFields(new ArrayList(2)); typ1.getFields().add( - new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); typ1.getFields().add( - new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); client.createType(typ1); Table tbl = new Table(); @@ -176,7 +176,7 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters() - .put(Constants.SERIALIZATION_FORMAT, "1"); + .put(serdeConstants.SERIALIZATION_FORMAT, "1"); sd.setSortCols(new ArrayList()); //skewed information @@ -191,9 +191,9 @@ tbl.setPartitionKeys(new ArrayList(2)); tbl.getPartitionKeys().add( - new FieldSchema("ds", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("ds", serdeConstants.STRING_TYPE_NAME, "")); tbl.getPartitionKeys().add( - new FieldSchema("hr", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("hr", serdeConstants.STRING_TYPE_NAME, "")); client.createTable(tbl); @@ -603,8 +603,8 @@ client.createDatabase(db); ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); Table tbl = new Table(); tbl.setDbName(dbName); @@ -622,14 +622,14 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters() - .put(Constants.SERIALIZATION_FORMAT, "1"); + .put(serdeConstants.SERIALIZATION_FORMAT, "1"); sd.setSortCols(new ArrayList()); tbl.setPartitionKeys(new ArrayList(2)); tbl.getPartitionKeys().add( - new FieldSchema("ds", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("ds", serdeConstants.STRING_TYPE_NAME, "")); tbl.getPartitionKeys().add( - new FieldSchema("hr", Constants.INT_TYPE_NAME, "")); + new FieldSchema("hr", serdeConstants.INT_TYPE_NAME, "")); client.createTable(tbl); @@ -699,8 +699,8 @@ client.createDatabase(db); ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); Table tbl = new Table(); tbl.setDbName(dbName); @@ -718,14 +718,14 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters() - .put(Constants.SERIALIZATION_FORMAT, "1"); + .put(serdeConstants.SERIALIZATION_FORMAT, "1"); sd.setSortCols(new ArrayList()); tbl.setPartitionKeys(new ArrayList(2)); tbl.getPartitionKeys().add( - new FieldSchema("ds", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("ds", serdeConstants.STRING_TYPE_NAME, "")); tbl.getPartitionKeys().add( - new FieldSchema("hr", Constants.INT_TYPE_NAME, "")); + new FieldSchema("hr", serdeConstants.INT_TYPE_NAME, "")); client.createTable(tbl); @@ -943,23 +943,23 @@ public void testSimpleTypeApi() throws Exception { try { - client.dropType(Constants.INT_TYPE_NAME); + client.dropType(serdeConstants.INT_TYPE_NAME); Type typ1 = new Type(); - typ1.setName(Constants.INT_TYPE_NAME); + typ1.setName(serdeConstants.INT_TYPE_NAME); boolean ret = client.createType(typ1); assertTrue("Unable to create type", ret); - Type typ1_2 = client.getType(Constants.INT_TYPE_NAME); + Type typ1_2 = client.getType(serdeConstants.INT_TYPE_NAME); assertNotNull(typ1_2); assertEquals(typ1.getName(), typ1_2.getName()); - ret = client.dropType(Constants.INT_TYPE_NAME); + ret = client.dropType(serdeConstants.INT_TYPE_NAME); assertTrue("unable to drop type integer", ret); boolean exceptionThrown = false; try { - client.getType(Constants.INT_TYPE_NAME); + client.getType(serdeConstants.INT_TYPE_NAME); } catch (NoSuchObjectException e) { exceptionThrown = true; } @@ -980,9 +980,9 @@ typ1.setName("Person"); typ1.setFields(new ArrayList(2)); typ1.getFields().add( - new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); typ1.getFields().add( - new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); boolean ret = client.createType(typ1); assertTrue("Unable to create type", ret); @@ -999,7 +999,7 @@ fam.setName("Family"); fam.setFields(new ArrayList(2)); fam.getFields().add( - new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); fam.getFields().add( new FieldSchema("members", MetaStoreUtils.getListType(typ1.getName()), "")); @@ -1053,9 +1053,9 @@ typ1.setName(typeName); typ1.setFields(new ArrayList(2)); typ1.getFields().add( - new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); typ1.getFields().add( - new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); client.createType(typ1); Table tbl = new Table(); @@ -1074,7 +1074,7 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "1"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "1"); sd.getSerdeInfo().setSerializationLib( org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.class.getName()); tbl.setPartitionKeys(new ArrayList()); @@ -1100,7 +1100,7 @@ assertNotNull(tbl2.getSd().getSerdeInfo()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "1"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "1"); tbl2.setTableName(tblName2); tbl2.setParameters(new HashMap()); @@ -1429,8 +1429,8 @@ client.createDatabase(db); ArrayList invCols = new ArrayList(2); - invCols.add(new FieldSchema("n-ame", Constants.STRING_TYPE_NAME, "")); - invCols.add(new FieldSchema("in.come", Constants.INT_TYPE_NAME, "")); + invCols.add(new FieldSchema("n-ame", serdeConstants.STRING_TYPE_NAME, "")); + invCols.add(new FieldSchema("in.come", serdeConstants.INT_TYPE_NAME, "")); Table tbl = new Table(); tbl.setDbName(dbName); @@ -1448,7 +1448,7 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "1"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "1"); boolean failed = false; try { client.createTable(tbl); @@ -1460,8 +1460,8 @@ false); } ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); // create a valid table tbl.setTableName(tblName); @@ -1565,9 +1565,9 @@ typ1.setName(typeName); typ1.setFields(new ArrayList(2)); typ1.getFields().add( - new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); + new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); typ1.getFields().add( - new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); client.createType(typ1); Table tbl = new Table(); @@ -1586,17 +1586,17 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "9"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "9"); sd.getSerdeInfo().setSerializationLib( org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.class.getName()); tbl.setPartitionKeys(new ArrayList(2)); tbl.getPartitionKeys().add( new FieldSchema("ds", - org.apache.hadoop.hive.serde.Constants.DATE_TYPE_NAME, "")); + org.apache.hadoop.hive.serde.serdeConstants.DATE_TYPE_NAME, "")); tbl.getPartitionKeys().add( new FieldSchema("hr", - org.apache.hadoop.hive.serde.Constants.INT_TYPE_NAME, "")); + org.apache.hadoop.hive.serde.serdeConstants.INT_TYPE_NAME, "")); client.createTable(tbl); @@ -1613,9 +1613,9 @@ assertNotNull(tbl2.getPartitionKeys()); assertEquals(2, tbl2.getPartitionKeys().size()); - assertEquals(Constants.DATE_TYPE_NAME, tbl2.getPartitionKeys().get(0) + assertEquals(serdeConstants.DATE_TYPE_NAME, tbl2.getPartitionKeys().get(0) .getType()); - assertEquals(Constants.INT_TYPE_NAME, tbl2.getPartitionKeys().get(1) + assertEquals(serdeConstants.INT_TYPE_NAME, tbl2.getPartitionKeys().get(1) .getType()); assertEquals("ds", tbl2.getPartitionKeys().get(0).getName()); assertEquals("hr", tbl2.getPartitionKeys().get(1).getName()); @@ -1670,8 +1670,8 @@ tbl.setTableName(tblName_1); ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); StorageDescriptor sd = new StorageDescriptor(); sd.setSerdeInfo(new SerDeInfo()); @@ -1679,7 +1679,7 @@ sd.getSerdeInfo().setParameters(new HashMap()); sd.setParameters(new HashMap()); sd.getSerdeInfo().getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "9"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "9"); sd.getSerdeInfo().setSerializationLib( org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.class.getName()); @@ -1715,12 +1715,12 @@ assertEquals(client.getConfigValue("hive.key4", val), "0"); assertEquals(client.getConfigValue("hive.key5", val), val); assertEquals(client.getConfigValue(null, val), val); - } catch (TException e) { - e.printStackTrace(); - assert (false); } catch (ConfigValSecurityException e) { e.printStackTrace(); assert (false); + } catch (TException e) { + e.printStackTrace(); + assert (false); } } @@ -1728,12 +1728,12 @@ try { // Attempting to get the password should throw an exception client.getConfigValue("javax.jdo.option.ConnectionPassword", "password"); + } catch (ConfigValSecurityException e) { + threwException = true; } catch (TException e) { e.printStackTrace(); assert (false); - } catch (ConfigValSecurityException e) { - threwException = true; - } + } assert (threwException); } @@ -1742,7 +1742,7 @@ throws NoSuchObjectException, MetaException, TException { Partition part_get = client.getPartition(dbName, tblName, part.getValues()); part.setCreateTime(part_get.getCreateTime()); - part.putToParameters(org.apache.hadoop.hive.metastore.api.Constants.DDL_TIME, Long.toString(part_get.getCreateTime())); + part.putToParameters(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.DDL_TIME, Long.toString(part_get.getCreateTime())); } private static void silentDropDatabase(String dbName) throws MetaException, TException { @@ -1797,13 +1797,13 @@ client.createDatabase(db); ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("c1", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("c2", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("c1", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("c2", serdeConstants.INT_TYPE_NAME, "")); ArrayList partCols = new ArrayList(3); - partCols.add(new FieldSchema("p1", Constants.STRING_TYPE_NAME, "")); - partCols.add(new FieldSchema("p2", Constants.STRING_TYPE_NAME, "")); - partCols.add(new FieldSchema("p3", Constants.INT_TYPE_NAME, "")); + partCols.add(new FieldSchema("p1", serdeConstants.STRING_TYPE_NAME, "")); + partCols.add(new FieldSchema("p2", serdeConstants.STRING_TYPE_NAME, "")); + partCols.add(new FieldSchema("p3", serdeConstants.INT_TYPE_NAME, "")); Table tbl = new Table(); tbl.setDbName(dbName); @@ -1819,7 +1819,7 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters() - .put(Constants.SERIALIZATION_FORMAT, "1"); + .put(serdeConstants.SERIALIZATION_FORMAT, "1"); sd.setSortCols(new ArrayList()); tbl.setPartitionKeys(partCols); @@ -1939,11 +1939,11 @@ client.createDatabase(db); ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("c1", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("c2", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("c1", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("c2", serdeConstants.INT_TYPE_NAME, "")); ArrayList partCols = new ArrayList(1); - partCols.add(new FieldSchema("p1", Constants.STRING_TYPE_NAME, "")); + partCols.add(new FieldSchema("p1", serdeConstants.STRING_TYPE_NAME, "")); Table tbl = new Table(); tbl.setDbName(dbName); @@ -1959,7 +1959,7 @@ sd.getSerdeInfo().setName(tbl.getTableName()); sd.getSerdeInfo().setParameters(new HashMap()); sd.getSerdeInfo().getParameters() - .put(Constants.SERIALIZATION_FORMAT, "1"); + .put(serdeConstants.SERIALIZATION_FORMAT, "1"); sd.setSortCols(new ArrayList()); tbl.setPartitionKeys(partCols); @@ -2007,15 +2007,15 @@ createDb(dbName); ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("c1", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("c2", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("c1", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("c2", serdeConstants.INT_TYPE_NAME, "")); ArrayList partCols = new ArrayList(2); - partCols.add(new FieldSchema("p1", Constants.STRING_TYPE_NAME, "")); - partCols.add(new FieldSchema("p2", Constants.STRING_TYPE_NAME, "")); + partCols.add(new FieldSchema("p1", serdeConstants.STRING_TYPE_NAME, "")); + partCols.add(new FieldSchema("p2", serdeConstants.STRING_TYPE_NAME, "")); Map serdParams = new HashMap(); - serdParams.put(Constants.SERIALIZATION_FORMAT, "1"); + serdParams.put(serdeConstants.SERIALIZATION_FORMAT, "1"); StorageDescriptor sd = createStorageDescriptor(tblName, partCols, null, serdParams); Table tbl = new Table(); @@ -2116,9 +2116,9 @@ String filter; //test owner //owner like ".*Owner.*" and owner like "test.*" - filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_OWNER + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_OWNER + " like \".*Owner.*\" and " + - org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_OWNER + + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_OWNER + " like \"test.*\""; tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); assertEquals(tableNames.size(), 3); @@ -2127,7 +2127,7 @@ assert(tableNames.contains(table3.getTableName())); //owner = "testOwner1" - filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_OWNER + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_OWNER + " = \"testOwner1\""; tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); @@ -2136,7 +2136,7 @@ assert(tableNames.contains(table3.getTableName())); //lastAccessTime < 90 - filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_LAST_ACCESS + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_LAST_ACCESS + " < 90"; tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); @@ -2145,7 +2145,7 @@ assert(tableNames.contains(table3.getTableName())); //lastAccessTime > 90 - filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_LAST_ACCESS + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_LAST_ACCESS + " > 90"; tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); @@ -2153,7 +2153,7 @@ //test params //test_param_2 = "50" - filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_PARAMS + "test_param_2 = \"50\""; tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); @@ -2162,38 +2162,38 @@ assert(tableNames.contains(table2.getTableName())); //test_param_2 = "75" - filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.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 + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.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 + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_PARAMS + "test_param_1 <> \"yellow\""; tableNames = client.listTableNamesByFilter(dbName, filter, (short) 2); assertEquals(2, tableNames.size()); - filter = org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.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 + + filter = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_OWNER + " = \"testOwner1\" and (" + - org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_LAST_ACCESS + + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_LAST_ACCESS + " = 30 or " + - org.apache.hadoop.hive.metastore.api.Constants.HIVE_FILTER_FIELD_PARAMS + + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.HIVE_FILTER_FIELD_PARAMS + "test_param_1 = \"hi\")"; tableNames = client.listTableNamesByFilter(dbName, filter, (short)-1); @@ -2228,20 +2228,20 @@ int lastAccessTime, boolean hasSecondParam) throws Exception { ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("name", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("income", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("name", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("income", serdeConstants.INT_TYPE_NAME, "")); Map params = new HashMap(); params.put("sd_param_1", "Use this for comments etc"); Map serdParams = new HashMap(); - serdParams.put(Constants.SERIALIZATION_FORMAT, "1"); + serdParams.put(serdeConstants.SERIALIZATION_FORMAT, "1"); StorageDescriptor sd = createStorageDescriptor(tableName, cols, params, serdParams); Map partitionKeys = new HashMap(); - partitionKeys.put("ds", Constants.STRING_TYPE_NAME); - partitionKeys.put("hr", Constants.INT_TYPE_NAME); + partitionKeys.put("ds", serdeConstants.STRING_TYPE_NAME); + partitionKeys.put("hr", serdeConstants.INT_TYPE_NAME); Map tableParams = new HashMap(); tableParams.put("test_param_1", "hi"); @@ -2278,14 +2278,14 @@ createDb(dbName); ArrayList cols = new ArrayList(2); - cols.add(new FieldSchema("c1", Constants.STRING_TYPE_NAME, "")); - cols.add(new FieldSchema("c2", Constants.INT_TYPE_NAME, "")); + cols.add(new FieldSchema("c1", serdeConstants.STRING_TYPE_NAME, "")); + cols.add(new FieldSchema("c2", serdeConstants.INT_TYPE_NAME, "")); Map params = new HashMap(); params.put("test_param_1", "Use this for comments etc"); Map serdParams = new HashMap(); - serdParams.put(Constants.SERIALIZATION_FORMAT, "1"); + serdParams.put(serdeConstants.SERIALIZATION_FORMAT, "1"); StorageDescriptor sd = createStorageDescriptor(tblName, cols, params, serdParams); @@ -2423,7 +2423,7 @@ sd.getSerdeInfo().setName(tableName); sd.getSerdeInfo().setParameters(serdParams); sd.getSerdeInfo().getParameters() - .put(Constants.SERIALIZATION_FORMAT, "1"); + .put(serdeConstants.SERIALIZATION_FORMAT, "1"); sd.setSortCols(new ArrayList()); return sd; @@ -2459,20 +2459,20 @@ createDb(dbName); Map fields = new HashMap(); - fields.put("name", Constants.STRING_TYPE_NAME); - fields.put("income", Constants.INT_TYPE_NAME); + fields.put("name", serdeConstants.STRING_TYPE_NAME); + fields.put("income", serdeConstants.INT_TYPE_NAME); Type typ1 = createType(typeName, fields); Map partitionKeys = new HashMap(); - partitionKeys.put("ds", Constants.STRING_TYPE_NAME); - partitionKeys.put("hr", Constants.STRING_TYPE_NAME); + partitionKeys.put("ds", serdeConstants.STRING_TYPE_NAME); + partitionKeys.put("hr", serdeConstants.STRING_TYPE_NAME); Map params = new HashMap(); params.put("test_param_1", "Use this for comments etc"); Map serdParams = new HashMap(); - serdParams.put(Constants.SERIALIZATION_FORMAT, "1"); + serdParams.put(serdeConstants.SERIALIZATION_FORMAT, "1"); StorageDescriptor sd = createStorageDescriptor(tblName, typ1.getFields(), params, serdParams); Index: metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java (revision 1406838) +++ metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java (working copy) @@ -39,7 +39,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.JavaUtils; import org.apache.hadoop.hive.conf.HiveConf; -import org.apache.hadoop.hive.metastore.api.Constants; +import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.SerDeInfo; @@ -97,13 +97,13 @@ serdeInfo.setSerializationLib(LazySimpleSerDe.class.getName()); serdeInfo.setParameters(new HashMap()); serdeInfo.getParameters().put( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "1"); + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "1"); List fields = new ArrayList(); sd.setCols(fields); for (String col : columns) { FieldSchema field = new FieldSchema(col, - org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME, "'default'"); + org.apache.hadoop.hive.serde.serdeConstants.STRING_TYPE_NAME, "'default'"); fields.add(field); } @@ -111,7 +111,7 @@ for (String partCol : partCols) { FieldSchema part = new FieldSchema(); part.setName(partCol); - part.setType(org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME); // default + part.setType(org.apache.hadoop.hive.serde.serdeConstants.STRING_TYPE_NAME); // default // partition // key tTable.getPartitionKeys().add(part); @@ -163,7 +163,7 @@ static public Deserializer getDeserializer(Configuration conf, Properties schema) throws MetaException { String lib = schema - .getProperty(org.apache.hadoop.hive.serde.Constants.SERIALIZATION_LIB); + .getProperty(org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_LIB); try { Deserializer deserializer = SerDeUtils.lookupDeserializer(lib); (deserializer).initialize(conf, schema); @@ -370,37 +370,37 @@ static { typeToThriftTypeMap = new HashMap(); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.BOOLEAN_TYPE_NAME, "bool"); + org.apache.hadoop.hive.serde.serdeConstants.BOOLEAN_TYPE_NAME, "bool"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.TINYINT_TYPE_NAME, "byte"); + org.apache.hadoop.hive.serde.serdeConstants.TINYINT_TYPE_NAME, "byte"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.SMALLINT_TYPE_NAME, "i16"); + org.apache.hadoop.hive.serde.serdeConstants.SMALLINT_TYPE_NAME, "i16"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.INT_TYPE_NAME, "i32"); + org.apache.hadoop.hive.serde.serdeConstants.INT_TYPE_NAME, "i32"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.BIGINT_TYPE_NAME, "i64"); + org.apache.hadoop.hive.serde.serdeConstants.BIGINT_TYPE_NAME, "i64"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.DOUBLE_TYPE_NAME, "double"); + org.apache.hadoop.hive.serde.serdeConstants.DOUBLE_TYPE_NAME, "double"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.FLOAT_TYPE_NAME, "float"); + org.apache.hadoop.hive.serde.serdeConstants.FLOAT_TYPE_NAME, "float"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.LIST_TYPE_NAME, "list"); + org.apache.hadoop.hive.serde.serdeConstants.LIST_TYPE_NAME, "list"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.MAP_TYPE_NAME, "map"); + org.apache.hadoop.hive.serde.serdeConstants.MAP_TYPE_NAME, "map"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME, "string"); + org.apache.hadoop.hive.serde.serdeConstants.STRING_TYPE_NAME, "string"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.BINARY_TYPE_NAME, "binary"); + org.apache.hadoop.hive.serde.serdeConstants.BINARY_TYPE_NAME, "binary"); // These 3 types are not supported yet. // We should define a complex type date in thrift that contains a single int // member, and DynamicSerDe // should convert it to date type at runtime. typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.DATE_TYPE_NAME, "date"); + org.apache.hadoop.hive.serde.serdeConstants.DATE_TYPE_NAME, "date"); typeToThriftTypeMap.put( - org.apache.hadoop.hive.serde.Constants.DATETIME_TYPE_NAME, "datetime"); + org.apache.hadoop.hive.serde.serdeConstants.DATETIME_TYPE_NAME, "datetime"); typeToThriftTypeMap - .put(org.apache.hadoop.hive.serde.Constants.TIMESTAMP_TYPE_NAME, + .put(org.apache.hadoop.hive.serde.serdeConstants.TIMESTAMP_TYPE_NAME, "timestamp"); } @@ -535,42 +535,42 @@ String inputFormat = sd.getInputFormat(); if (inputFormat == null || inputFormat.length() == 0) { String tblInput = - schema.getProperty(org.apache.hadoop.hive.metastore.api.Constants.FILE_INPUT_FORMAT); + schema.getProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT); if (tblInput == null) { inputFormat = org.apache.hadoop.mapred.SequenceFileInputFormat.class.getName(); } else { inputFormat = tblInput; } } - schema.setProperty(org.apache.hadoop.hive.metastore.api.Constants.FILE_INPUT_FORMAT, + schema.setProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT, inputFormat); // OutputFormat String outputFormat = sd.getOutputFormat(); if (outputFormat == null || outputFormat.length() == 0) { String tblOutput = - schema.getProperty(org.apache.hadoop.hive.metastore.api.Constants.FILE_OUTPUT_FORMAT); + schema.getProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_OUTPUT_FORMAT); if (tblOutput == null) { outputFormat = org.apache.hadoop.mapred.SequenceFileOutputFormat.class.getName(); } else { outputFormat = tblOutput; } } - schema.setProperty(org.apache.hadoop.hive.metastore.api.Constants.FILE_OUTPUT_FORMAT, + schema.setProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_OUTPUT_FORMAT, outputFormat); // Location if (sd.getLocation() != null) { - schema.setProperty(org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_LOCATION, + schema.setProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_LOCATION, sd.getLocation()); } // Bucket count - schema.setProperty(org.apache.hadoop.hive.metastore.api.Constants.BUCKET_COUNT, + schema.setProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.BUCKET_COUNT, Integer.toString(sd.getNumBuckets())); if (sd.getBucketCols() != null && sd.getBucketCols().size() > 0) { - schema.setProperty(org.apache.hadoop.hive.metastore.api.Constants.BUCKET_FIELD_NAME, + schema.setProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.BUCKET_FIELD_NAME, sd.getBucketCols().get(0)); } @@ -580,9 +580,9 @@ // We should not update the following 3 values if SerDeInfo contains these. // This is to keep backward compatible with getSchema(), where these 3 keys // are updated after SerDeInfo properties got copied. - String cols = org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_COLUMNS; - String colTypes = org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_COLUMN_TYPES; - String parts = org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_PARTITION_COLUMNS; + String cols = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_COLUMNS; + String colTypes = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_COLUMN_TYPES; + String parts = org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS; for (Map.Entry param : sd.getSerdeInfo().getParameters().entrySet()) { String key = param.getKey(); @@ -594,7 +594,7 @@ } if (sd.getSerdeInfo().getSerializationLib() != null) { - schema.setProperty(org.apache.hadoop.hive.serde.Constants.SERIALIZATION_LIB, + schema.setProperty(org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_LIB, sd.getSerdeInfo().getSerializationLib()); } } @@ -623,7 +623,7 @@ .getName(); } schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.FILE_INPUT_FORMAT, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_INPUT_FORMAT, inputFormat); String outputFormat = sd.getOutputFormat(); if (outputFormat == null || outputFormat.length() == 0) { @@ -631,24 +631,24 @@ .getName(); } schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.FILE_OUTPUT_FORMAT, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.FILE_OUTPUT_FORMAT, outputFormat); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, databaseName + "." + tableName); if (sd.getLocation() != null) { schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_LOCATION, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_LOCATION, sd.getLocation()); } schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.BUCKET_COUNT, Integer + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.BUCKET_COUNT, Integer .toString(sd.getNumBuckets())); if (sd.getBucketCols() != null && sd.getBucketCols().size() > 0) { schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.BUCKET_FIELD_NAME, sd + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.BUCKET_FIELD_NAME, sd .getBucketCols().get(0)); } if (sd.getSerdeInfo() != null) { @@ -658,7 +658,7 @@ if (sd.getSerdeInfo().getSerializationLib() != null) { schema.setProperty( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_LIB, sd + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_LIB, sd .getSerdeInfo().getSerializationLib()); } } @@ -677,14 +677,14 @@ String colNames = colNameBuf.toString(); String colTypes = colTypeBuf.toString(); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_COLUMNS, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_COLUMNS, colNames); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_COLUMN_TYPES, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_COLUMN_TYPES, colTypes); if (sd.getCols() != null) { schema.setProperty( - org.apache.hadoop.hive.serde.Constants.SERIALIZATION_DDL, + org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_DDL, getDDLFromFieldSchema(tableName, sd.getCols())); } @@ -700,7 +700,7 @@ if (partString.length() > 0) { schema .setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_PARTITION_COLUMNS, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS, partString); } @@ -909,7 +909,7 @@ public static boolean isArchived( org.apache.hadoop.hive.metastore.api.Partition part) { Map params = part.getParameters(); - if ("true".equalsIgnoreCase(params.get(Constants.IS_ARCHIVED))) { + if ("true".equalsIgnoreCase(params.get(hive_metastoreConstants.IS_ARCHIVED))) { return true; } else { return false; @@ -920,7 +920,7 @@ org.apache.hadoop.hive.metastore.api.Partition part) { Map params = part.getParameters(); assert(isArchived(part)); - String originalLocation = params.get(Constants.ORIGINAL_LOCATION); + String originalLocation = params.get(hive_metastoreConstants.ORIGINAL_LOCATION); assert( originalLocation != null); return new Path(originalLocation); @@ -930,7 +930,7 @@ if (table == null) { return false; } - return (table.getParameters().get(Constants.META_TABLE_STORAGE) != null); + return (table.getParameters().get(hive_metastoreConstants.META_TABLE_STORAGE) != null); } /** Index: metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java (revision 1406838) +++ metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java (working copy) @@ -28,7 +28,7 @@ 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.hive_metastoreConstants; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Table; @@ -180,20 +180,20 @@ private String generateJDOFilterOverTables(Map params) throws MetaException { - if (keyName.equals(Constants.HIVE_FILTER_FIELD_OWNER)) { + if (keyName.equals(hive_metastoreConstants.HIVE_FILTER_FIELD_OWNER)) { keyName = "this.owner"; - } else if (keyName.equals(Constants.HIVE_FILTER_FIELD_LAST_ACCESS)) { + } else if (keyName.equals(hive_metastoreConstants.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)) { + } else if (keyName.startsWith(hive_metastoreConstants.HIVE_FILTER_FIELD_PARAMS)) { if (!TABLE_FILTER_OPS.contains(operator)) { throw new MetaException("Only " + TABLE_FILTER_OPS + " are supported " + "operators for HIVE_FILTER_FIELD_PARAMS"); } - String paramKeyName = keyName.substring(Constants.HIVE_FILTER_FIELD_PARAMS.length()); + String paramKeyName = keyName.substring(hive_metastoreConstants.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. @@ -259,7 +259,7 @@ //Can only support partitions whose types are string if( ! table.getPartitionKeys().get(partitionColumnIndex). - getType().equals(org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME) ) { + getType().equals(org.apache.hadoop.hive.serde.serdeConstants.STRING_TYPE_NAME) ) { throw new MetaException ("Filtering is supported only on partition keys of type string"); } Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1406838) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -59,7 +59,7 @@ import org.apache.hadoop.hive.metastore.api.ColumnStatisticsDesc; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; -import org.apache.hadoop.hive.metastore.api.Constants; +import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.EnvironmentContext; import org.apache.hadoop.hive.metastore.api.FieldSchema; @@ -1047,8 +1047,8 @@ long time = System.currentTimeMillis() / 1000; tbl.setCreateTime((int) time); if (tbl.getParameters() == null || - tbl.getParameters().get(Constants.DDL_TIME) == null) { - tbl.putToParameters(Constants.DDL_TIME, Long.toString(time)); + tbl.getParameters().get(hive_metastoreConstants.DDL_TIME) == null) { + tbl.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(time)); } ms.createTable(tbl); success = ms.commitTransaction(); @@ -1509,7 +1509,7 @@ // set create time long time = System.currentTimeMillis() / 1000; part.setCreateTime((int) time); - part.putToParameters(Constants.DDL_TIME, Long.toString(time)); + part.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(time)); success = ms.addPartition(part); if (success) { @@ -1719,8 +1719,8 @@ long time = System.currentTimeMillis() / 1000; part.setCreateTime((int) time); if (part.getParameters() == null || - part.getParameters().get(Constants.DDL_TIME) == null) { - part.putToParameters(Constants.DDL_TIME, Long.toString(time)); + part.getParameters().get(hive_metastoreConstants.DDL_TIME) == null) { + part.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(time)); } // Inherit table properties into partition properties. @@ -2225,7 +2225,7 @@ throws InvalidOperationException, MetaException { startFunction("alter_index", ": db=" + dbname + " base_tbl=" + base_table_name + " idx=" + index_name + " newidx=" + newIndex.getIndexName()); - newIndex.putToParameters(Constants.DDL_TIME, Long.toString(System + newIndex.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System .currentTimeMillis() / 1000)); boolean success = false; @@ -2282,8 +2282,8 @@ // Update the time if it hasn't been specified. if (newTable.getParameters() == null || - newTable.getParameters().get(Constants.DDL_TIME) == null) { - newTable.putToParameters(Constants.DDL_TIME, Long.toString(System + newTable.getParameters().get(hive_metastoreConstants.DDL_TIME) == null) { + newTable.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System .currentTimeMillis() / 1000)); } boolean success = false; @@ -2863,7 +2863,7 @@ } index.setCreateTime((int) time); - index.putToParameters(Constants.DDL_TIME, Long.toString(time)); + index.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(time)); ms.addIndex(index); success = ms.commitTransaction(); Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java (revision 1406838) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java (working copy) @@ -30,7 +30,7 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; -import org.apache.hadoop.hive.metastore.api.Constants; +import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; @@ -243,9 +243,9 @@ String newPartLoc = null; // Set DDL time to now if not specified if (new_part.getParameters() == null || - new_part.getParameters().get(Constants.DDL_TIME) == null || - Integer.parseInt(new_part.getParameters().get(Constants.DDL_TIME)) == 0) { - new_part.putToParameters(Constants.DDL_TIME, Long.toString(System + new_part.getParameters().get(hive_metastoreConstants.DDL_TIME) == null || + Integer.parseInt(new_part.getParameters().get(hive_metastoreConstants.DDL_TIME)) == 0) { + new_part.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System .currentTimeMillis() / 1000)); } //alter partition @@ -386,9 +386,9 @@ for (Partition tmpPart: new_parts) { // Set DDL time to now if not specified if (tmpPart.getParameters() == null || - tmpPart.getParameters().get(Constants.DDL_TIME) == null || - Integer.parseInt(tmpPart.getParameters().get(Constants.DDL_TIME)) == 0) { - tmpPart.putToParameters(Constants.DDL_TIME, Long.toString(System + tmpPart.getParameters().get(hive_metastoreConstants.DDL_TIME) == null || + Integer.parseInt(tmpPart.getParameters().get(hive_metastoreConstants.DDL_TIME)) == 0) { + tmpPart.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System .currentTimeMillis() / 1000)); } Partition oldTmpPart = msdb.getPartition(dbname, name, tmpPart.getValues()); Index: metastore/src/gen/thrift/gen-py/__init__.py =================================================================== Index: metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (revision 1406838) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import fb303.ttypes @@ -3199,7 +3201,7 @@ def __ne__(self, other): return not (self == other) -class MetaException(Exception): +class MetaException(TException): """ Attributes: - message @@ -3262,7 +3264,7 @@ def __ne__(self, other): return not (self == other) -class UnknownTableException(Exception): +class UnknownTableException(TException): """ Attributes: - message @@ -3325,7 +3327,7 @@ def __ne__(self, other): return not (self == other) -class UnknownDBException(Exception): +class UnknownDBException(TException): """ Attributes: - message @@ -3388,7 +3390,7 @@ def __ne__(self, other): return not (self == other) -class AlreadyExistsException(Exception): +class AlreadyExistsException(TException): """ Attributes: - message @@ -3451,7 +3453,7 @@ def __ne__(self, other): return not (self == other) -class InvalidPartitionException(Exception): +class InvalidPartitionException(TException): """ Attributes: - message @@ -3514,7 +3516,7 @@ def __ne__(self, other): return not (self == other) -class UnknownPartitionException(Exception): +class UnknownPartitionException(TException): """ Attributes: - message @@ -3577,7 +3579,7 @@ def __ne__(self, other): return not (self == other) -class InvalidObjectException(Exception): +class InvalidObjectException(TException): """ Attributes: - message @@ -3640,7 +3642,7 @@ def __ne__(self, other): return not (self == other) -class NoSuchObjectException(Exception): +class NoSuchObjectException(TException): """ Attributes: - message @@ -3703,7 +3705,7 @@ def __ne__(self, other): return not (self == other) -class IndexAlreadyExistsException(Exception): +class IndexAlreadyExistsException(TException): """ Attributes: - message @@ -3766,7 +3768,7 @@ def __ne__(self, other): return not (self == other) -class InvalidOperationException(Exception): +class InvalidOperationException(TException): """ Attributes: - message @@ -3829,7 +3831,7 @@ def __ne__(self, other): return not (self == other) -class ConfigValSecurityException(Exception): +class ConfigValSecurityException(TException): """ Attributes: - message @@ -3892,7 +3894,7 @@ def __ne__(self, other): return not (self == other) -class InvalidInputException(Exception): +class InvalidInputException(TException): """ Attributes: - message Index: metastore/src/gen/thrift/gen-py/hive_metastore/constants.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/constants.py (revision 1406838) +++ metastore/src/gen/thrift/gen-py/hive_metastore/constants.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * DDL_TIME = "transient_lastDdlTime" Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (revision 1406838) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import fb303.FacebookService from ttypes import * from thrift.Thrift import TProcessor @@ -3528,11 +3530,11 @@ result = create_database_result() try: self._handler.create_database(args.database) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3546,9 +3548,9 @@ result = get_database_result() try: result.success = self._handler.get_database(args.name) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3562,11 +3564,11 @@ result = drop_database_result() try: self._handler.drop_database(args.name, args.deleteData, args.cascade) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except InvalidOperationException, o2: + except InvalidOperationException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3580,7 +3582,7 @@ result = get_databases_result() try: result.success = self._handler.get_databases(args.pattern) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) result.write(oprot) @@ -3594,7 +3596,7 @@ result = get_all_databases_result() try: result.success = self._handler.get_all_databases() - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) result.write(oprot) @@ -3608,9 +3610,9 @@ result = alter_database_result() try: self._handler.alter_database(args.dbname, args.db) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3624,9 +3626,9 @@ result = get_type_result() try: result.success = self._handler.get_type(args.name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) result.write(oprot) @@ -3640,11 +3642,11 @@ result = create_type_result() try: result.success = self._handler.create_type(args.type) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) result.write(oprot) @@ -3658,9 +3660,9 @@ result = drop_type_result() try: result.success = self._handler.drop_type(args.type) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) result.write(oprot) @@ -3674,7 +3676,7 @@ result = get_type_all_result() try: result.success = self._handler.get_type_all(args.name) - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) result.write(oprot) @@ -3688,11 +3690,11 @@ result = get_fields_result() try: result.success = self._handler.get_fields(args.db_name, args.table_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except UnknownTableException, o2: + except UnknownTableException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) result.write(oprot) @@ -3706,11 +3708,11 @@ result = get_schema_result() try: result.success = self._handler.get_schema(args.db_name, args.table_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except UnknownTableException, o2: + except UnknownTableException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) result.write(oprot) @@ -3724,13 +3726,13 @@ result = create_table_result() try: self._handler.create_table(args.tbl) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 - except NoSuchObjectException, o4: + except NoSuchObjectException as o4: result.o4 = o4 oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3744,13 +3746,13 @@ result = create_table_with_environment_context_result() try: self._handler.create_table_with_environment_context(args.tbl, args.environment_context) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 - except NoSuchObjectException, o4: + except NoSuchObjectException as o4: result.o4 = o4 oprot.writeMessageBegin("create_table_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -3764,9 +3766,9 @@ result = drop_table_result() try: self._handler.drop_table(args.dbname, args.name, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3780,7 +3782,7 @@ result = get_tables_result() try: result.success = self._handler.get_tables(args.db_name, args.pattern) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) result.write(oprot) @@ -3794,7 +3796,7 @@ result = get_all_tables_result() try: result.success = self._handler.get_all_tables(args.db_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) result.write(oprot) @@ -3808,9 +3810,9 @@ result = get_table_result() try: result.success = self._handler.get_table(args.dbname, args.tbl_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3824,11 +3826,11 @@ result = get_table_objects_by_name_result() try: result.success = self._handler.get_table_objects_by_name(args.dbname, args.tbl_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except InvalidOperationException, o2: + except InvalidOperationException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_table_objects_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -3842,11 +3844,11 @@ 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: + except MetaException as o1: result.o1 = o1 - except InvalidOperationException, o2: + except InvalidOperationException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_table_names_by_filter", TMessageType.REPLY, seqid) result.write(oprot) @@ -3860,9 +3862,9 @@ result = alter_table_result() try: self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3876,9 +3878,9 @@ result = alter_table_with_environment_context_result() try: self._handler.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_table_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -3892,11 +3894,11 @@ result = add_partition_result() try: result.success = self._handler.add_partition(args.new_part) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3910,11 +3912,11 @@ result = add_partition_with_environment_context_result() try: result.success = self._handler.add_partition_with_environment_context(args.new_part, args.environment_context) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_partition_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -3928,11 +3930,11 @@ result = add_partitions_result() try: result.success = self._handler.add_partitions(args.new_parts) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_partitions", TMessageType.REPLY, seqid) result.write(oprot) @@ -3946,11 +3948,11 @@ result = append_partition_result() try: result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3964,11 +3966,11 @@ result = append_partition_by_name_result() try: result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -3982,9 +3984,9 @@ result = drop_partition_result() try: result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3998,9 +4000,9 @@ result = drop_partition_by_name_result() try: result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -4014,9 +4016,9 @@ result = get_partition_result() try: result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -4030,9 +4032,9 @@ result = get_partition_with_auth_result() try: result.success = self._handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_with_auth", TMessageType.REPLY, seqid) result.write(oprot) @@ -4046,9 +4048,9 @@ result = get_partition_by_name_result() try: result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -4062,9 +4064,9 @@ result = get_partitions_result() try: result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) result.write(oprot) @@ -4078,9 +4080,9 @@ result = get_partitions_with_auth_result() try: result.success = self._handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_with_auth", TMessageType.REPLY, seqid) result.write(oprot) @@ -4094,7 +4096,7 @@ result = get_partition_names_result() try: result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -4108,9 +4110,9 @@ result = get_partitions_ps_result() try: result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) result.write(oprot) @@ -4124,9 +4126,9 @@ result = get_partitions_ps_with_auth_result() try: result.success = self._handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_ps_with_auth", TMessageType.REPLY, seqid) result.write(oprot) @@ -4140,9 +4142,9 @@ result = get_partition_names_ps_result() try: result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) result.write(oprot) @@ -4156,9 +4158,9 @@ result = get_partitions_by_filter_result() try: result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) result.write(oprot) @@ -4172,9 +4174,9 @@ result = get_partitions_by_names_result() try: result.success = self._handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_by_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -4188,9 +4190,9 @@ result = alter_partition_result() try: self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -4204,9 +4206,9 @@ result = alter_partitions_result() try: self._handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_partitions", TMessageType.REPLY, seqid) result.write(oprot) @@ -4220,9 +4222,9 @@ result = alter_partition_with_environment_context_result() try: self._handler.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_partition_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -4236,9 +4238,9 @@ result = rename_partition_result() try: self._handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("rename_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -4252,7 +4254,7 @@ result = get_config_value_result() try: result.success = self._handler.get_config_value(args.name, args.defaultValue) - except ConfigValSecurityException, o1: + except ConfigValSecurityException as o1: result.o1 = o1 oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) result.write(oprot) @@ -4266,7 +4268,7 @@ result = partition_name_to_vals_result() try: result.success = self._handler.partition_name_to_vals(args.part_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) result.write(oprot) @@ -4280,7 +4282,7 @@ result = partition_name_to_spec_result() try: result.success = self._handler.partition_name_to_spec(args.part_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) result.write(oprot) @@ -4294,17 +4296,17 @@ result = markPartitionForEvent_result() try: self._handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 - except UnknownTableException, o4: + except UnknownTableException as o4: result.o4 = o4 - except UnknownPartitionException, o5: + except UnknownPartitionException as o5: result.o5 = o5 - except InvalidPartitionException, o6: + except InvalidPartitionException as o6: result.o6 = o6 oprot.writeMessageBegin("markPartitionForEvent", TMessageType.REPLY, seqid) result.write(oprot) @@ -4318,17 +4320,17 @@ result = isPartitionMarkedForEvent_result() try: result.success = self._handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 - except UnknownTableException, o4: + except UnknownTableException as o4: result.o4 = o4 - except UnknownPartitionException, o5: + except UnknownPartitionException as o5: result.o5 = o5 - except InvalidPartitionException, o6: + except InvalidPartitionException as o6: result.o6 = o6 oprot.writeMessageBegin("isPartitionMarkedForEvent", TMessageType.REPLY, seqid) result.write(oprot) @@ -4342,11 +4344,11 @@ result = add_index_result() try: result.success = self._handler.add_index(args.new_index, args.index_table) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) result.write(oprot) @@ -4360,9 +4362,9 @@ result = alter_index_result() try: self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) result.write(oprot) @@ -4376,9 +4378,9 @@ result = drop_index_by_name_result() try: result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -4392,9 +4394,9 @@ result = get_index_by_name_result() try: result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -4408,9 +4410,9 @@ result = get_indexes_result() try: result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) result.write(oprot) @@ -4424,7 +4426,7 @@ result = get_index_names_result() try: result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -4438,13 +4440,13 @@ result = update_table_column_statistics_result() try: result.success = self._handler.update_table_column_statistics(args.stats_obj) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 - except InvalidInputException, o4: + except InvalidInputException as o4: result.o4 = o4 oprot.writeMessageBegin("update_table_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) @@ -4458,13 +4460,13 @@ result = update_partition_column_statistics_result() try: result.success = self._handler.update_partition_column_statistics(args.stats_obj) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 - except InvalidInputException, o4: + except InvalidInputException as o4: result.o4 = o4 oprot.writeMessageBegin("update_partition_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) @@ -4478,13 +4480,13 @@ result = get_table_column_statistics_result() try: result.success = self._handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 - except InvalidInputException, o3: + except InvalidInputException as o3: result.o3 = o3 - except InvalidObjectException, o4: + except InvalidObjectException as o4: result.o4 = o4 oprot.writeMessageBegin("get_table_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) @@ -4498,13 +4500,13 @@ result = get_partition_column_statistics_result() try: result.success = self._handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 - except InvalidInputException, o3: + except InvalidInputException as o3: result.o3 = o3 - except InvalidObjectException, o4: + except InvalidObjectException as o4: result.o4 = o4 oprot.writeMessageBegin("get_partition_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) @@ -4518,13 +4520,13 @@ result = delete_partition_column_statistics_result() try: result.success = self._handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 - except InvalidObjectException, o3: + except InvalidObjectException as o3: result.o3 = o3 - except InvalidInputException, o4: + except InvalidInputException as o4: result.o4 = o4 oprot.writeMessageBegin("delete_partition_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) @@ -4538,13 +4540,13 @@ result = delete_table_column_statistics_result() try: result.success = self._handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 - except InvalidObjectException, o3: + except InvalidObjectException as o3: result.o3 = o3 - except InvalidInputException, o4: + except InvalidInputException as o4: result.o4 = o4 oprot.writeMessageBegin("delete_table_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) @@ -4558,7 +4560,7 @@ result = create_role_result() try: result.success = self._handler.create_role(args.role) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4572,7 +4574,7 @@ result = drop_role_result() try: result.success = self._handler.drop_role(args.role_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4586,7 +4588,7 @@ result = get_role_names_result() try: result.success = self._handler.get_role_names() - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_role_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -4600,7 +4602,7 @@ result = grant_role_result() try: result.success = self._handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("grant_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4614,7 +4616,7 @@ result = revoke_role_result() try: result.success = self._handler.revoke_role(args.role_name, args.principal_name, args.principal_type) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("revoke_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4628,7 +4630,7 @@ result = list_roles_result() try: result.success = self._handler.list_roles(args.principal_name, args.principal_type) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("list_roles", TMessageType.REPLY, seqid) result.write(oprot) @@ -4642,7 +4644,7 @@ result = get_privilege_set_result() try: result.success = self._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_privilege_set", TMessageType.REPLY, seqid) result.write(oprot) @@ -4656,7 +4658,7 @@ result = list_privileges_result() try: result.success = self._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("list_privileges", TMessageType.REPLY, seqid) result.write(oprot) @@ -4670,7 +4672,7 @@ result = grant_privileges_result() try: result.success = self._handler.grant_privileges(args.privileges) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("grant_privileges", TMessageType.REPLY, seqid) result.write(oprot) @@ -4684,7 +4686,7 @@ result = revoke_privileges_result() try: result.success = self._handler.revoke_privileges(args.privileges) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("revoke_privileges", TMessageType.REPLY, seqid) result.write(oprot) @@ -4698,7 +4700,7 @@ result = set_ugi_result() try: result.success = self._handler.set_ugi(args.user_name, args.group_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("set_ugi", TMessageType.REPLY, seqid) result.write(oprot) @@ -4712,7 +4714,7 @@ result = get_delegation_token_result() try: result.success = self._handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_delegation_token", TMessageType.REPLY, seqid) result.write(oprot) @@ -4726,7 +4728,7 @@ result = renew_delegation_token_result() try: result.success = self._handler.renew_delegation_token(args.token_str_form) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("renew_delegation_token", TMessageType.REPLY, seqid) result.write(oprot) @@ -4740,7 +4742,7 @@ result = cancel_delegation_token_result() try: self._handler.cancel_delegation_token(args.token_str_form) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("cancel_delegation_token", TMessageType.REPLY, seqid) result.write(oprot) Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (revision 1406838) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -1,9 +1,11 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# import sys import pprint @@ -18,7 +20,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print '' - print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]' + print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' print ' void create_database(Database database)' @@ -110,7 +112,8 @@ if sys.argv[argi] == '-h': parts = sys.argv[argi+1].split(':') host = parts[0] - port = int(parts[1]) + if len(parts) > 1: + port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h (revision 1406838) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_metastore_CONSTANTS_H #define hive_metastore_CONSTANTS_H Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (revision 1406838) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "ThriftHiveMetastore.h" @@ -50,9 +51,11 @@ uint32_t ThriftHiveMetastore_create_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_args"); + xfer += oprot->writeFieldBegin("database", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->database.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -61,9 +64,11 @@ uint32_t ThriftHiveMetastore_create_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_pargs"); + xfer += oprot->writeFieldBegin("database", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->database)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -248,9 +253,11 @@ uint32_t ThriftHiveMetastore_get_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -259,9 +266,11 @@ uint32_t ThriftHiveMetastore_get_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -462,15 +471,19 @@ uint32_t ThriftHiveMetastore_drop_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("cascade", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->cascade); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -479,15 +492,19 @@ uint32_t ThriftHiveMetastore_drop_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("cascade", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool((*(this->cascade))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -672,9 +689,11 @@ uint32_t ThriftHiveMetastore_get_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_args"); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->pattern); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -683,9 +702,11 @@ uint32_t ThriftHiveMetastore_get_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_pargs"); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->pattern))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -717,14 +738,14 @@ this->success.clear(); uint32_t _size201; ::apache::thrift::protocol::TType _etype204; - iprot->readListBegin(_etype204, _size201); + xfer += iprot->readListBegin(_etype204, _size201); this->success.resize(_size201); uint32_t _i205; for (_i205 = 0; _i205 < _size201; ++_i205) { xfer += iprot->readString(this->success[_i205]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -805,14 +826,14 @@ (*(this->success)).clear(); uint32_t _size207; ::apache::thrift::protocol::TType _etype210; - iprot->readListBegin(_etype210, _size207); + xfer += iprot->readListBegin(_etype210, _size207); (*(this->success)).resize(_size207); uint32_t _i211; for (_i211 = 0; _i211 < _size207; ++_i211) { xfer += iprot->readString((*(this->success))[_i211]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -857,12 +878,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -874,6 +890,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -882,6 +899,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -913,14 +931,14 @@ this->success.clear(); uint32_t _size212; ::apache::thrift::protocol::TType _etype215; - iprot->readListBegin(_etype215, _size212); + xfer += iprot->readListBegin(_etype215, _size212); this->success.resize(_size212); uint32_t _i216; for (_i216 = 0; _i216 < _size212; ++_i216) { xfer += iprot->readString(this->success[_i216]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -1001,14 +1019,14 @@ (*(this->success)).clear(); uint32_t _size218; ::apache::thrift::protocol::TType _etype221; - iprot->readListBegin(_etype221, _size218); + xfer += iprot->readListBegin(_etype221, _size218); (*(this->success)).resize(_size218); uint32_t _i222; for (_i222 = 0; _i222 < _size218; ++_i222) { xfer += iprot->readString((*(this->success))[_i222]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -1086,12 +1104,15 @@ uint32_t ThriftHiveMetastore_alter_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_database_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->db.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1100,12 +1121,15 @@ uint32_t ThriftHiveMetastore_alter_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_database_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->db)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1270,9 +1294,11 @@ uint32_t ThriftHiveMetastore_get_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1281,9 +1307,11 @@ uint32_t ThriftHiveMetastore_get_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1468,9 +1496,11 @@ uint32_t ThriftHiveMetastore_create_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_args"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->type.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1479,9 +1509,11 @@ uint32_t ThriftHiveMetastore_create_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_pargs"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->type)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1686,9 +1718,11 @@ uint32_t ThriftHiveMetastore_drop_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_args"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1697,9 +1731,11 @@ uint32_t ThriftHiveMetastore_drop_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_pargs"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1884,9 +1920,11 @@ uint32_t ThriftHiveMetastore_get_type_all_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1895,9 +1933,11 @@ uint32_t ThriftHiveMetastore_get_type_all_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1930,7 +1970,7 @@ uint32_t _size223; ::apache::thrift::protocol::TType _ktype224; ::apache::thrift::protocol::TType _vtype225; - iprot->readMapBegin(_ktype224, _vtype225, _size223); + xfer += iprot->readMapBegin(_ktype224, _vtype225, _size223); uint32_t _i227; for (_i227 = 0; _i227 < _size223; ++_i227) { @@ -1939,7 +1979,7 @@ Type& _val229 = this->success[_key228]; xfer += _val229.read(iprot); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -2022,7 +2062,7 @@ uint32_t _size231; ::apache::thrift::protocol::TType _ktype232; ::apache::thrift::protocol::TType _vtype233; - iprot->readMapBegin(_ktype232, _vtype233, _size231); + xfer += iprot->readMapBegin(_ktype232, _vtype233, _size231); uint32_t _i235; for (_i235 = 0; _i235 < _size231; ++_i235) { @@ -2031,7 +2071,7 @@ Type& _val237 = (*(this->success))[_key236]; xfer += _val237.read(iprot); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -2109,12 +2149,15 @@ uint32_t ThriftHiveMetastore_get_fields_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->table_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2123,12 +2166,15 @@ uint32_t ThriftHiveMetastore_get_fields_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->table_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2160,14 +2206,14 @@ this->success.clear(); uint32_t _size238; ::apache::thrift::protocol::TType _etype241; - iprot->readListBegin(_etype241, _size238); + xfer += iprot->readListBegin(_etype241, _size238); this->success.resize(_size238); uint32_t _i242; for (_i242 = 0; _i242 < _size238; ++_i242) { xfer += this->success[_i242].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2272,14 +2318,14 @@ (*(this->success)).clear(); uint32_t _size244; ::apache::thrift::protocol::TType _etype247; - iprot->readListBegin(_etype247, _size244); + xfer += iprot->readListBegin(_etype247, _size244); (*(this->success)).resize(_size244); uint32_t _i248; for (_i248 = 0; _i248 < _size244; ++_i248) { xfer += (*(this->success))[_i248].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2373,12 +2419,15 @@ uint32_t ThriftHiveMetastore_get_schema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->table_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2387,12 +2436,15 @@ uint32_t ThriftHiveMetastore_get_schema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->table_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2424,14 +2476,14 @@ this->success.clear(); uint32_t _size249; ::apache::thrift::protocol::TType _etype252; - iprot->readListBegin(_etype252, _size249); + xfer += iprot->readListBegin(_etype252, _size249); this->success.resize(_size249); uint32_t _i253; for (_i253 = 0; _i253 < _size249; ++_i253) { xfer += this->success[_i253].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2536,14 +2588,14 @@ (*(this->success)).clear(); uint32_t _size255; ::apache::thrift::protocol::TType _etype258; - iprot->readListBegin(_etype258, _size255); + xfer += iprot->readListBegin(_etype258, _size255); (*(this->success)).resize(_size255); uint32_t _i259; for (_i259 = 0; _i259 < _size255; ++_i259) { xfer += (*(this->success))[_i259].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2629,9 +2681,11 @@ uint32_t ThriftHiveMetastore_create_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_args"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2640,9 +2694,11 @@ uint32_t ThriftHiveMetastore_create_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_pargs"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2855,12 +2911,15 @@ uint32_t ThriftHiveMetastore_create_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_environment_context_args"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2869,12 +2928,15 @@ uint32_t ThriftHiveMetastore_create_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3095,15 +3157,19 @@ uint32_t ThriftHiveMetastore_drop_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3112,15 +3178,19 @@ uint32_t ThriftHiveMetastore_drop_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3293,12 +3363,15 @@ uint32_t ThriftHiveMetastore_get_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->pattern); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3307,12 +3380,15 @@ uint32_t ThriftHiveMetastore_get_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->pattern))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3344,14 +3420,14 @@ this->success.clear(); uint32_t _size260; ::apache::thrift::protocol::TType _etype263; - iprot->readListBegin(_etype263, _size260); + xfer += 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(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3432,14 +3508,14 @@ (*(this->success)).clear(); uint32_t _size266; ::apache::thrift::protocol::TType _etype269; - iprot->readListBegin(_etype269, _size266); + xfer += iprot->readListBegin(_etype269, _size266); (*(this->success)).resize(_size266); uint32_t _i270; for (_i270 = 0; _i270 < _size266; ++_i270) { xfer += iprot->readString((*(this->success))[_i270]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3509,9 +3585,11 @@ uint32_t ThriftHiveMetastore_get_all_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3520,9 +3598,11 @@ uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3554,14 +3634,14 @@ this->success.clear(); uint32_t _size271; ::apache::thrift::protocol::TType _etype274; - iprot->readListBegin(_etype274, _size271); + xfer += iprot->readListBegin(_etype274, _size271); this->success.resize(_size271); uint32_t _i275; for (_i275 = 0; _i275 < _size271; ++_i275) { xfer += iprot->readString(this->success[_i275]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3642,14 +3722,14 @@ (*(this->success)).clear(); uint32_t _size277; ::apache::thrift::protocol::TType _etype280; - iprot->readListBegin(_etype280, _size277); + xfer += iprot->readListBegin(_etype280, _size277); (*(this->success)).resize(_size277); uint32_t _i281; for (_i281 = 0; _i281 < _size277; ++_i281) { xfer += iprot->readString((*(this->success))[_i281]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3727,12 +3807,15 @@ uint32_t ThriftHiveMetastore_get_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3741,12 +3824,15 @@ uint32_t ThriftHiveMetastore_get_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3922,14 +4008,14 @@ this->tbl_names.clear(); uint32_t _size282; ::apache::thrift::protocol::TType _etype285; - iprot->readListBegin(_etype285, _size282); + xfer += iprot->readListBegin(_etype285, _size282); this->tbl_names.resize(_size282); uint32_t _i286; for (_i286 = 0; _i286 < _size282; ++_i286) { xfer += iprot->readString(this->tbl_names[_i286]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.tbl_names = true; } else { @@ -3951,9 +4037,11 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tbl_names.size())); @@ -3965,6 +4053,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3973,9 +4062,11 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->tbl_names)).size())); @@ -3987,6 +4078,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4018,14 +4110,14 @@ this->success.clear(); uint32_t _size289; ::apache::thrift::protocol::TType _etype292; - iprot->readListBegin(_etype292, _size289); + xfer += iprot->readListBegin(_etype292, _size289); this->success.resize(_size289); uint32_t _i293; for (_i293 = 0; _i293 < _size289; ++_i293) { xfer += this->success[_i293].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4130,14 +4222,14 @@ (*(this->success)).clear(); uint32_t _size295; ::apache::thrift::protocol::TType _etype298; - iprot->readListBegin(_etype298, _size295); + xfer += iprot->readListBegin(_etype298, _size295); (*(this->success)).resize(_size295); uint32_t _i299; for (_i299 = 0; _i299 < _size295; ++_i299) { xfer += (*(this->success))[_i299].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4239,15 +4331,19 @@ 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; @@ -4256,15 +4352,19 @@ 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; @@ -4296,14 +4396,14 @@ this->success.clear(); uint32_t _size300; ::apache::thrift::protocol::TType _etype303; - iprot->readListBegin(_etype303, _size300); + xfer += iprot->readListBegin(_etype303, _size300); this->success.resize(_size300); uint32_t _i304; for (_i304 = 0; _i304 < _size300; ++_i304) { xfer += iprot->readString(this->success[_i304]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4408,14 +4508,14 @@ (*(this->success)).clear(); uint32_t _size306; ::apache::thrift::protocol::TType _etype309; - iprot->readListBegin(_etype309, _size306); + xfer += iprot->readListBegin(_etype309, _size306); (*(this->success)).resize(_size306); uint32_t _i310; for (_i310 = 0; _i310 < _size306; ++_i310) { xfer += iprot->readString((*(this->success))[_i310]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4517,15 +4617,19 @@ uint32_t ThriftHiveMetastore_alter_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4534,15 +4638,19 @@ uint32_t ThriftHiveMetastore_alter_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4731,18 +4839,23 @@ uint32_t ThriftHiveMetastore_alter_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_environment_context_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4751,18 +4864,23 @@ uint32_t ThriftHiveMetastore_alter_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4927,9 +5045,11 @@ uint32_t ThriftHiveMetastore_add_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_args"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4938,9 +5058,11 @@ uint32_t ThriftHiveMetastore_add_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_pargs"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5153,12 +5275,15 @@ uint32_t ThriftHiveMetastore_add_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_with_environment_context_args"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5167,12 +5292,15 @@ uint32_t ThriftHiveMetastore_add_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5360,14 +5488,14 @@ this->new_parts.clear(); uint32_t _size311; ::apache::thrift::protocol::TType _etype314; - iprot->readListBegin(_etype314, _size311); + xfer += iprot->readListBegin(_etype314, _size311); this->new_parts.resize(_size311); uint32_t _i315; for (_i315 = 0; _i315 < _size311; ++_i315) { xfer += this->new_parts[_i315].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.new_parts = true; } else { @@ -5389,6 +5517,7 @@ uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_args"); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); @@ -5400,6 +5529,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5408,6 +5538,7 @@ uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pargs"); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); @@ -5419,6 +5550,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5622,14 +5754,14 @@ this->part_vals.clear(); uint32_t _size318; ::apache::thrift::protocol::TType _etype321; - iprot->readListBegin(_etype321, _size318); + xfer += iprot->readListBegin(_etype321, _size318); this->part_vals.resize(_size318); uint32_t _i322; for (_i322 = 0; _i322 < _size318; ++_i322) { xfer += iprot->readString(this->part_vals[_i322]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -5651,12 +5783,15 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -5668,6 +5803,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5676,12 +5812,15 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -5693,6 +5832,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5913,15 +6053,19 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5930,15 +6074,19 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6142,14 +6290,14 @@ this->part_vals.clear(); uint32_t _size325; ::apache::thrift::protocol::TType _etype328; - iprot->readListBegin(_etype328, _size325); + xfer += iprot->readListBegin(_etype328, _size325); this->part_vals.resize(_size325); uint32_t _i329; for (_i329 = 0; _i329 < _size325; ++_i329) { xfer += iprot->readString(this->part_vals[_i329]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -6179,12 +6327,15 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -6196,9 +6347,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6207,12 +6360,15 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -6224,9 +6380,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6435,18 +6593,23 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6455,18 +6618,23 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6650,14 +6818,14 @@ this->part_vals.clear(); uint32_t _size332; ::apache::thrift::protocol::TType _etype335; - iprot->readListBegin(_etype335, _size332); + xfer += iprot->readListBegin(_etype335, _size332); this->part_vals.resize(_size332); uint32_t _i336; for (_i336 = 0; _i336 < _size332; ++_i336) { xfer += iprot->readString(this->part_vals[_i336]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -6679,12 +6847,15 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -6696,6 +6867,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6704,12 +6876,15 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -6721,6 +6896,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6904,14 +7080,14 @@ this->part_vals.clear(); uint32_t _size339; ::apache::thrift::protocol::TType _etype342; - iprot->readListBegin(_etype342, _size339); + xfer += iprot->readListBegin(_etype342, _size339); this->part_vals.resize(_size339); uint32_t _i343; for (_i343 = 0; _i343 < _size339; ++_i343) { xfer += iprot->readString(this->part_vals[_i343]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -6932,14 +7108,14 @@ this->group_names.clear(); uint32_t _size344; ::apache::thrift::protocol::TType _etype347; - iprot->readListBegin(_etype347, _size344); + xfer += iprot->readListBegin(_etype347, _size344); this->group_names.resize(_size344); uint32_t _i348; for (_i348 = 0; _i348 < _size344; ++_i348) { xfer += iprot->readString(this->group_names[_i348]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -6961,12 +7137,15 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -6978,9 +7157,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -6992,6 +7173,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7000,12 +7182,15 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -7017,9 +7202,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -7031,6 +7218,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7231,15 +7419,19 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7248,15 +7440,19 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7457,15 +7653,19 @@ uint32_t ThriftHiveMetastore_get_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7474,15 +7674,19 @@ uint32_t ThriftHiveMetastore_get_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7514,14 +7718,14 @@ this->success.clear(); uint32_t _size353; ::apache::thrift::protocol::TType _etype356; - iprot->readListBegin(_etype356, _size353); + xfer += iprot->readListBegin(_etype356, _size353); this->success.resize(_size353); uint32_t _i357; for (_i357 = 0; _i357 < _size353; ++_i357) { xfer += this->success[_i357].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -7614,14 +7818,14 @@ (*(this->success)).clear(); uint32_t _size359; ::apache::thrift::protocol::TType _etype362; - iprot->readListBegin(_etype362, _size359); + xfer += iprot->readListBegin(_etype362, _size359); (*(this->success)).resize(_size359); uint32_t _i363; for (_i363 = 0; _i363 < _size359; ++_i363) { xfer += (*(this->success))[_i363].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -7714,14 +7918,14 @@ this->group_names.clear(); uint32_t _size364; ::apache::thrift::protocol::TType _etype367; - iprot->readListBegin(_etype367, _size364); + xfer += iprot->readListBegin(_etype367, _size364); this->group_names.resize(_size364); uint32_t _i368; for (_i368 = 0; _i368 < _size364; ++_i368) { xfer += iprot->readString(this->group_names[_i368]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -7743,18 +7947,23 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -7766,6 +7975,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7774,18 +7984,23 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -7797,6 +8012,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7828,14 +8044,14 @@ this->success.clear(); uint32_t _size371; ::apache::thrift::protocol::TType _etype374; - iprot->readListBegin(_etype374, _size371); + xfer += iprot->readListBegin(_etype374, _size371); this->success.resize(_size371); uint32_t _i375; for (_i375 = 0; _i375 < _size371; ++_i375) { xfer += this->success[_i375].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -7928,14 +8144,14 @@ (*(this->success)).clear(); uint32_t _size377; ::apache::thrift::protocol::TType _etype380; - iprot->readListBegin(_etype380, _size377); + xfer += iprot->readListBegin(_etype380, _size377); (*(this->success)).resize(_size377); uint32_t _i381; for (_i381 = 0; _i381 < _size377; ++_i381) { xfer += (*(this->success))[_i381].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8029,15 +8245,19 @@ uint32_t ThriftHiveMetastore_get_partition_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8046,15 +8266,19 @@ uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8086,14 +8310,14 @@ this->success.clear(); uint32_t _size382; ::apache::thrift::protocol::TType _etype385; - iprot->readListBegin(_etype385, _size382); + xfer += iprot->readListBegin(_etype385, _size382); this->success.resize(_size382); uint32_t _i386; for (_i386 = 0; _i386 < _size382; ++_i386) { xfer += iprot->readString(this->success[_i386]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8174,14 +8398,14 @@ (*(this->success)).clear(); uint32_t _size388; ::apache::thrift::protocol::TType _etype391; - iprot->readListBegin(_etype391, _size388); + xfer += iprot->readListBegin(_etype391, _size388); (*(this->success)).resize(_size388); uint32_t _i392; for (_i392 = 0; _i392 < _size388; ++_i392) { xfer += iprot->readString((*(this->success))[_i392]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8250,14 +8474,14 @@ this->part_vals.clear(); uint32_t _size393; ::apache::thrift::protocol::TType _etype396; - iprot->readListBegin(_etype396, _size393); + xfer += iprot->readListBegin(_etype396, _size393); this->part_vals.resize(_size393); uint32_t _i397; for (_i397 = 0; _i397 < _size393; ++_i397) { xfer += iprot->readString(this->part_vals[_i397]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -8287,12 +8511,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -8304,9 +8531,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8315,12 +8544,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -8332,9 +8564,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8366,14 +8600,14 @@ this->success.clear(); uint32_t _size400; ::apache::thrift::protocol::TType _etype403; - iprot->readListBegin(_etype403, _size400); + xfer += iprot->readListBegin(_etype403, _size400); this->success.resize(_size400); uint32_t _i404; for (_i404 = 0; _i404 < _size400; ++_i404) { xfer += this->success[_i404].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8466,14 +8700,14 @@ (*(this->success)).clear(); uint32_t _size406; ::apache::thrift::protocol::TType _etype409; - iprot->readListBegin(_etype409, _size406); + xfer += iprot->readListBegin(_etype409, _size406); (*(this->success)).resize(_size406); uint32_t _i410; for (_i410 = 0; _i410 < _size406; ++_i410) { xfer += (*(this->success))[_i410].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8550,14 +8784,14 @@ this->part_vals.clear(); uint32_t _size411; ::apache::thrift::protocol::TType _etype414; - iprot->readListBegin(_etype414, _size411); + xfer += iprot->readListBegin(_etype414, _size411); this->part_vals.resize(_size411); uint32_t _i415; for (_i415 = 0; _i415 < _size411; ++_i415) { xfer += iprot->readString(this->part_vals[_i415]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -8586,14 +8820,14 @@ this->group_names.clear(); uint32_t _size416; ::apache::thrift::protocol::TType _etype419; - iprot->readListBegin(_etype419, _size416); + xfer += iprot->readListBegin(_etype419, _size416); this->group_names.resize(_size416); uint32_t _i420; for (_i420 = 0; _i420 < _size416; ++_i420) { xfer += iprot->readString(this->group_names[_i420]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -8615,12 +8849,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -8632,12 +8869,15 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -8649,6 +8889,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8657,12 +8898,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -8674,12 +8918,15 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -8691,6 +8938,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8722,14 +8970,14 @@ this->success.clear(); uint32_t _size425; ::apache::thrift::protocol::TType _etype428; - iprot->readListBegin(_etype428, _size425); + xfer += iprot->readListBegin(_etype428, _size425); this->success.resize(_size425); uint32_t _i429; for (_i429 = 0; _i429 < _size425; ++_i429) { xfer += this->success[_i429].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8822,14 +9070,14 @@ (*(this->success)).clear(); uint32_t _size431; ::apache::thrift::protocol::TType _etype434; - iprot->readListBegin(_etype434, _size431); + xfer += iprot->readListBegin(_etype434, _size431); (*(this->success)).resize(_size431); uint32_t _i435; for (_i435 = 0; _i435 < _size431; ++_i435) { xfer += (*(this->success))[_i435].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8906,14 +9154,14 @@ this->part_vals.clear(); uint32_t _size436; ::apache::thrift::protocol::TType _etype439; - iprot->readListBegin(_etype439, _size436); + xfer += iprot->readListBegin(_etype439, _size436); this->part_vals.resize(_size436); uint32_t _i440; for (_i440 = 0; _i440 < _size436; ++_i440) { xfer += iprot->readString(this->part_vals[_i440]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -8943,12 +9191,15 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -8960,9 +9211,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8971,12 +9224,15 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -8988,9 +9244,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9022,14 +9280,14 @@ this->success.clear(); uint32_t _size443; ::apache::thrift::protocol::TType _etype446; - iprot->readListBegin(_etype446, _size443); + xfer += iprot->readListBegin(_etype446, _size443); this->success.resize(_size443); uint32_t _i447; for (_i447 = 0; _i447 < _size443; ++_i447) { xfer += iprot->readString(this->success[_i447]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9122,14 +9380,14 @@ (*(this->success)).clear(); uint32_t _size449; ::apache::thrift::protocol::TType _etype452; - iprot->readListBegin(_etype452, _size449); + xfer += iprot->readListBegin(_etype452, _size449); (*(this->success)).resize(_size449); uint32_t _i453; for (_i453 = 0; _i453 < _size449; ++_i453) { xfer += iprot->readString((*(this->success))[_i453]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9231,18 +9489,23 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->filter); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9251,18 +9514,23 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->filter))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9294,14 +9562,14 @@ this->success.clear(); uint32_t _size454; ::apache::thrift::protocol::TType _etype457; - iprot->readListBegin(_etype457, _size454); + xfer += iprot->readListBegin(_etype457, _size454); this->success.resize(_size454); uint32_t _i458; for (_i458 = 0; _i458 < _size454; ++_i458) { xfer += this->success[_i458].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9394,14 +9662,14 @@ (*(this->success)).clear(); uint32_t _size460; ::apache::thrift::protocol::TType _etype463; - iprot->readListBegin(_etype463, _size460); + xfer += iprot->readListBegin(_etype463, _size460); (*(this->success)).resize(_size460); uint32_t _i464; for (_i464 = 0; _i464 < _size460; ++_i464) { xfer += (*(this->success))[_i464].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9478,14 +9746,14 @@ this->names.clear(); uint32_t _size465; ::apache::thrift::protocol::TType _etype468; - iprot->readListBegin(_etype468, _size465); + xfer += iprot->readListBegin(_etype468, _size465); this->names.resize(_size465); uint32_t _i469; for (_i469 = 0; _i469 < _size465; ++_i469) { xfer += iprot->readString(this->names[_i469]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.names = true; } else { @@ -9507,12 +9775,15 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_names_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->names.size())); @@ -9524,6 +9795,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9532,12 +9804,15 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_names_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->names)).size())); @@ -9549,6 +9824,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9580,14 +9856,14 @@ this->success.clear(); uint32_t _size472; ::apache::thrift::protocol::TType _etype475; - iprot->readListBegin(_etype475, _size472); + xfer += iprot->readListBegin(_etype475, _size472); this->success.resize(_size472); uint32_t _i476; for (_i476 = 0; _i476 < _size472; ++_i476) { xfer += this->success[_i476].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9680,14 +9956,14 @@ (*(this->success)).clear(); uint32_t _size478; ::apache::thrift::protocol::TType _etype481; - iprot->readListBegin(_etype481, _size478); + xfer += iprot->readListBegin(_etype481, _size478); (*(this->success)).resize(_size478); uint32_t _i482; for (_i482 = 0; _i482 < _size478; ++_i482) { xfer += (*(this->success))[_i482].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9781,15 +10057,19 @@ uint32_t ThriftHiveMetastore_alter_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9798,15 +10078,19 @@ uint32_t ThriftHiveMetastore_alter_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9970,14 +10254,14 @@ this->new_parts.clear(); uint32_t _size483; ::apache::thrift::protocol::TType _etype486; - iprot->readListBegin(_etype486, _size483); + xfer += iprot->readListBegin(_etype486, _size483); this->new_parts.resize(_size483); uint32_t _i487; for (_i487 = 0; _i487 < _size483; ++_i487) { xfer += this->new_parts[_i487].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.new_parts = true; } else { @@ -9999,12 +10283,15 @@ uint32_t ThriftHiveMetastore_alter_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); @@ -10016,6 +10303,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10024,12 +10312,15 @@ uint32_t ThriftHiveMetastore_alter_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); @@ -10041,6 +10332,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10229,18 +10521,23 @@ uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_with_environment_context_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10249,18 +10546,23 @@ uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10424,14 +10726,14 @@ this->part_vals.clear(); uint32_t _size490; ::apache::thrift::protocol::TType _etype493; - iprot->readListBegin(_etype493, _size490); + xfer += iprot->readListBegin(_etype493, _size490); this->part_vals.resize(_size490); uint32_t _i494; for (_i494 = 0; _i494 < _size490; ++_i494) { xfer += iprot->readString(this->part_vals[_i494]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -10461,12 +10763,15 @@ uint32_t ThriftHiveMetastore_rename_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_rename_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -10478,9 +10783,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10489,12 +10796,15 @@ uint32_t ThriftHiveMetastore_rename_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_rename_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -10506,9 +10816,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10681,12 +10993,15 @@ uint32_t ThriftHiveMetastore_get_config_value_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->defaultValue); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10695,12 +11010,15 @@ uint32_t ThriftHiveMetastore_get_config_value_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->defaultValue))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10865,9 +11183,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_args"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10876,9 +11196,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_pargs"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10910,14 +11232,14 @@ this->success.clear(); uint32_t _size497; ::apache::thrift::protocol::TType _etype500; - iprot->readListBegin(_etype500, _size497); + xfer += iprot->readListBegin(_etype500, _size497); this->success.resize(_size497); uint32_t _i501; for (_i501 = 0; _i501 < _size497; ++_i501) { xfer += iprot->readString(this->success[_i501]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -10998,14 +11320,14 @@ (*(this->success)).clear(); uint32_t _size503; ::apache::thrift::protocol::TType _etype506; - iprot->readListBegin(_etype506, _size503); + xfer += iprot->readListBegin(_etype506, _size503); (*(this->success)).resize(_size503); uint32_t _i507; for (_i507 = 0; _i507 < _size503; ++_i507) { xfer += iprot->readString((*(this->success))[_i507]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -11075,9 +11397,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_args"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11086,9 +11410,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_pargs"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11121,7 +11447,7 @@ uint32_t _size508; ::apache::thrift::protocol::TType _ktype509; ::apache::thrift::protocol::TType _vtype510; - iprot->readMapBegin(_ktype509, _vtype510, _size508); + xfer += iprot->readMapBegin(_ktype509, _vtype510, _size508); uint32_t _i512; for (_i512 = 0; _i512 < _size508; ++_i512) { @@ -11130,7 +11456,7 @@ std::string& _val514 = this->success[_key513]; xfer += iprot->readString(_val514); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -11213,7 +11539,7 @@ uint32_t _size516; ::apache::thrift::protocol::TType _ktype517; ::apache::thrift::protocol::TType _vtype518; - iprot->readMapBegin(_ktype517, _vtype518, _size516); + xfer += iprot->readMapBegin(_ktype517, _vtype518, _size516); uint32_t _i520; for (_i520 = 0; _i520 < _size516; ++_i520) { @@ -11222,7 +11548,7 @@ std::string& _val522 = (*(this->success))[_key521]; xfer += iprot->readString(_val522); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -11292,7 +11618,7 @@ uint32_t _size523; ::apache::thrift::protocol::TType _ktype524; ::apache::thrift::protocol::TType _vtype525; - iprot->readMapBegin(_ktype524, _vtype525, _size523); + xfer += iprot->readMapBegin(_ktype524, _vtype525, _size523); uint32_t _i527; for (_i527 = 0; _i527 < _size523; ++_i527) { @@ -11301,7 +11627,7 @@ std::string& _val529 = this->part_vals[_key528]; xfer += iprot->readString(_val529); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.part_vals = true; } else { @@ -11333,12 +11659,15 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_markPartitionForEvent_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -11351,9 +11680,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->eventType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11362,12 +11693,15 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_markPartitionForEvent_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -11380,9 +11714,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)(*(this->eventType))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11627,7 +11963,7 @@ uint32_t _size533; ::apache::thrift::protocol::TType _ktype534; ::apache::thrift::protocol::TType _vtype535; - iprot->readMapBegin(_ktype534, _vtype535, _size533); + xfer += iprot->readMapBegin(_ktype534, _vtype535, _size533); uint32_t _i537; for (_i537 = 0; _i537 < _size533; ++_i537) { @@ -11636,7 +11972,7 @@ std::string& _val539 = this->part_vals[_key538]; xfer += iprot->readString(_val539); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.part_vals = true; } else { @@ -11668,12 +12004,15 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_isPartitionMarkedForEvent_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -11686,9 +12025,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->eventType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11697,12 +12038,15 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_isPartitionMarkedForEvent_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -11715,9 +12059,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)(*(this->eventType))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11990,12 +12336,15 @@ uint32_t ThriftHiveMetastore_add_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_args"); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_index.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->index_table.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12004,12 +12353,15 @@ uint32_t ThriftHiveMetastore_add_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_pargs"); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_index)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->index_table)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12238,18 +12590,23 @@ uint32_t ThriftHiveMetastore_alter_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->base_tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->idx_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->new_idx.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12258,18 +12615,23 @@ uint32_t ThriftHiveMetastore_alter_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->base_tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->idx_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->new_idx)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12458,18 +12820,23 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->index_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12478,18 +12845,23 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->index_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12690,15 +13062,19 @@ uint32_t ThriftHiveMetastore_get_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->index_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12707,15 +13083,19 @@ uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->index_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12916,15 +13296,19 @@ uint32_t ThriftHiveMetastore_get_indexes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_indexes); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12933,15 +13317,19 @@ uint32_t ThriftHiveMetastore_get_indexes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_indexes))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12973,14 +13361,14 @@ this->success.clear(); uint32_t _size543; ::apache::thrift::protocol::TType _etype546; - iprot->readListBegin(_etype546, _size543); + xfer += iprot->readListBegin(_etype546, _size543); this->success.resize(_size543); uint32_t _i547; for (_i547 = 0; _i547 < _size543; ++_i547) { xfer += this->success[_i547].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13073,14 +13461,14 @@ (*(this->success)).clear(); uint32_t _size549; ::apache::thrift::protocol::TType _etype552; - iprot->readListBegin(_etype552, _size549); + xfer += iprot->readListBegin(_etype552, _size549); (*(this->success)).resize(_size549); uint32_t _i553; for (_i553 = 0; _i553 < _size549; ++_i553) { xfer += (*(this->success))[_i553].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13174,15 +13562,19 @@ uint32_t ThriftHiveMetastore_get_index_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_indexes); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13191,15 +13583,19 @@ uint32_t ThriftHiveMetastore_get_index_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_indexes))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13231,14 +13627,14 @@ this->success.clear(); uint32_t _size554; ::apache::thrift::protocol::TType _etype557; - iprot->readListBegin(_etype557, _size554); + xfer += iprot->readListBegin(_etype557, _size554); this->success.resize(_size554); uint32_t _i558; for (_i558 = 0; _i558 < _size554; ++_i558) { xfer += iprot->readString(this->success[_i558]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13319,14 +13715,14 @@ (*(this->success)).clear(); uint32_t _size560; ::apache::thrift::protocol::TType _etype563; - iprot->readListBegin(_etype563, _size560); + xfer += iprot->readListBegin(_etype563, _size560); (*(this->success)).resize(_size560); uint32_t _i564; for (_i564 = 0; _i564 < _size560; ++_i564) { xfer += iprot->readString((*(this->success))[_i564]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13396,9 +13792,11 @@ uint32_t ThriftHiveMetastore_update_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_args"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->stats_obj.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13407,9 +13805,11 @@ uint32_t ThriftHiveMetastore_update_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->stats_obj)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13634,9 +14034,11 @@ uint32_t ThriftHiveMetastore_update_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_args"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->stats_obj.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13645,9 +14047,11 @@ uint32_t ThriftHiveMetastore_update_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->stats_obj)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13888,15 +14292,19 @@ uint32_t ThriftHiveMetastore_get_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->col_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13905,15 +14313,19 @@ uint32_t ThriftHiveMetastore_get_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->col_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14162,18 +14574,23 @@ uint32_t ThriftHiveMetastore_get_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->col_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14182,18 +14599,23 @@ uint32_t ThriftHiveMetastore_get_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->col_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14442,18 +14864,23 @@ uint32_t ThriftHiveMetastore_delete_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->col_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14462,18 +14889,23 @@ uint32_t ThriftHiveMetastore_delete_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->col_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14714,15 +15146,19 @@ uint32_t ThriftHiveMetastore_delete_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->col_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14731,15 +15167,19 @@ uint32_t ThriftHiveMetastore_delete_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->col_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14964,9 +15404,11 @@ uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_args"); + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->role.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14975,9 +15417,11 @@ uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->role)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15142,9 +15586,11 @@ uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15153,9 +15599,11 @@ uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15295,12 +15743,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -15312,6 +15755,7 @@ uint32_t ThriftHiveMetastore_get_role_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15320,6 +15764,7 @@ uint32_t ThriftHiveMetastore_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15351,14 +15796,14 @@ this->success.clear(); uint32_t _size565; ::apache::thrift::protocol::TType _etype568; - iprot->readListBegin(_etype568, _size565); + xfer += iprot->readListBegin(_etype568, _size565); this->success.resize(_size565); uint32_t _i569; for (_i569 = 0; _i569 < _size565; ++_i569) { xfer += iprot->readString(this->success[_i569]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -15439,14 +15884,14 @@ (*(this->success)).clear(); uint32_t _size571; ::apache::thrift::protocol::TType _etype574; - iprot->readListBegin(_etype574, _size571); + xfer += iprot->readListBegin(_etype574, _size571); (*(this->success)).resize(_size571); uint32_t _i575; for (_i575 = 0; _i575 < _size571; ++_i575) { xfer += iprot->readString((*(this->success))[_i575]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -15560,24 +16005,31 @@ uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->grantor); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32((int32_t)this->grantorType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool(this->grant_option); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15586,24 +16038,31 @@ uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->grantor))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32((int32_t)(*(this->grantorType))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool((*(this->grant_option))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15786,15 +16245,19 @@ uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15803,15 +16266,19 @@ uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15986,12 +16453,15 @@ uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16000,12 +16470,15 @@ uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16037,14 +16510,14 @@ this->success.clear(); uint32_t _size580; ::apache::thrift::protocol::TType _etype583; - iprot->readListBegin(_etype583, _size580); + xfer += iprot->readListBegin(_etype583, _size580); this->success.resize(_size580); uint32_t _i584; for (_i584 = 0; _i584 < _size580; ++_i584) { xfer += this->success[_i584].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -16125,14 +16598,14 @@ (*(this->success)).clear(); uint32_t _size586; ::apache::thrift::protocol::TType _etype589; - iprot->readListBegin(_etype589, _size586); + xfer += iprot->readListBegin(_etype589, _size586); (*(this->success)).resize(_size586); uint32_t _i590; for (_i590 = 0; _i590 < _size586; ++_i590) { xfer += (*(this->success))[_i590].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -16201,14 +16674,14 @@ this->group_names.clear(); uint32_t _size591; ::apache::thrift::protocol::TType _etype594; - iprot->readListBegin(_etype594, _size591); + xfer += iprot->readListBegin(_etype594, _size591); this->group_names.resize(_size591); uint32_t _i595; for (_i595 = 0; _i595 < _size591; ++_i595) { xfer += iprot->readString(this->group_names[_i595]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -16230,12 +16703,15 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_args"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->hiveObject.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -16247,6 +16723,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16255,12 +16732,15 @@ uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->hiveObject)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -16272,6 +16752,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16454,15 +16935,19 @@ uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->hiveObject.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16471,15 +16956,19 @@ uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->hiveObject)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16511,14 +17000,14 @@ this->success.clear(); uint32_t _size599; ::apache::thrift::protocol::TType _etype602; - iprot->readListBegin(_etype602, _size599); + xfer += iprot->readListBegin(_etype602, _size599); this->success.resize(_size599); uint32_t _i603; for (_i603 = 0; _i603 < _size599; ++_i603) { xfer += this->success[_i603].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -16599,14 +17088,14 @@ (*(this->success)).clear(); uint32_t _size605; ::apache::thrift::protocol::TType _etype608; - iprot->readListBegin(_etype608, _size605); + xfer += iprot->readListBegin(_etype608, _size605); (*(this->success)).resize(_size605); uint32_t _i609; for (_i609 = 0; _i609 < _size605; ++_i609) { xfer += (*(this->success))[_i609].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -16676,9 +17165,11 @@ uint32_t ThriftHiveMetastore_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_args"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->privileges.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16687,9 +17178,11 @@ uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_pargs"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->privileges)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16854,9 +17347,11 @@ uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_args"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->privileges.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16865,9 +17360,11 @@ uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_pargs"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->privileges)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17023,14 +17520,14 @@ this->group_names.clear(); uint32_t _size610; ::apache::thrift::protocol::TType _etype613; - iprot->readListBegin(_etype613, _size610); + xfer += iprot->readListBegin(_etype613, _size610); this->group_names.resize(_size610); uint32_t _i614; for (_i614 = 0; _i614 < _size610; ++_i614) { xfer += iprot->readString(this->group_names[_i614]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -17052,9 +17549,11 @@ uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_args"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -17066,6 +17565,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17074,9 +17574,11 @@ uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_pargs"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -17088,6 +17590,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17119,14 +17622,14 @@ this->success.clear(); uint32_t _size617; ::apache::thrift::protocol::TType _etype620; - iprot->readListBegin(_etype620, _size617); + xfer += iprot->readListBegin(_etype620, _size617); this->success.resize(_size617); uint32_t _i621; for (_i621 = 0; _i621 < _size617; ++_i621) { xfer += iprot->readString(this->success[_i621]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -17207,14 +17710,14 @@ (*(this->success)).clear(); uint32_t _size623; ::apache::thrift::protocol::TType _etype626; - iprot->readListBegin(_etype626, _size623); + xfer += iprot->readListBegin(_etype626, _size623); (*(this->success)).resize(_size623); uint32_t _i627; for (_i627 = 0; _i627 < _size623; ++_i627) { xfer += iprot->readString((*(this->success))[_i627]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -17292,12 +17795,15 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->token_owner); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->renewer_kerberos_principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17306,12 +17812,15 @@ uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->token_owner))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->renewer_kerberos_principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17476,9 +17985,11 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->token_str_form); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17487,9 +17998,11 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->token_str_form))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17654,9 +18167,11 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->token_str_form); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -17665,9 +18180,11 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->token_str_form))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -22646,37 +23163,11 @@ return; } -bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) { - - ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); - ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - iprot->readMessageBegin(fname, mtype, seqid); - - if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { - iprot->skip(::apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return false; - } - - return process_fn(iprot, oprot, fname, seqid, callContext); -} - -bool ThriftHiveMetastoreProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) { - std::map::iterator pfn; +bool ThriftHiveMetastoreProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; pfn = processMap_.find(fname); if (pfn == processMap_.end()) { - return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid, callContext); + return ::facebook::fb303::FacebookServiceProcessor::dispatchCall(iprot, oprot, fname, seqid, callContext); } (this->*(pfn->second))(seqid, iprot, oprot, callContext); return true; @@ -22685,13 +23176,13 @@ void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); } ThriftHiveMetastore_create_database_args args; @@ -22699,8 +23190,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); } ThriftHiveMetastore_create_database_result result; @@ -22716,8 +23207,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22729,8 +23220,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); } oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22739,21 +23230,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); } } void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); } ThriftHiveMetastore_get_database_args args; @@ -22761,8 +23252,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); } ThriftHiveMetastore_get_database_result result; @@ -22776,8 +23267,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22789,8 +23280,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); } oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22799,21 +23290,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); } ThriftHiveMetastore_drop_database_args args; @@ -22821,8 +23312,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); } ThriftHiveMetastore_drop_database_result result; @@ -22838,8 +23329,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22851,8 +23342,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); } oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22861,21 +23352,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); } } void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); } ThriftHiveMetastore_get_databases_args args; @@ -22883,8 +23374,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); } ThriftHiveMetastore_get_databases_result result; @@ -22895,8 +23386,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22908,8 +23399,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); } oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22918,21 +23409,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); } } void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); } ThriftHiveMetastore_get_all_databases_args args; @@ -22940,8 +23431,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); } ThriftHiveMetastore_get_all_databases_result result; @@ -22952,8 +23443,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22965,8 +23456,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); } oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22975,21 +23466,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); } ThriftHiveMetastore_alter_database_args args; @@ -22997,8 +23488,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); } ThriftHiveMetastore_alter_database_result result; @@ -23011,8 +23502,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23024,8 +23515,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); } oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23034,21 +23525,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); } } void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); } ThriftHiveMetastore_get_type_args args; @@ -23056,8 +23547,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); } ThriftHiveMetastore_get_type_result result; @@ -23071,8 +23562,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23084,8 +23575,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); } oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23094,21 +23585,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); } } void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); } ThriftHiveMetastore_create_type_args args; @@ -23116,8 +23607,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); } ThriftHiveMetastore_create_type_result result; @@ -23134,8 +23625,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23147,8 +23638,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); } oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23157,21 +23648,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); } ThriftHiveMetastore_drop_type_args args; @@ -23179,8 +23670,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); } ThriftHiveMetastore_drop_type_result result; @@ -23194,8 +23685,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23207,8 +23698,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); } oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23217,21 +23708,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); } } void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); } ThriftHiveMetastore_get_type_all_args args; @@ -23239,8 +23730,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); } ThriftHiveMetastore_get_type_all_result result; @@ -23251,8 +23742,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23264,8 +23755,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); } oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23274,21 +23765,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type_all", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type_all", bytes); } } void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); } ThriftHiveMetastore_get_fields_args args; @@ -23296,8 +23787,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); } ThriftHiveMetastore_get_fields_result result; @@ -23314,8 +23805,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23327,8 +23818,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); } oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23337,21 +23828,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); } } void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); } ThriftHiveMetastore_get_schema_args args; @@ -23359,8 +23850,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); } ThriftHiveMetastore_get_schema_result result; @@ -23377,8 +23868,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23390,8 +23881,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); } oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23400,21 +23891,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); } } void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); } ThriftHiveMetastore_create_table_args args; @@ -23422,8 +23913,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); } ThriftHiveMetastore_create_table_result result; @@ -23442,8 +23933,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23455,8 +23946,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); } oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23465,21 +23956,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); } } void ThriftHiveMetastoreProcessor::process_create_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } ThriftHiveMetastore_create_table_with_environment_context_args args; @@ -23487,8 +23978,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } ThriftHiveMetastore_create_table_with_environment_context_result result; @@ -23507,8 +23998,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23520,8 +24011,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23530,21 +24021,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); } ThriftHiveMetastore_drop_table_args args; @@ -23552,8 +24043,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); } ThriftHiveMetastore_drop_table_result result; @@ -23566,8 +24057,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23579,8 +24070,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); } oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23589,21 +24080,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); } } void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); } ThriftHiveMetastore_get_tables_args args; @@ -23611,8 +24102,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); } ThriftHiveMetastore_get_tables_result result; @@ -23623,8 +24114,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23636,8 +24127,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); } oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23646,21 +24137,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); } } void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); } ThriftHiveMetastore_get_all_tables_args args; @@ -23668,8 +24159,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } ThriftHiveMetastore_get_all_tables_result result; @@ -23680,8 +24171,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23693,8 +24184,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); } oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23703,21 +24194,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } } void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); } ThriftHiveMetastore_get_table_args args; @@ -23725,8 +24216,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); } ThriftHiveMetastore_get_table_result result; @@ -23740,8 +24231,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23753,8 +24244,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); } oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23763,21 +24254,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table", bytes); } } void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } ThriftHiveMetastore_get_table_objects_by_name_args args; @@ -23785,8 +24276,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } ThriftHiveMetastore_get_table_objects_by_name_result result; @@ -23803,8 +24294,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23816,8 +24307,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23826,21 +24317,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_table_names_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } ThriftHiveMetastore_get_table_names_by_filter_args args; @@ -23848,8 +24339,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } ThriftHiveMetastore_get_table_names_by_filter_result result; @@ -23866,8 +24357,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23879,8 +24370,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23889,21 +24380,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); } ThriftHiveMetastore_alter_table_args args; @@ -23911,8 +24402,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); } ThriftHiveMetastore_alter_table_result result; @@ -23925,8 +24416,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23938,8 +24429,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); } oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23948,21 +24439,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } ThriftHiveMetastore_alter_table_with_environment_context_args args; @@ -23970,8 +24461,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } ThriftHiveMetastore_alter_table_with_environment_context_result result; @@ -23984,8 +24475,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23997,8 +24488,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24007,21 +24498,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); } ThriftHiveMetastore_add_partition_args args; @@ -24029,8 +24520,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); } ThriftHiveMetastore_add_partition_result result; @@ -24047,8 +24538,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24060,8 +24551,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); } oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24070,21 +24561,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_add_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } ThriftHiveMetastore_add_partition_with_environment_context_args args; @@ -24092,8 +24583,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); } ThriftHiveMetastore_add_partition_with_environment_context_result result; @@ -24110,8 +24601,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24123,8 +24614,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24133,21 +24624,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); } ThriftHiveMetastore_add_partitions_args args; @@ -24155,8 +24646,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); } ThriftHiveMetastore_add_partitions_result result; @@ -24173,8 +24664,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24186,8 +24677,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); } oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24196,21 +24687,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); } } void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); } ThriftHiveMetastore_append_partition_args args; @@ -24218,8 +24709,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); } ThriftHiveMetastore_append_partition_result result; @@ -24236,8 +24727,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24249,8 +24740,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); } oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24259,21 +24750,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); } ThriftHiveMetastore_append_partition_by_name_args args; @@ -24281,8 +24772,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); } ThriftHiveMetastore_append_partition_by_name_result result; @@ -24299,8 +24790,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24312,8 +24803,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); } oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24322,21 +24813,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); } ThriftHiveMetastore_drop_partition_args args; @@ -24344,8 +24835,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); } ThriftHiveMetastore_drop_partition_result result; @@ -24359,8 +24850,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24372,8 +24863,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); } oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24382,21 +24873,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } ThriftHiveMetastore_drop_partition_by_name_args args; @@ -24404,8 +24895,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } ThriftHiveMetastore_drop_partition_by_name_result result; @@ -24419,8 +24910,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24432,8 +24923,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24442,21 +24933,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); } ThriftHiveMetastore_get_partition_args args; @@ -24464,8 +24955,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); } ThriftHiveMetastore_get_partition_result result; @@ -24479,8 +24970,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24492,8 +24983,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); } oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24502,21 +24993,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } ThriftHiveMetastore_get_partition_with_auth_args args; @@ -24524,8 +25015,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } ThriftHiveMetastore_get_partition_with_auth_result result; @@ -24539,8 +25030,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24552,8 +25043,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24562,21 +25053,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); } ThriftHiveMetastore_get_partition_by_name_args args; @@ -24584,8 +25075,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } ThriftHiveMetastore_get_partition_by_name_result result; @@ -24599,8 +25090,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24612,8 +25103,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); } oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24622,21 +25113,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); } ThriftHiveMetastore_get_partitions_args args; @@ -24644,8 +25135,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); } ThriftHiveMetastore_get_partitions_result result; @@ -24659,8 +25150,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24672,8 +25163,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); } oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24682,21 +25173,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } ThriftHiveMetastore_get_partitions_with_auth_args args; @@ -24704,8 +25195,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } ThriftHiveMetastore_get_partitions_with_auth_result result; @@ -24719,8 +25210,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24732,8 +25223,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24742,21 +25233,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); } ThriftHiveMetastore_get_partition_names_args args; @@ -24764,8 +25255,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } ThriftHiveMetastore_get_partition_names_result result; @@ -24776,8 +25267,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24789,8 +25280,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); } oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24799,21 +25290,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); } ThriftHiveMetastore_get_partitions_ps_args args; @@ -24821,8 +25312,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } ThriftHiveMetastore_get_partitions_ps_result result; @@ -24836,8 +25327,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24849,8 +25340,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); } oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24859,21 +25350,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } ThriftHiveMetastore_get_partitions_ps_with_auth_args args; @@ -24881,8 +25372,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); } ThriftHiveMetastore_get_partitions_ps_with_auth_result result; @@ -24896,8 +25387,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24909,8 +25400,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24919,21 +25410,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } ThriftHiveMetastore_get_partition_names_ps_args args; @@ -24941,8 +25432,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } ThriftHiveMetastore_get_partition_names_ps_result result; @@ -24956,8 +25447,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24969,8 +25460,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24979,21 +25470,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } ThriftHiveMetastore_get_partitions_by_filter_args args; @@ -25001,8 +25492,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } ThriftHiveMetastore_get_partitions_by_filter_result result; @@ -25016,8 +25507,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25029,8 +25520,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25039,21 +25530,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } ThriftHiveMetastore_get_partitions_by_names_args args; @@ -25061,8 +25552,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } ThriftHiveMetastore_get_partitions_by_names_result result; @@ -25076,8 +25567,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25089,8 +25580,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25099,21 +25590,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); } ThriftHiveMetastore_alter_partition_args args; @@ -25121,8 +25612,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); } ThriftHiveMetastore_alter_partition_result result; @@ -25135,8 +25626,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25148,8 +25639,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); } oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25158,21 +25649,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); } ThriftHiveMetastore_alter_partitions_args args; @@ -25180,8 +25671,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } ThriftHiveMetastore_alter_partitions_result result; @@ -25194,8 +25685,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25207,8 +25698,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); } oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25217,21 +25708,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } ThriftHiveMetastore_alter_partition_with_environment_context_args args; @@ -25239,8 +25730,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } ThriftHiveMetastore_alter_partition_with_environment_context_result result; @@ -25253,8 +25744,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25266,8 +25757,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25276,21 +25767,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); } ThriftHiveMetastore_rename_partition_args args; @@ -25298,8 +25789,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); } ThriftHiveMetastore_rename_partition_result result; @@ -25312,8 +25803,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25325,8 +25816,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); } oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25335,21 +25826,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); } ThriftHiveMetastore_get_config_value_args args; @@ -25357,8 +25848,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); } ThriftHiveMetastore_get_config_value_result result; @@ -25369,8 +25860,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25382,8 +25873,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); } oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25392,21 +25883,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); } } void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } ThriftHiveMetastore_partition_name_to_vals_args args; @@ -25414,8 +25905,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } ThriftHiveMetastore_partition_name_to_vals_result result; @@ -25426,8 +25917,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25439,8 +25930,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25449,21 +25940,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } } void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } ThriftHiveMetastore_partition_name_to_spec_args args; @@ -25471,8 +25962,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); } ThriftHiveMetastore_partition_name_to_spec_result result; @@ -25483,8 +25974,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25496,8 +25987,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25506,21 +25997,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); } } void ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } ThriftHiveMetastore_markPartitionForEvent_args args; @@ -25528,8 +26019,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } ThriftHiveMetastore_markPartitionForEvent_result result; @@ -25554,8 +26045,8 @@ result.o6 = o6; result.__isset.o6 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25567,8 +26058,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25577,21 +26068,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } } void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } ThriftHiveMetastore_isPartitionMarkedForEvent_args args; @@ -25599,8 +26090,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } ThriftHiveMetastore_isPartitionMarkedForEvent_result result; @@ -25626,8 +26117,8 @@ result.o6 = o6; result.__isset.o6 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25639,8 +26130,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25649,21 +26140,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } } void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); } ThriftHiveMetastore_add_index_args args; @@ -25671,8 +26162,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); } ThriftHiveMetastore_add_index_result result; @@ -25689,8 +26180,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25702,8 +26193,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); } oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25712,21 +26203,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); } ThriftHiveMetastore_alter_index_args args; @@ -25734,8 +26225,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); } ThriftHiveMetastore_alter_index_result result; @@ -25748,8 +26239,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25761,8 +26252,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); } oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25771,21 +26262,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); } ThriftHiveMetastore_drop_index_by_name_args args; @@ -25793,8 +26284,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } ThriftHiveMetastore_drop_index_by_name_result result; @@ -25808,8 +26299,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25821,8 +26312,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); } oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25831,21 +26322,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); } ThriftHiveMetastore_get_index_by_name_args args; @@ -25853,8 +26344,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } ThriftHiveMetastore_get_index_by_name_result result; @@ -25868,8 +26359,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25881,8 +26372,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); } oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25891,21 +26382,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); } ThriftHiveMetastore_get_indexes_args args; @@ -25913,8 +26404,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); } ThriftHiveMetastore_get_indexes_result result; @@ -25928,8 +26419,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25941,8 +26432,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); } oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); @@ -25951,21 +26442,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); } } void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); } ThriftHiveMetastore_get_index_names_args args; @@ -25973,8 +26464,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); } ThriftHiveMetastore_get_index_names_result result; @@ -25985,8 +26476,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -25998,8 +26489,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); } oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26008,21 +26499,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); } } void ThriftHiveMetastoreProcessor::process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.update_table_column_statistics", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.update_table_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_table_column_statistics"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } ThriftHiveMetastore_update_table_column_statistics_args args; @@ -26030,8 +26521,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); } ThriftHiveMetastore_update_table_column_statistics_result result; @@ -26051,8 +26542,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26064,8 +26555,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26074,21 +26565,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); } } void ThriftHiveMetastoreProcessor::process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.update_partition_column_statistics", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_partition_column_statistics"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } ThriftHiveMetastore_update_partition_column_statistics_args args; @@ -26096,8 +26587,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); } ThriftHiveMetastore_update_partition_column_statistics_result result; @@ -26117,8 +26608,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26130,8 +26621,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26140,21 +26631,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); } } void ThriftHiveMetastoreProcessor::process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_column_statistics", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_column_statistics"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } ThriftHiveMetastore_get_table_column_statistics_args args; @@ -26162,8 +26653,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); } ThriftHiveMetastore_get_table_column_statistics_result result; @@ -26183,8 +26674,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26196,8 +26687,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26206,21 +26697,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_column_statistics", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_column_statistics"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } ThriftHiveMetastore_get_partition_column_statistics_args args; @@ -26228,8 +26719,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); } ThriftHiveMetastore_get_partition_column_statistics_result result; @@ -26249,8 +26740,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26262,8 +26753,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26272,21 +26763,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); } } void ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.delete_partition_column_statistics", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } ThriftHiveMetastore_delete_partition_column_statistics_args args; @@ -26294,8 +26785,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); } ThriftHiveMetastore_delete_partition_column_statistics_result result; @@ -26315,8 +26806,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26328,8 +26819,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26338,21 +26829,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); } } void ThriftHiveMetastoreProcessor::process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.delete_table_column_statistics", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_table_column_statistics"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } ThriftHiveMetastore_delete_table_column_statistics_args args; @@ -26360,8 +26851,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); } ThriftHiveMetastore_delete_table_column_statistics_result result; @@ -26381,8 +26872,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26394,8 +26885,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26404,21 +26895,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); } } void ThriftHiveMetastoreProcessor::process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_role"); } ThriftHiveMetastore_create_role_args args; @@ -26426,8 +26917,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_role", bytes); } ThriftHiveMetastore_create_role_result result; @@ -26438,8 +26929,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26451,8 +26942,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_role"); } oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26461,21 +26952,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_role", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_role"); } ThriftHiveMetastore_drop_role_args args; @@ -26483,8 +26974,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_role", bytes); } ThriftHiveMetastore_drop_role_result result; @@ -26495,8 +26986,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26508,8 +26999,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_role"); } oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26518,21 +27009,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_role", bytes); } } void ThriftHiveMetastoreProcessor::process_get_role_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_role_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_role_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_names"); } ThriftHiveMetastore_get_role_names_args args; @@ -26540,8 +27031,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_names", bytes); } ThriftHiveMetastore_get_role_names_result result; @@ -26552,8 +27043,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26565,8 +27056,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_names"); } oprot->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26575,21 +27066,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_role_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_role_names", bytes); } } void ThriftHiveMetastoreProcessor::process_grant_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.grant_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_role"); } ThriftHiveMetastore_grant_role_args args; @@ -26597,8 +27088,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_role", bytes); } ThriftHiveMetastore_grant_role_result result; @@ -26609,8 +27100,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26622,8 +27113,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_role"); } oprot->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26632,21 +27123,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_role", bytes); } } void ThriftHiveMetastoreProcessor::process_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.revoke_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_role"); } ThriftHiveMetastore_revoke_role_args args; @@ -26654,8 +27145,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_role", bytes); } ThriftHiveMetastore_revoke_role_result result; @@ -26666,8 +27157,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26679,8 +27170,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_role"); } oprot->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26689,21 +27180,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_role", bytes); } } void ThriftHiveMetastoreProcessor::process_list_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.list_roles", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_roles", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.list_roles"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_roles"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_roles"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_roles"); } ThriftHiveMetastore_list_roles_args args; @@ -26711,8 +27202,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_roles", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_roles", bytes); } ThriftHiveMetastore_list_roles_result result; @@ -26723,8 +27214,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_roles"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_roles"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26736,8 +27227,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_roles"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_roles"); } oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26746,21 +27237,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_roles", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_roles", bytes); } } void ThriftHiveMetastoreProcessor::process_get_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_privilege_set", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_privilege_set", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_privilege_set"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_privilege_set"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_privilege_set"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_privilege_set"); } ThriftHiveMetastore_get_privilege_set_args args; @@ -26768,8 +27259,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); } ThriftHiveMetastore_get_privilege_set_result result; @@ -26780,8 +27271,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_privilege_set"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_privilege_set"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26793,8 +27284,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_privilege_set"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_privilege_set"); } oprot->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26803,21 +27294,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); } } void ThriftHiveMetastoreProcessor::process_list_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.list_privileges", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_privileges", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.list_privileges"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_privileges"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_privileges"); } ThriftHiveMetastore_list_privileges_args args; @@ -26825,8 +27316,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_privileges", bytes); } ThriftHiveMetastore_list_privileges_result result; @@ -26837,8 +27328,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_privileges"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26850,8 +27341,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_privileges"); } oprot->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26860,21 +27351,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_privileges", bytes); } } void ThriftHiveMetastoreProcessor::process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.grant_privileges", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_privileges", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_privileges"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_privileges"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_privileges"); } ThriftHiveMetastore_grant_privileges_args args; @@ -26882,8 +27373,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_privileges", bytes); } ThriftHiveMetastore_grant_privileges_result result; @@ -26894,8 +27385,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_privileges"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26907,8 +27398,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_privileges"); } oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26917,21 +27408,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_privileges", bytes); } } void ThriftHiveMetastoreProcessor::process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.revoke_privileges", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_privileges", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_privileges"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_privileges"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_privileges"); } ThriftHiveMetastore_revoke_privileges_args args; @@ -26939,8 +27430,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); } ThriftHiveMetastore_revoke_privileges_result result; @@ -26951,8 +27442,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_privileges"); } ::apache::thrift::TApplicationException x(e.what()); @@ -26964,8 +27455,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_privileges"); } oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); @@ -26974,21 +27465,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); } } void ThriftHiveMetastoreProcessor::process_set_ugi(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.set_ugi", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.set_ugi", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.set_ugi"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.set_ugi"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_ugi"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_ugi"); } ThriftHiveMetastore_set_ugi_args args; @@ -26996,8 +27487,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_ugi", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_ugi", bytes); } ThriftHiveMetastore_set_ugi_result result; @@ -27008,8 +27499,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_ugi"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_ugi"); } ::apache::thrift::TApplicationException x(e.what()); @@ -27021,8 +27512,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_ugi"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_ugi"); } oprot->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_REPLY, seqid); @@ -27031,21 +27522,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.set_ugi", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.set_ugi", bytes); } } void ThriftHiveMetastoreProcessor::process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_delegation_token", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_delegation_token", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_delegation_token"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_delegation_token"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_delegation_token"); } ThriftHiveMetastore_get_delegation_token_args args; @@ -27053,8 +27544,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); } ThriftHiveMetastore_get_delegation_token_result result; @@ -27065,8 +27556,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_delegation_token"); } ::apache::thrift::TApplicationException x(e.what()); @@ -27078,8 +27569,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_delegation_token"); } oprot->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); @@ -27088,21 +27579,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); } } void ThriftHiveMetastoreProcessor::process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.renew_delegation_token", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.renew_delegation_token", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.renew_delegation_token"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.renew_delegation_token"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.renew_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.renew_delegation_token"); } ThriftHiveMetastore_renew_delegation_token_args args; @@ -27110,8 +27601,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); } ThriftHiveMetastore_renew_delegation_token_result result; @@ -27122,8 +27613,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.renew_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.renew_delegation_token"); } ::apache::thrift::TApplicationException x(e.what()); @@ -27135,8 +27626,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.renew_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.renew_delegation_token"); } oprot->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); @@ -27145,21 +27636,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); } } void ThriftHiveMetastoreProcessor::process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.cancel_delegation_token", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cancel_delegation_token", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.cancel_delegation_token"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cancel_delegation_token"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cancel_delegation_token"); } ThriftHiveMetastore_cancel_delegation_token_args args; @@ -27167,8 +27658,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); } ThriftHiveMetastore_cancel_delegation_token_result result; @@ -27178,8 +27669,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cancel_delegation_token"); } ::apache::thrift::TApplicationException x(e.what()); @@ -27191,8 +27682,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token"); } oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); @@ -27201,10 +27692,16 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); } } +::boost::shared_ptr< ::apache::thrift::TProcessor > ThriftHiveMetastoreProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ThriftHiveMetastoreIfFactory > cleanup(handlerFactory_); + ::boost::shared_ptr< ThriftHiveMetastoreIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new ThriftHiveMetastoreProcessor(handler)); + return processor; +} }}} // namespace Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (revision 1406838) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_metastore_types.h" +#include + namespace Apache { namespace Hadoop { namespace Hive { int _kHiveObjectTypeValues[] = { @@ -97,17 +100,27 @@ uint32_t Version::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Version"); + xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->version); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->comments); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Version &a, Version &b) { + using ::std::swap; + swap(a.version, b.version); + swap(a.comments, b.comments); + swap(a.__isset, b.__isset); +} + const char* FieldSchema::ascii_fingerprint = "AB879940BD15B6B25691265F7384B271"; const uint8_t FieldSchema::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; @@ -170,20 +183,32 @@ uint32_t FieldSchema::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("FieldSchema"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("comment", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->comment); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(FieldSchema &a, FieldSchema &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.type, b.type); + swap(a.comment, b.comment); + swap(a.__isset, b.__isset); +} + const char* Type::ascii_fingerprint = "20DF02DE523C27F7066C7BD4D9120842"; const uint8_t Type::binary_fingerprint[16] = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42}; @@ -237,14 +262,14 @@ this->fields.clear(); uint32_t _size0; ::apache::thrift::protocol::TType _etype3; - iprot->readListBegin(_etype3, _size0); + xfer += iprot->readListBegin(_etype3, _size0); this->fields.resize(_size0); uint32_t _i4; for (_i4 = 0; _i4 < _size0; ++_i4) { xfer += this->fields[_i4].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.fields = true; } else { @@ -266,9 +291,11 @@ uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Type"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + if (this->__isset.type1) { xfer += oprot->writeFieldBegin("type1", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->type1); @@ -297,6 +324,15 @@ return xfer; } +void swap(Type &a, Type &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.type1, b.type1); + swap(a.type2, b.type2); + swap(a.fields, b.fields); + swap(a.__isset, b.__isset); +} + const char* HiveObjectRef::ascii_fingerprint = "205CD8311CF3AA9EC161BAEF8D7C933C"; const uint8_t HiveObjectRef::binary_fingerprint[16] = {0x20,0x5C,0xD8,0x31,0x1C,0xF3,0xAA,0x9E,0xC1,0x61,0xBA,0xEF,0x8D,0x7C,0x93,0x3C}; @@ -352,14 +388,14 @@ this->partValues.clear(); uint32_t _size7; ::apache::thrift::protocol::TType _etype10; - iprot->readListBegin(_etype10, _size7); + xfer += iprot->readListBegin(_etype10, _size7); this->partValues.resize(_size7); uint32_t _i11; for (_i11 = 0; _i11 < _size7; ++_i11) { xfer += iprot->readString(this->partValues[_i11]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.partValues = true; } else { @@ -389,15 +425,19 @@ uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveObjectRef"); + xfer += oprot->writeFieldBegin("objectType", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->objectType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("objectName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->objectName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partValues", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partValues.size())); @@ -409,14 +449,26 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnName", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString(this->columnName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveObjectRef &a, HiveObjectRef &b) { + using ::std::swap; + swap(a.objectType, b.objectType); + swap(a.dbName, b.dbName); + swap(a.objectName, b.objectName); + swap(a.partValues, b.partValues); + swap(a.columnName, b.columnName); + swap(a.__isset, b.__isset); +} + const char* PrivilegeGrantInfo::ascii_fingerprint = "A58923AF7294BE492D6F90E07E8CEE1F"; const uint8_t PrivilegeGrantInfo::binary_fingerprint[16] = {0xA5,0x89,0x23,0xAF,0x72,0x94,0xBE,0x49,0x2D,0x6F,0x90,0xE0,0x7E,0x8C,0xEE,0x1F}; @@ -497,26 +549,42 @@ uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("PrivilegeGrantInfo"); + xfer += oprot->writeFieldBegin("privilege", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->privilege); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->grantor); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->grantorType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 5); xfer += oprot->writeBool(this->grantOption); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b) { + using ::std::swap; + swap(a.privilege, b.privilege); + swap(a.createTime, b.createTime); + swap(a.grantor, b.grantor); + swap(a.grantorType, b.grantorType); + swap(a.grantOption, b.grantOption); + swap(a.__isset, b.__isset); +} + const char* HiveObjectPrivilege::ascii_fingerprint = "83D71969B23BD853E29DBA9D43B29AF8"; const uint8_t HiveObjectPrivilege::binary_fingerprint[16] = {0x83,0xD7,0x19,0x69,0xB2,0x3B,0xD8,0x53,0xE2,0x9D,0xBA,0x9D,0x43,0xB2,0x9A,0xF8}; @@ -589,23 +657,37 @@ uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveObjectPrivilege"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->hiveObject.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->principalName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->principalType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantInfo", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->grantInfo.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b) { + using ::std::swap; + swap(a.hiveObject, b.hiveObject); + swap(a.principalName, b.principalName); + swap(a.principalType, b.principalType); + swap(a.grantInfo, b.grantInfo); + swap(a.__isset, b.__isset); +} + const char* PrivilegeBag::ascii_fingerprint = "BB89E4701B7B709B046A74C90B1147F2"; const uint8_t PrivilegeBag::binary_fingerprint[16] = {0xBB,0x89,0xE4,0x70,0x1B,0x7B,0x70,0x9B,0x04,0x6A,0x74,0xC9,0x0B,0x11,0x47,0xF2}; @@ -635,14 +717,14 @@ this->privileges.clear(); uint32_t _size15; ::apache::thrift::protocol::TType _etype18; - iprot->readListBegin(_etype18, _size15); + xfer += iprot->readListBegin(_etype18, _size15); this->privileges.resize(_size15); uint32_t _i19; for (_i19 = 0; _i19 < _size15; ++_i19) { xfer += this->privileges[_i19].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.privileges = true; } else { @@ -664,6 +746,7 @@ uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("PrivilegeBag"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->privileges.size())); @@ -675,11 +758,18 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(PrivilegeBag &a, PrivilegeBag &b) { + using ::std::swap; + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* PrincipalPrivilegeSet::ascii_fingerprint = "08F75D2533906EA87BE34EA640856683"; const uint8_t PrincipalPrivilegeSet::binary_fingerprint[16] = {0x08,0xF7,0x5D,0x25,0x33,0x90,0x6E,0xA8,0x7B,0xE3,0x4E,0xA6,0x40,0x85,0x66,0x83}; @@ -710,7 +800,7 @@ uint32_t _size21; ::apache::thrift::protocol::TType _ktype22; ::apache::thrift::protocol::TType _vtype23; - iprot->readMapBegin(_ktype22, _vtype23, _size21); + xfer += iprot->readMapBegin(_ktype22, _vtype23, _size21); uint32_t _i25; for (_i25 = 0; _i25 < _size21; ++_i25) { @@ -721,17 +811,17 @@ _val27.clear(); uint32_t _size28; ::apache::thrift::protocol::TType _etype31; - iprot->readListBegin(_etype31, _size28); + xfer += iprot->readListBegin(_etype31, _size28); _val27.resize(_size28); uint32_t _i32; for (_i32 = 0; _i32 < _size28; ++_i32) { xfer += _val27[_i32].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.userPrivileges = true; } else { @@ -745,7 +835,7 @@ uint32_t _size33; ::apache::thrift::protocol::TType _ktype34; ::apache::thrift::protocol::TType _vtype35; - iprot->readMapBegin(_ktype34, _vtype35, _size33); + xfer += iprot->readMapBegin(_ktype34, _vtype35, _size33); uint32_t _i37; for (_i37 = 0; _i37 < _size33; ++_i37) { @@ -756,17 +846,17 @@ _val39.clear(); uint32_t _size40; ::apache::thrift::protocol::TType _etype43; - iprot->readListBegin(_etype43, _size40); + xfer += iprot->readListBegin(_etype43, _size40); _val39.resize(_size40); uint32_t _i44; for (_i44 = 0; _i44 < _size40; ++_i44) { xfer += _val39[_i44].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.groupPrivileges = true; } else { @@ -780,7 +870,7 @@ uint32_t _size45; ::apache::thrift::protocol::TType _ktype46; ::apache::thrift::protocol::TType _vtype47; - iprot->readMapBegin(_ktype46, _vtype47, _size45); + xfer += iprot->readMapBegin(_ktype46, _vtype47, _size45); uint32_t _i49; for (_i49 = 0; _i49 < _size45; ++_i49) { @@ -791,17 +881,17 @@ _val51.clear(); uint32_t _size52; ::apache::thrift::protocol::TType _etype55; - iprot->readListBegin(_etype55, _size52); + xfer += iprot->readListBegin(_etype55, _size52); _val51.resize(_size52); uint32_t _i56; for (_i56 = 0; _i56 < _size52; ++_i56) { xfer += _val51[_i56].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.rolePrivileges = true; } else { @@ -823,6 +913,7 @@ uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("PrincipalPrivilegeSet"); + xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->userPrivileges.size())); @@ -843,6 +934,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("groupPrivileges", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->groupPrivileges.size())); @@ -863,6 +955,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rolePrivileges", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->rolePrivileges.size())); @@ -883,11 +976,20 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b) { + using ::std::swap; + swap(a.userPrivileges, b.userPrivileges); + swap(a.groupPrivileges, b.groupPrivileges); + swap(a.rolePrivileges, b.rolePrivileges); + swap(a.__isset, b.__isset); +} + const char* Role::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; const uint8_t Role::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; @@ -950,20 +1052,32 @@ uint32_t Role::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Role"); + xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->roleName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->ownerName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Role &a, Role &b) { + using ::std::swap; + swap(a.roleName, b.roleName); + swap(a.createTime, b.createTime); + swap(a.ownerName, b.ownerName); + swap(a.__isset, b.__isset); +} + const char* Database::ascii_fingerprint = "213967572143E49C9F1A23F7A866E2F5"; const uint8_t Database::binary_fingerprint[16] = {0x21,0x39,0x67,0x57,0x21,0x43,0xE4,0x9C,0x9F,0x1A,0x23,0xF7,0xA8,0x66,0xE2,0xF5}; @@ -1018,7 +1132,7 @@ uint32_t _size63; ::apache::thrift::protocol::TType _ktype64; ::apache::thrift::protocol::TType _vtype65; - iprot->readMapBegin(_ktype64, _vtype65, _size63); + xfer += iprot->readMapBegin(_ktype64, _vtype65, _size63); uint32_t _i67; for (_i67 = 0; _i67 < _size63; ++_i67) { @@ -1027,7 +1141,7 @@ std::string& _val69 = this->parameters[_key68]; xfer += iprot->readString(_val69); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1057,15 +1171,19 @@ uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Database"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->description); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("locationUri", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->locationUri); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1078,6 +1196,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->privileges.write(oprot); @@ -1088,6 +1207,16 @@ return xfer; } +void swap(Database &a, Database &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.description, b.description); + swap(a.locationUri, b.locationUri); + swap(a.parameters, b.parameters); + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* SerDeInfo::ascii_fingerprint = "B1021C32A35A2AEFCD2F57A5424159A7"; const uint8_t SerDeInfo::binary_fingerprint[16] = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; @@ -1134,7 +1263,7 @@ uint32_t _size71; ::apache::thrift::protocol::TType _ktype72; ::apache::thrift::protocol::TType _vtype73; - iprot->readMapBegin(_ktype72, _vtype73, _size71); + xfer += iprot->readMapBegin(_ktype72, _vtype73, _size71); uint32_t _i75; for (_i75 = 0; _i75 < _size71; ++_i75) { @@ -1143,7 +1272,7 @@ std::string& _val77 = this->parameters[_key76]; xfer += iprot->readString(_val77); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1165,12 +1294,15 @@ uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("SerDeInfo"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("serializationLib", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->serializationLib); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1183,11 +1315,20 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(SerDeInfo &a, SerDeInfo &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.serializationLib, b.serializationLib); + swap(a.parameters, b.parameters); + swap(a.__isset, b.__isset); +} + const char* Order::ascii_fingerprint = "EEBC915CE44901401D881E6091423036"; const uint8_t Order::binary_fingerprint[16] = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36}; @@ -1242,17 +1383,27 @@ uint32_t Order::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Order"); + xfer += oprot->writeFieldBegin("col", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->col); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("order", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->order); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Order &a, Order &b) { + using ::std::swap; + swap(a.col, b.col); + swap(a.order, b.order); + swap(a.__isset, b.__isset); +} + const char* SkewedInfo::ascii_fingerprint = "4BF2ED84BC3C3EB297A2AE2FA8427EB1"; const uint8_t SkewedInfo::binary_fingerprint[16] = {0x4B,0xF2,0xED,0x84,0xBC,0x3C,0x3E,0xB2,0x97,0xA2,0xAE,0x2F,0xA8,0x42,0x7E,0xB1}; @@ -1282,14 +1433,14 @@ this->skewedColNames.clear(); uint32_t _size79; ::apache::thrift::protocol::TType _etype82; - iprot->readListBegin(_etype82, _size79); + xfer += iprot->readListBegin(_etype82, _size79); this->skewedColNames.resize(_size79); uint32_t _i83; for (_i83 = 0; _i83 < _size79; ++_i83) { xfer += iprot->readString(this->skewedColNames[_i83]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.skewedColNames = true; } else { @@ -1302,7 +1453,7 @@ this->skewedColValues.clear(); uint32_t _size84; ::apache::thrift::protocol::TType _etype87; - iprot->readListBegin(_etype87, _size84); + xfer += iprot->readListBegin(_etype87, _size84); this->skewedColValues.resize(_size84); uint32_t _i88; for (_i88 = 0; _i88 < _size84; ++_i88) @@ -1311,17 +1462,17 @@ this->skewedColValues[_i88].clear(); uint32_t _size89; ::apache::thrift::protocol::TType _etype92; - iprot->readListBegin(_etype92, _size89); + xfer += iprot->readListBegin(_etype92, _size89); this->skewedColValues[_i88].resize(_size89); uint32_t _i93; for (_i93 = 0; _i93 < _size89; ++_i93) { xfer += iprot->readString(this->skewedColValues[_i88][_i93]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.skewedColValues = true; } else { @@ -1335,7 +1486,7 @@ uint32_t _size94; ::apache::thrift::protocol::TType _ktype95; ::apache::thrift::protocol::TType _vtype96; - iprot->readMapBegin(_ktype95, _vtype96, _size94); + xfer += iprot->readMapBegin(_ktype95, _vtype96, _size94); uint32_t _i98; for (_i98 = 0; _i98 < _size94; ++_i98) { @@ -1344,19 +1495,19 @@ _key99.clear(); uint32_t _size101; ::apache::thrift::protocol::TType _etype104; - iprot->readListBegin(_etype104, _size101); + xfer += iprot->readListBegin(_etype104, _size101); _key99.resize(_size101); uint32_t _i105; for (_i105 = 0; _i105 < _size101; ++_i105) { xfer += iprot->readString(_key99[_i105]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } std::string& _val100 = this->skewedColValueLocationMaps[_key99]; xfer += iprot->readString(_val100); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.skewedColValueLocationMaps = true; } else { @@ -1378,6 +1529,7 @@ uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("SkewedInfo"); + xfer += oprot->writeFieldBegin("skewedColNames", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->skewedColNames.size())); @@ -1389,6 +1541,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("skewedColValues", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->skewedColValues.size())); @@ -1408,6 +1561,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("skewedColValueLocationMaps", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_LIST, ::apache::thrift::protocol::T_STRING, static_cast(this->skewedColValueLocationMaps.size())); @@ -1428,11 +1582,20 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(SkewedInfo &a, SkewedInfo &b) { + using ::std::swap; + swap(a.skewedColNames, b.skewedColNames); + swap(a.skewedColValues, b.skewedColValues); + swap(a.skewedColValueLocationMaps, b.skewedColValueLocationMaps); + swap(a.__isset, b.__isset); +} + const char* StorageDescriptor::ascii_fingerprint = "BDC4DB93B74677CE1C04198D60E6CB80"; const uint8_t StorageDescriptor::binary_fingerprint[16] = {0xBD,0xC4,0xDB,0x93,0xB7,0x46,0x77,0xCE,0x1C,0x04,0x19,0x8D,0x60,0xE6,0xCB,0x80}; @@ -1462,14 +1625,14 @@ this->cols.clear(); uint32_t _size111; ::apache::thrift::protocol::TType _etype114; - iprot->readListBegin(_etype114, _size111); + xfer += iprot->readListBegin(_etype114, _size111); this->cols.resize(_size111); uint32_t _i115; for (_i115 = 0; _i115 < _size111; ++_i115) { xfer += this->cols[_i115].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.cols = true; } else { @@ -1530,14 +1693,14 @@ this->bucketCols.clear(); uint32_t _size116; ::apache::thrift::protocol::TType _etype119; - iprot->readListBegin(_etype119, _size116); + xfer += iprot->readListBegin(_etype119, _size116); this->bucketCols.resize(_size116); uint32_t _i120; for (_i120 = 0; _i120 < _size116; ++_i120) { xfer += iprot->readString(this->bucketCols[_i120]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.bucketCols = true; } else { @@ -1550,14 +1713,14 @@ this->sortCols.clear(); uint32_t _size121; ::apache::thrift::protocol::TType _etype124; - iprot->readListBegin(_etype124, _size121); + xfer += iprot->readListBegin(_etype124, _size121); this->sortCols.resize(_size121); uint32_t _i125; for (_i125 = 0; _i125 < _size121; ++_i125) { xfer += this->sortCols[_i125].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.sortCols = true; } else { @@ -1571,7 +1734,7 @@ uint32_t _size126; ::apache::thrift::protocol::TType _ktype127; ::apache::thrift::protocol::TType _vtype128; - iprot->readMapBegin(_ktype127, _vtype128, _size126); + xfer += iprot->readMapBegin(_ktype127, _vtype128, _size126); uint32_t _i130; for (_i130 = 0; _i130 < _size126; ++_i130) { @@ -1580,7 +1743,7 @@ std::string& _val132 = this->parameters[_key131]; xfer += iprot->readString(_val132); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1610,6 +1773,7 @@ uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("StorageDescriptor"); + xfer += oprot->writeFieldBegin("cols", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->cols.size())); @@ -1621,24 +1785,31 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("location", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->location); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("inputFormat", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->inputFormat); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("outputFormat", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->outputFormat); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("compressed", ::apache::thrift::protocol::T_BOOL, 5); xfer += oprot->writeBool(this->compressed); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numBuckets", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->numBuckets); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("serdeInfo", ::apache::thrift::protocol::T_STRUCT, 7); xfer += this->serdeInfo.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->bucketCols.size())); @@ -1650,6 +1821,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->sortCols.size())); @@ -1661,6 +1833,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 10); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1673,6 +1846,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.skewedInfo) { xfer += oprot->writeFieldBegin("skewedInfo", ::apache::thrift::protocol::T_STRUCT, 11); xfer += this->skewedInfo.write(oprot); @@ -1683,6 +1857,22 @@ return xfer; } +void swap(StorageDescriptor &a, StorageDescriptor &b) { + using ::std::swap; + swap(a.cols, b.cols); + swap(a.location, b.location); + swap(a.inputFormat, b.inputFormat); + swap(a.outputFormat, b.outputFormat); + swap(a.compressed, b.compressed); + swap(a.numBuckets, b.numBuckets); + swap(a.serdeInfo, b.serdeInfo); + swap(a.bucketCols, b.bucketCols); + swap(a.sortCols, b.sortCols); + swap(a.parameters, b.parameters); + swap(a.skewedInfo, b.skewedInfo); + swap(a.__isset, b.__isset); +} + const char* Table::ascii_fingerprint = "F21F7F0ACA98ECCFC83F6605440D007F"; const uint8_t Table::binary_fingerprint[16] = {0xF2,0x1F,0x7F,0x0A,0xCA,0x98,0xEC,0xCF,0xC8,0x3F,0x66,0x05,0x44,0x0D,0x00,0x7F}; @@ -1768,14 +1958,14 @@ this->partitionKeys.clear(); uint32_t _size137; ::apache::thrift::protocol::TType _etype140; - iprot->readListBegin(_etype140, _size137); + xfer += iprot->readListBegin(_etype140, _size137); this->partitionKeys.resize(_size137); uint32_t _i141; for (_i141 = 0; _i141 < _size137; ++_i141) { xfer += this->partitionKeys[_i141].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.partitionKeys = true; } else { @@ -1789,7 +1979,7 @@ uint32_t _size142; ::apache::thrift::protocol::TType _ktype143; ::apache::thrift::protocol::TType _vtype144; - iprot->readMapBegin(_ktype143, _vtype144, _size142); + xfer += iprot->readMapBegin(_ktype143, _vtype144, _size142); uint32_t _i146; for (_i146 = 0; _i146 < _size142; ++_i146) { @@ -1798,7 +1988,7 @@ std::string& _val148 = this->parameters[_key147]; xfer += iprot->readString(_val148); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1852,27 +2042,35 @@ uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Table"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->tableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->owner); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("retention", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->retention); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 7); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitionKeys.size())); @@ -1884,6 +2082,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1896,15 +2095,19 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("viewOriginalText", ::apache::thrift::protocol::T_STRING, 10); xfer += oprot->writeString(this->viewOriginalText); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("viewExpandedText", ::apache::thrift::protocol::T_STRING, 11); xfer += oprot->writeString(this->viewExpandedText); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 12); xfer += oprot->writeString(this->tableType); xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 13); xfer += this->privileges.write(oprot); @@ -1915,6 +2118,24 @@ return xfer; } +void swap(Table &a, Table &b) { + using ::std::swap; + swap(a.tableName, b.tableName); + swap(a.dbName, b.dbName); + swap(a.owner, b.owner); + swap(a.createTime, b.createTime); + swap(a.lastAccessTime, b.lastAccessTime); + swap(a.retention, b.retention); + swap(a.sd, b.sd); + swap(a.partitionKeys, b.partitionKeys); + swap(a.parameters, b.parameters); + swap(a.viewOriginalText, b.viewOriginalText); + swap(a.viewExpandedText, b.viewExpandedText); + swap(a.tableType, b.tableType); + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* Partition::ascii_fingerprint = "E5EF1F030CF964C052658DD22257D025"; const uint8_t Partition::binary_fingerprint[16] = {0xE5,0xEF,0x1F,0x03,0x0C,0xF9,0x64,0xC0,0x52,0x65,0x8D,0xD2,0x22,0x57,0xD0,0x25}; @@ -1944,14 +2165,14 @@ this->values.clear(); uint32_t _size151; ::apache::thrift::protocol::TType _etype154; - iprot->readListBegin(_etype154, _size151); + xfer += iprot->readListBegin(_etype154, _size151); this->values.resize(_size151); uint32_t _i155; for (_i155 = 0; _i155 < _size151; ++_i155) { xfer += iprot->readString(this->values[_i155]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.values = true; } else { @@ -2005,7 +2226,7 @@ uint32_t _size156; ::apache::thrift::protocol::TType _ktype157; ::apache::thrift::protocol::TType _vtype158; - iprot->readMapBegin(_ktype157, _vtype158, _size156); + xfer += iprot->readMapBegin(_ktype157, _vtype158, _size156); uint32_t _i160; for (_i160 = 0; _i160 < _size156; ++_i160) { @@ -2014,7 +2235,7 @@ std::string& _val162 = this->parameters[_key161]; xfer += iprot->readString(_val162); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -2044,6 +2265,7 @@ uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Partition"); + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); @@ -2055,21 +2277,27 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->tableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 6); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 7); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -2082,6 +2310,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 8); xfer += this->privileges.write(oprot); @@ -2092,6 +2321,19 @@ return xfer; } +void swap(Partition &a, Partition &b) { + using ::std::swap; + swap(a.values, b.values); + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.createTime, b.createTime); + swap(a.lastAccessTime, b.lastAccessTime); + swap(a.sd, b.sd); + swap(a.parameters, b.parameters); + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* Index::ascii_fingerprint = "BA1090E838C806A4F8D8D137C5085EDD"; const uint8_t Index::binary_fingerprint[16] = {0xBA,0x10,0x90,0xE8,0x38,0xC8,0x06,0xA4,0xF8,0xD8,0xD1,0x37,0xC5,0x08,0x5E,0xDD}; @@ -2186,7 +2428,7 @@ uint32_t _size165; ::apache::thrift::protocol::TType _ktype166; ::apache::thrift::protocol::TType _vtype167; - iprot->readMapBegin(_ktype166, _vtype167, _size165); + xfer += iprot->readMapBegin(_ktype166, _vtype167, _size165); uint32_t _i169; for (_i169 = 0; _i169 < _size165; ++_i169) { @@ -2195,7 +2437,7 @@ std::string& _val171 = this->parameters[_key170]; xfer += iprot->readString(_val171); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -2225,30 +2467,39 @@ uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Index"); + xfer += oprot->writeFieldBegin("indexName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->indexName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("indexHandlerClass", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->indexHandlerClass); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("origTableName", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->origTableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("indexTableName", ::apache::thrift::protocol::T_STRING, 7); xfer += oprot->writeString(this->indexTableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 8); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -2261,14 +2512,31 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deferredRebuild", ::apache::thrift::protocol::T_BOOL, 10); xfer += oprot->writeBool(this->deferredRebuild); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Index &a, Index &b) { + using ::std::swap; + swap(a.indexName, b.indexName); + swap(a.indexHandlerClass, b.indexHandlerClass); + swap(a.dbName, b.dbName); + swap(a.origTableName, b.origTableName); + swap(a.createTime, b.createTime); + swap(a.lastAccessTime, b.lastAccessTime); + swap(a.indexTableName, b.indexTableName); + swap(a.sd, b.sd); + swap(a.parameters, b.parameters); + swap(a.deferredRebuild, b.deferredRebuild); + swap(a.__isset, b.__isset); +} + const char* BooleanColumnStatsData::ascii_fingerprint = "EA2D65F1E0BB78760205682082304B41"; const uint8_t BooleanColumnStatsData::binary_fingerprint[16] = {0xEA,0x2D,0x65,0xF1,0xE0,0xBB,0x78,0x76,0x02,0x05,0x68,0x20,0x82,0x30,0x4B,0x41}; @@ -2340,20 +2608,31 @@ uint32_t BooleanColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("BooleanColumnStatsData"); + xfer += oprot->writeFieldBegin("numTrues", ::apache::thrift::protocol::T_I64, 1); xfer += oprot->writeI64(this->numTrues); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numFalses", ::apache::thrift::protocol::T_I64, 2); xfer += oprot->writeI64(this->numFalses); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->numNulls); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(BooleanColumnStatsData &a, BooleanColumnStatsData &b) { + using ::std::swap; + swap(a.numTrues, b.numTrues); + swap(a.numFalses, b.numFalses); + swap(a.numNulls, b.numNulls); +} + const char* DoubleColumnStatsData::ascii_fingerprint = "97F958CB0709C3B109A57EEE01946C13"; const uint8_t DoubleColumnStatsData::binary_fingerprint[16] = {0x97,0xF9,0x58,0xCB,0x07,0x09,0xC3,0xB1,0x09,0xA5,0x7E,0xEE,0x01,0x94,0x6C,0x13}; @@ -2436,23 +2715,36 @@ uint32_t DoubleColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("DoubleColumnStatsData"); + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_DOUBLE, 1); xfer += oprot->writeDouble(this->lowValue); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_DOUBLE, 2); xfer += oprot->writeDouble(this->highValue); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->numNulls); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); xfer += oprot->writeI64(this->numDVs); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(DoubleColumnStatsData &a, DoubleColumnStatsData &b) { + using ::std::swap; + swap(a.lowValue, b.lowValue); + swap(a.highValue, b.highValue); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); +} + const char* LongColumnStatsData::ascii_fingerprint = "66C8E6F97F0275919D86FEB536251B17"; const uint8_t LongColumnStatsData::binary_fingerprint[16] = {0x66,0xC8,0xE6,0xF9,0x7F,0x02,0x75,0x91,0x9D,0x86,0xFE,0xB5,0x36,0x25,0x1B,0x17}; @@ -2535,23 +2827,36 @@ uint32_t LongColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("LongColumnStatsData"); + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_I64, 1); xfer += oprot->writeI64(this->lowValue); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_I64, 2); xfer += oprot->writeI64(this->highValue); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->numNulls); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); xfer += oprot->writeI64(this->numDVs); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(LongColumnStatsData &a, LongColumnStatsData &b) { + using ::std::swap; + swap(a.lowValue, b.lowValue); + swap(a.highValue, b.highValue); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); +} + const char* StringColumnStatsData::ascii_fingerprint = "D017B08C3DF12C3AB98788B2E67DAAB3"; const uint8_t StringColumnStatsData::binary_fingerprint[16] = {0xD0,0x17,0xB0,0x8C,0x3D,0xF1,0x2C,0x3A,0xB9,0x87,0x88,0xB2,0xE6,0x7D,0xAA,0xB3}; @@ -2634,23 +2939,36 @@ uint32_t StringColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("StringColumnStatsData"); + xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); xfer += oprot->writeI64(this->maxColLen); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); xfer += oprot->writeDouble(this->avgColLen); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->numNulls); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); xfer += oprot->writeI64(this->numDVs); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(StringColumnStatsData &a, StringColumnStatsData &b) { + using ::std::swap; + swap(a.maxColLen, b.maxColLen); + swap(a.avgColLen, b.avgColLen); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); +} + const char* BinaryColumnStatsData::ascii_fingerprint = "22B0CB67183FCDB945892B9974518D06"; const uint8_t BinaryColumnStatsData::binary_fingerprint[16] = {0x22,0xB0,0xCB,0x67,0x18,0x3F,0xCD,0xB9,0x45,0x89,0x2B,0x99,0x74,0x51,0x8D,0x06}; @@ -2722,20 +3040,31 @@ uint32_t BinaryColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("BinaryColumnStatsData"); + xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); xfer += oprot->writeI64(this->maxColLen); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); xfer += oprot->writeDouble(this->avgColLen); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->numNulls); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(BinaryColumnStatsData &a, BinaryColumnStatsData &b) { + using ::std::swap; + swap(a.maxColLen, b.maxColLen); + swap(a.avgColLen, b.avgColLen); + swap(a.numNulls, b.numNulls); +} + const char* ColumnStatisticsData::ascii_fingerprint = "3D106F26C0761EF37E58CAFAA3F1651C"; const uint8_t ColumnStatisticsData::binary_fingerprint[16] = {0x3D,0x10,0x6F,0x26,0xC0,0x76,0x1E,0xF3,0x7E,0x58,0xCA,0xFA,0xA3,0xF1,0x65,0x1C}; @@ -2814,26 +3143,42 @@ uint32_t ColumnStatisticsData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ColumnStatisticsData"); + xfer += oprot->writeFieldBegin("booleanStats", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->booleanStats.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("longStats", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->longStats.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("doubleStats", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->doubleStats.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stringStats", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->stringStats.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("binaryStats", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->binaryStats.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(ColumnStatisticsData &a, ColumnStatisticsData &b) { + using ::std::swap; + swap(a.booleanStats, b.booleanStats); + swap(a.longStats, b.longStats); + swap(a.doubleStats, b.doubleStats); + swap(a.stringStats, b.stringStats); + swap(a.binaryStats, b.binaryStats); + swap(a.__isset, b.__isset); +} + const char* ColumnStatisticsObj::ascii_fingerprint = "DEE09584C51BCAF60824FE4509B59567"; const uint8_t ColumnStatisticsObj::binary_fingerprint[16] = {0xDE,0xE0,0x95,0x84,0xC5,0x1B,0xCA,0xF6,0x08,0x24,0xFE,0x45,0x09,0xB5,0x95,0x67}; @@ -2905,20 +3250,31 @@ uint32_t ColumnStatisticsObj::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ColumnStatisticsObj"); + xfer += oprot->writeFieldBegin("colName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->colName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("colType", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->colType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("statsData", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->statsData.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b) { + using ::std::swap; + swap(a.colName, b.colName); + swap(a.colType, b.colType); + swap(a.statsData, b.statsData); +} + const char* ColumnStatisticsDesc::ascii_fingerprint = "261759FF6F8FAB53F941453007FE18CB"; const uint8_t ColumnStatisticsDesc::binary_fingerprint[16] = {0x26,0x17,0x59,0xFF,0x6F,0x8F,0xAB,0x53,0xF9,0x41,0x45,0x30,0x07,0xFE,0x18,0xCB}; @@ -3006,15 +3362,19 @@ uint32_t ColumnStatisticsDesc::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ColumnStatisticsDesc"); + xfer += oprot->writeFieldBegin("isTblLevel", ::apache::thrift::protocol::T_BOOL, 1); xfer += oprot->writeBool(this->isTblLevel); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->tableName); xfer += oprot->writeFieldEnd(); + if (this->__isset.partName) { xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->partName); @@ -3030,6 +3390,16 @@ return xfer; } +void swap(ColumnStatisticsDesc &a, ColumnStatisticsDesc &b) { + using ::std::swap; + swap(a.isTblLevel, b.isTblLevel); + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.partName, b.partName); + swap(a.lastAnalyzed, b.lastAnalyzed); + swap(a.__isset, b.__isset); +} + const char* ColumnStatistics::ascii_fingerprint = "681BDBD0CBB53373AC1C9C0C2E26BEAB"; const uint8_t ColumnStatistics::binary_fingerprint[16] = {0x68,0x1B,0xDB,0xD0,0xCB,0xB5,0x33,0x73,0xAC,0x1C,0x9C,0x0C,0x2E,0x26,0xBE,0xAB}; @@ -3069,14 +3439,14 @@ this->statsObj.clear(); uint32_t _size173; ::apache::thrift::protocol::TType _etype176; - iprot->readListBegin(_etype176, _size173); + xfer += iprot->readListBegin(_etype176, _size173); this->statsObj.resize(_size173); uint32_t _i177; for (_i177 = 0; _i177 < _size173; ++_i177) { xfer += this->statsObj[_i177].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } isset_statsObj = true; } else { @@ -3102,9 +3472,11 @@ uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ColumnStatistics"); + xfer += oprot->writeFieldBegin("statsDesc", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->statsDesc.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("statsObj", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->statsObj.size())); @@ -3116,11 +3488,18 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(ColumnStatistics &a, ColumnStatistics &b) { + using ::std::swap; + swap(a.statsDesc, b.statsDesc); + swap(a.statsObj, b.statsObj); +} + const char* Schema::ascii_fingerprint = "5CFEE46C975F4E2368D905109B8E3B5B"; const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; @@ -3150,14 +3529,14 @@ this->fieldSchemas.clear(); uint32_t _size179; ::apache::thrift::protocol::TType _etype182; - iprot->readListBegin(_etype182, _size179); + xfer += iprot->readListBegin(_etype182, _size179); this->fieldSchemas.resize(_size179); uint32_t _i183; for (_i183 = 0; _i183 < _size179; ++_i183) { xfer += this->fieldSchemas[_i183].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.fieldSchemas = true; } else { @@ -3171,7 +3550,7 @@ uint32_t _size184; ::apache::thrift::protocol::TType _ktype185; ::apache::thrift::protocol::TType _vtype186; - iprot->readMapBegin(_ktype185, _vtype186, _size184); + xfer += iprot->readMapBegin(_ktype185, _vtype186, _size184); uint32_t _i188; for (_i188 = 0; _i188 < _size184; ++_i188) { @@ -3180,7 +3559,7 @@ std::string& _val190 = this->properties[_key189]; xfer += iprot->readString(_val190); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.properties = true; } else { @@ -3202,6 +3581,7 @@ uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Schema"); + xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fieldSchemas.size())); @@ -3213,6 +3593,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); @@ -3225,11 +3606,19 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Schema &a, Schema &b) { + using ::std::swap; + swap(a.fieldSchemas, b.fieldSchemas); + swap(a.properties, b.properties); + swap(a.__isset, b.__isset); +} + const char* EnvironmentContext::ascii_fingerprint = "5EA2D527ECA3BA20C77AFC023EE8C05F"; const uint8_t EnvironmentContext::binary_fingerprint[16] = {0x5E,0xA2,0xD5,0x27,0xEC,0xA3,0xBA,0x20,0xC7,0x7A,0xFC,0x02,0x3E,0xE8,0xC0,0x5F}; @@ -3260,7 +3649,7 @@ uint32_t _size193; ::apache::thrift::protocol::TType _ktype194; ::apache::thrift::protocol::TType _vtype195; - iprot->readMapBegin(_ktype194, _vtype195, _size193); + xfer += iprot->readMapBegin(_ktype194, _vtype195, _size193); uint32_t _i197; for (_i197 = 0; _i197 < _size193; ++_i197) { @@ -3269,7 +3658,7 @@ std::string& _val199 = this->properties[_key198]; xfer += iprot->readString(_val199); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.properties = true; } else { @@ -3291,6 +3680,7 @@ uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("EnvironmentContext"); + xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); @@ -3303,11 +3693,18 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(EnvironmentContext &a, EnvironmentContext &b) { + using ::std::swap; + swap(a.properties, b.properties); + swap(a.__isset, b.__isset); +} + const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3354,14 +3751,22 @@ uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("MetaException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(MetaException &a, MetaException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* UnknownTableException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownTableException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3408,14 +3813,22 @@ uint32_t UnknownTableException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownTableException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(UnknownTableException &a, UnknownTableException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* UnknownDBException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownDBException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3462,14 +3875,22 @@ uint32_t UnknownDBException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownDBException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(UnknownDBException &a, UnknownDBException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* AlreadyExistsException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t AlreadyExistsException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3516,14 +3937,22 @@ uint32_t AlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("AlreadyExistsException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(AlreadyExistsException &a, AlreadyExistsException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* InvalidPartitionException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidPartitionException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3570,14 +3999,22 @@ uint32_t InvalidPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidPartitionException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(InvalidPartitionException &a, InvalidPartitionException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* UnknownPartitionException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownPartitionException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3624,14 +4061,22 @@ uint32_t UnknownPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownPartitionException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(UnknownPartitionException &a, UnknownPartitionException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* InvalidObjectException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidObjectException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3678,14 +4123,22 @@ uint32_t InvalidObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidObjectException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(InvalidObjectException &a, InvalidObjectException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* NoSuchObjectException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t NoSuchObjectException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3732,14 +4185,22 @@ uint32_t NoSuchObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("NoSuchObjectException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(NoSuchObjectException &a, NoSuchObjectException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* IndexAlreadyExistsException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t IndexAlreadyExistsException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3786,14 +4247,22 @@ uint32_t IndexAlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("IndexAlreadyExistsException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* InvalidOperationException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidOperationException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3840,14 +4309,22 @@ uint32_t InvalidOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidOperationException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(InvalidOperationException &a, InvalidOperationException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* ConfigValSecurityException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t ConfigValSecurityException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3894,14 +4371,22 @@ uint32_t ConfigValSecurityException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ConfigValSecurityException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* InvalidInputException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidInputException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3948,12 +4433,20 @@ uint32_t InvalidInputException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidInputException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(InvalidInputException &a, InvalidInputException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + }}} // namespace Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (revision 1406838) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -1,18 +1,19 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef ThriftHiveMetastore_H #define ThriftHiveMetastore_H -#include +#include #include "hive_metastore_types.h" #include "FacebookService.h" namespace Apache { namespace Hadoop { namespace Hive { -class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf { +class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookServiceIf { public: virtual ~ThriftHiveMetastoreIf() {} virtual void create_database(const Database& database) = 0; @@ -92,8 +93,32 @@ virtual void cancel_delegation_token(const std::string& token_str_form) = 0; }; -class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull { +class ThriftHiveMetastoreIfFactory : virtual public ::facebook::fb303::FacebookServiceIfFactory { public: + typedef ThriftHiveMetastoreIf Handler; + + virtual ~ThriftHiveMetastoreIfFactory() {} + + virtual ThriftHiveMetastoreIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) = 0; +}; + +class ThriftHiveMetastoreIfSingletonFactory : virtual public ThriftHiveMetastoreIfFactory { + public: + ThriftHiveMetastoreIfSingletonFactory(const boost::shared_ptr& iface) : iface_(iface) {} + virtual ~ThriftHiveMetastoreIfSingletonFactory() {} + + virtual ThriftHiveMetastoreIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) {} + + protected: + boost::shared_ptr iface_; +}; + +class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public ::facebook::fb303::FacebookServiceNull { + public: virtual ~ThriftHiveMetastoreNull() {} void create_database(const Database& /* database */) { return; @@ -476,7 +501,7 @@ class ThriftHiveMetastore_get_database_args { public: - ThriftHiveMetastore_get_database_args() : name("") { + ThriftHiveMetastore_get_database_args() : name() { } virtual ~ThriftHiveMetastore_get_database_args() throw() {} @@ -606,7 +631,7 @@ class ThriftHiveMetastore_drop_database_args { public: - ThriftHiveMetastore_drop_database_args() : name(""), deleteData(0), cascade(0) { + ThriftHiveMetastore_drop_database_args() : name(), deleteData(0), cascade(0) { } virtual ~ThriftHiveMetastore_drop_database_args() throw() {} @@ -750,7 +775,7 @@ class ThriftHiveMetastore_get_databases_args { public: - ThriftHiveMetastore_get_databases_args() : pattern("") { + ThriftHiveMetastore_get_databases_args() : pattern() { } virtual ~ThriftHiveMetastore_get_databases_args() throw() {} @@ -973,7 +998,7 @@ class ThriftHiveMetastore_alter_database_args { public: - ThriftHiveMetastore_alter_database_args() : dbname("") { + ThriftHiveMetastore_alter_database_args() : dbname() { } virtual ~ThriftHiveMetastore_alter_database_args() throw() {} @@ -1099,7 +1124,7 @@ class ThriftHiveMetastore_get_type_args { public: - ThriftHiveMetastore_get_type_args() : name("") { + ThriftHiveMetastore_get_type_args() : name() { } virtual ~ThriftHiveMetastore_get_type_args() throw() {} @@ -1365,7 +1390,7 @@ class ThriftHiveMetastore_drop_type_args { public: - ThriftHiveMetastore_drop_type_args() : type("") { + ThriftHiveMetastore_drop_type_args() : type() { } virtual ~ThriftHiveMetastore_drop_type_args() throw() {} @@ -1493,7 +1518,7 @@ class ThriftHiveMetastore_get_type_all_args { public: - ThriftHiveMetastore_get_type_all_args() : name("") { + ThriftHiveMetastore_get_type_all_args() : name() { } virtual ~ThriftHiveMetastore_get_type_all_args() throw() {} @@ -1612,7 +1637,7 @@ class ThriftHiveMetastore_get_fields_args { public: - ThriftHiveMetastore_get_fields_args() : db_name(""), table_name("") { + ThriftHiveMetastore_get_fields_args() : db_name(), table_name() { } virtual ~ThriftHiveMetastore_get_fields_args() throw() {} @@ -1759,7 +1784,7 @@ class ThriftHiveMetastore_get_schema_args { public: - ThriftHiveMetastore_get_schema_args() : db_name(""), table_name("") { + ThriftHiveMetastore_get_schema_args() : db_name(), table_name() { } virtual ~ThriftHiveMetastore_get_schema_args() throw() {} @@ -2192,7 +2217,7 @@ class ThriftHiveMetastore_drop_table_args { public: - ThriftHiveMetastore_drop_table_args() : dbname(""), name(""), deleteData(0) { + ThriftHiveMetastore_drop_table_args() : dbname(), name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_table_args() throw() {} @@ -2327,7 +2352,7 @@ class ThriftHiveMetastore_get_tables_args { public: - ThriftHiveMetastore_get_tables_args() : db_name(""), pattern("") { + ThriftHiveMetastore_get_tables_args() : db_name(), pattern() { } virtual ~ThriftHiveMetastore_get_tables_args() throw() {} @@ -2453,7 +2478,7 @@ class ThriftHiveMetastore_get_all_tables_args { public: - ThriftHiveMetastore_get_all_tables_args() : db_name("") { + ThriftHiveMetastore_get_all_tables_args() : db_name() { } virtual ~ThriftHiveMetastore_get_all_tables_args() throw() {} @@ -2572,7 +2597,7 @@ class ThriftHiveMetastore_get_table_args { public: - ThriftHiveMetastore_get_table_args() : dbname(""), tbl_name("") { + ThriftHiveMetastore_get_table_args() : dbname(), tbl_name() { } virtual ~ThriftHiveMetastore_get_table_args() throw() {} @@ -2709,7 +2734,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { public: - ThriftHiveMetastore_get_table_objects_by_name_args() : dbname("") { + ThriftHiveMetastore_get_table_objects_by_name_args() : dbname() { } virtual ~ThriftHiveMetastore_get_table_objects_by_name_args() throw() {} @@ -2848,7 +2873,7 @@ }; 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) {} + _ThriftHiveMetastore_get_table_names_by_filter_args__isset() : dbname(false), filter(false), max_tables(true) {} bool dbname; bool filter; bool max_tables; @@ -2857,7 +2882,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { public: - ThriftHiveMetastore_get_table_names_by_filter_args() : dbname(""), filter(""), max_tables(-1) { + ThriftHiveMetastore_get_table_names_by_filter_args() : dbname(), filter(), max_tables(-1) { } virtual ~ThriftHiveMetastore_get_table_names_by_filter_args() throw() {} @@ -3013,7 +3038,7 @@ class ThriftHiveMetastore_alter_table_args { public: - ThriftHiveMetastore_alter_table_args() : dbname(""), tbl_name("") { + ThriftHiveMetastore_alter_table_args() : dbname(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_table_args() throw() {} @@ -3150,7 +3175,7 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { public: - ThriftHiveMetastore_alter_table_with_environment_context_args() : dbname(""), tbl_name("") { + ThriftHiveMetastore_alter_table_with_environment_context_args() : dbname(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_table_with_environment_context_args() throw() {} @@ -3717,7 +3742,7 @@ class ThriftHiveMetastore_append_partition_args { public: - ThriftHiveMetastore_append_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_append_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_append_partition_args() throw() {} @@ -3873,7 +3898,7 @@ class ThriftHiveMetastore_append_partition_by_name_args { public: - ThriftHiveMetastore_append_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { + ThriftHiveMetastore_append_partition_by_name_args() : db_name(), tbl_name(), part_name() { } virtual ~ThriftHiveMetastore_append_partition_by_name_args() throw() {} @@ -4030,7 +4055,7 @@ class ThriftHiveMetastore_drop_partition_args { public: - ThriftHiveMetastore_drop_partition_args() : db_name(""), tbl_name(""), deleteData(0) { + ThriftHiveMetastore_drop_partition_args() : db_name(), tbl_name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_partition_args() throw() {} @@ -4185,7 +4210,7 @@ class ThriftHiveMetastore_drop_partition_by_name_args { public: - ThriftHiveMetastore_drop_partition_by_name_args() : db_name(""), tbl_name(""), part_name(""), deleteData(0) { + ThriftHiveMetastore_drop_partition_by_name_args() : db_name(), tbl_name(), part_name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_partition_by_name_args() throw() {} @@ -4339,7 +4364,7 @@ class ThriftHiveMetastore_get_partition_args { public: - ThriftHiveMetastore_get_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_get_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_get_partition_args() throw() {} @@ -4487,7 +4512,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { public: - ThriftHiveMetastore_get_partition_with_auth_args() : db_name(""), tbl_name(""), user_name("") { + ThriftHiveMetastore_get_partition_with_auth_args() : db_name(), tbl_name(), user_name() { } virtual ~ThriftHiveMetastore_get_partition_with_auth_args() throw() {} @@ -4649,7 +4674,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { public: - ThriftHiveMetastore_get_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { + ThriftHiveMetastore_get_partition_by_name_args() : db_name(), tbl_name(), part_name() { } virtual ~ThriftHiveMetastore_get_partition_by_name_args() throw() {} @@ -4786,7 +4811,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_args__isset { - _ThriftHiveMetastore_get_partitions_args__isset() : db_name(false), tbl_name(false), max_parts(false) {} + _ThriftHiveMetastore_get_partitions_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} bool db_name; bool tbl_name; bool max_parts; @@ -4795,7 +4820,7 @@ class ThriftHiveMetastore_get_partitions_args { public: - ThriftHiveMetastore_get_partitions_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partitions_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partitions_args() throw() {} @@ -4932,7 +4957,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_with_auth_args__isset { - _ThriftHiveMetastore_get_partitions_with_auth_args__isset() : db_name(false), tbl_name(false), max_parts(false), user_name(false), group_names(false) {} + _ThriftHiveMetastore_get_partitions_with_auth_args__isset() : db_name(false), tbl_name(false), max_parts(true), user_name(false), group_names(false) {} bool db_name; bool tbl_name; bool max_parts; @@ -4943,7 +4968,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { public: - ThriftHiveMetastore_get_partitions_with_auth_args() : db_name(""), tbl_name(""), max_parts(-1), user_name("") { + ThriftHiveMetastore_get_partitions_with_auth_args() : db_name(), tbl_name(), max_parts(-1), user_name() { } virtual ~ThriftHiveMetastore_get_partitions_with_auth_args() throw() {} @@ -5096,7 +5121,7 @@ }; typedef struct _ThriftHiveMetastore_get_partition_names_args__isset { - _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(false) {} + _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} bool db_name; bool tbl_name; bool max_parts; @@ -5105,7 +5130,7 @@ class ThriftHiveMetastore_get_partition_names_args { public: - ThriftHiveMetastore_get_partition_names_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partition_names_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partition_names_args() throw() {} @@ -5232,7 +5257,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_ps_args__isset { - _ThriftHiveMetastore_get_partitions_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + _ThriftHiveMetastore_get_partitions_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(true) {} bool db_name; bool tbl_name; bool part_vals; @@ -5242,7 +5267,7 @@ class ThriftHiveMetastore_get_partitions_ps_args { public: - ThriftHiveMetastore_get_partitions_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partitions_ps_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partitions_ps_args() throw() {} @@ -5387,7 +5412,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset { - _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false), user_name(false), group_names(false) {} + _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(true), user_name(false), group_names(false) {} bool db_name; bool tbl_name; bool part_vals; @@ -5399,7 +5424,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { public: - ThriftHiveMetastore_get_partitions_ps_with_auth_args() : db_name(""), tbl_name(""), max_parts(-1), user_name("") { + ThriftHiveMetastore_get_partitions_ps_with_auth_args() : db_name(), tbl_name(), max_parts(-1), user_name() { } virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_args() throw() {} @@ -5560,7 +5585,7 @@ }; typedef struct _ThriftHiveMetastore_get_partition_names_ps_args__isset { - _ThriftHiveMetastore_get_partition_names_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + _ThriftHiveMetastore_get_partition_names_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(true) {} bool db_name; bool tbl_name; bool part_vals; @@ -5570,7 +5595,7 @@ class ThriftHiveMetastore_get_partition_names_ps_args { public: - ThriftHiveMetastore_get_partition_names_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partition_names_ps_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw() {} @@ -5715,7 +5740,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_by_filter_args__isset { - _ThriftHiveMetastore_get_partitions_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false), max_parts(false) {} + _ThriftHiveMetastore_get_partitions_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false), max_parts(true) {} bool db_name; bool tbl_name; bool filter; @@ -5725,7 +5750,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { public: - ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(""), tbl_name(""), filter(""), max_parts(-1) { + ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(), tbl_name(), filter(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partitions_by_filter_args() throw() {} @@ -5879,7 +5904,7 @@ class ThriftHiveMetastore_get_partitions_by_names_args { public: - ThriftHiveMetastore_get_partitions_by_names_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_get_partitions_by_names_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_get_partitions_by_names_args() throw() {} @@ -6025,7 +6050,7 @@ class ThriftHiveMetastore_alter_partition_args { public: - ThriftHiveMetastore_alter_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_alter_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_partition_args() throw() {} @@ -6161,7 +6186,7 @@ class ThriftHiveMetastore_alter_partitions_args { public: - ThriftHiveMetastore_alter_partitions_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_alter_partitions_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_partitions_args() throw() {} @@ -6298,7 +6323,7 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { public: - ThriftHiveMetastore_alter_partition_with_environment_context_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_alter_partition_with_environment_context_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_args() throw() {} @@ -6443,7 +6468,7 @@ class ThriftHiveMetastore_rename_partition_args { public: - ThriftHiveMetastore_rename_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_rename_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_rename_partition_args() throw() {} @@ -6586,7 +6611,7 @@ class ThriftHiveMetastore_get_config_value_args { public: - ThriftHiveMetastore_get_config_value_args() : name(""), defaultValue("") { + ThriftHiveMetastore_get_config_value_args() : name(), defaultValue() { } virtual ~ThriftHiveMetastore_get_config_value_args() throw() {} @@ -6646,7 +6671,7 @@ class ThriftHiveMetastore_get_config_value_result { public: - ThriftHiveMetastore_get_config_value_result() : success("") { + ThriftHiveMetastore_get_config_value_result() : success() { } virtual ~ThriftHiveMetastore_get_config_value_result() throw() {} @@ -6712,7 +6737,7 @@ class ThriftHiveMetastore_partition_name_to_vals_args { public: - ThriftHiveMetastore_partition_name_to_vals_args() : part_name("") { + ThriftHiveMetastore_partition_name_to_vals_args() : part_name() { } virtual ~ThriftHiveMetastore_partition_name_to_vals_args() throw() {} @@ -6830,7 +6855,7 @@ class ThriftHiveMetastore_partition_name_to_spec_args { public: - ThriftHiveMetastore_partition_name_to_spec_args() : part_name("") { + ThriftHiveMetastore_partition_name_to_spec_args() : part_name() { } virtual ~ThriftHiveMetastore_partition_name_to_spec_args() throw() {} @@ -6951,7 +6976,7 @@ class ThriftHiveMetastore_markPartitionForEvent_args { public: - ThriftHiveMetastore_markPartitionForEvent_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_markPartitionForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { } virtual ~ThriftHiveMetastore_markPartitionForEvent_args() throw() {} @@ -7136,7 +7161,7 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { public: - ThriftHiveMetastore_isPartitionMarkedForEvent_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_isPartitionMarkedForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { } virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_args() throw() {} @@ -7478,7 +7503,7 @@ class ThriftHiveMetastore_alter_index_args { public: - ThriftHiveMetastore_alter_index_args() : dbname(""), base_tbl_name(""), idx_name("") { + ThriftHiveMetastore_alter_index_args() : dbname(), base_tbl_name(), idx_name() { } virtual ~ThriftHiveMetastore_alter_index_args() throw() {} @@ -7623,7 +7648,7 @@ class ThriftHiveMetastore_drop_index_by_name_args { public: - ThriftHiveMetastore_drop_index_by_name_args() : db_name(""), tbl_name(""), index_name(""), deleteData(0) { + ThriftHiveMetastore_drop_index_by_name_args() : db_name(), tbl_name(), index_name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_index_by_name_args() throw() {} @@ -7777,7 +7802,7 @@ class ThriftHiveMetastore_get_index_by_name_args { public: - ThriftHiveMetastore_get_index_by_name_args() : db_name(""), tbl_name(""), index_name("") { + ThriftHiveMetastore_get_index_by_name_args() : db_name(), tbl_name(), index_name() { } virtual ~ThriftHiveMetastore_get_index_by_name_args() throw() {} @@ -7914,7 +7939,7 @@ }; typedef struct _ThriftHiveMetastore_get_indexes_args__isset { - _ThriftHiveMetastore_get_indexes_args__isset() : db_name(false), tbl_name(false), max_indexes(false) {} + _ThriftHiveMetastore_get_indexes_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} bool db_name; bool tbl_name; bool max_indexes; @@ -7923,7 +7948,7 @@ class ThriftHiveMetastore_get_indexes_args { public: - ThriftHiveMetastore_get_indexes_args() : db_name(""), tbl_name(""), max_indexes(-1) { + ThriftHiveMetastore_get_indexes_args() : db_name(), tbl_name(), max_indexes(-1) { } virtual ~ThriftHiveMetastore_get_indexes_args() throw() {} @@ -8060,7 +8085,7 @@ }; typedef struct _ThriftHiveMetastore_get_index_names_args__isset { - _ThriftHiveMetastore_get_index_names_args__isset() : db_name(false), tbl_name(false), max_indexes(false) {} + _ThriftHiveMetastore_get_index_names_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} bool db_name; bool tbl_name; bool max_indexes; @@ -8069,7 +8094,7 @@ class ThriftHiveMetastore_get_index_names_args { public: - ThriftHiveMetastore_get_index_names_args() : db_name(""), tbl_name(""), max_indexes(-1) { + ThriftHiveMetastore_get_index_names_args() : db_name(), tbl_name(), max_indexes(-1) { } virtual ~ThriftHiveMetastore_get_index_names_args() throw() {} @@ -8501,7 +8526,7 @@ class ThriftHiveMetastore_get_table_column_statistics_args { public: - ThriftHiveMetastore_get_table_column_statistics_args() : db_name(""), tbl_name(""), col_name("") { + ThriftHiveMetastore_get_table_column_statistics_args() : db_name(), tbl_name(), col_name() { } virtual ~ThriftHiveMetastore_get_table_column_statistics_args() throw() {} @@ -8668,7 +8693,7 @@ class ThriftHiveMetastore_get_partition_column_statistics_args { public: - ThriftHiveMetastore_get_partition_column_statistics_args() : db_name(""), tbl_name(""), part_name(""), col_name("") { + ThriftHiveMetastore_get_partition_column_statistics_args() : db_name(), tbl_name(), part_name(), col_name() { } virtual ~ThriftHiveMetastore_get_partition_column_statistics_args() throw() {} @@ -8843,7 +8868,7 @@ class ThriftHiveMetastore_delete_partition_column_statistics_args { public: - ThriftHiveMetastore_delete_partition_column_statistics_args() : db_name(""), tbl_name(""), part_name(""), col_name("") { + ThriftHiveMetastore_delete_partition_column_statistics_args() : db_name(), tbl_name(), part_name(), col_name() { } virtual ~ThriftHiveMetastore_delete_partition_column_statistics_args() throw() {} @@ -9017,7 +9042,7 @@ class ThriftHiveMetastore_delete_table_column_statistics_args { public: - ThriftHiveMetastore_delete_table_column_statistics_args() : db_name(""), tbl_name(""), col_name("") { + ThriftHiveMetastore_delete_table_column_statistics_args() : db_name(), tbl_name(), col_name() { } virtual ~ThriftHiveMetastore_delete_table_column_statistics_args() throw() {} @@ -9299,7 +9324,7 @@ class ThriftHiveMetastore_drop_role_args { public: - ThriftHiveMetastore_drop_role_args() : role_name("") { + ThriftHiveMetastore_drop_role_args() : role_name() { } virtual ~ThriftHiveMetastore_drop_role_args() throw() {} @@ -9526,7 +9551,7 @@ class ThriftHiveMetastore_grant_role_args { public: - ThriftHiveMetastore_grant_role_args() : role_name(""), principal_name(""), grantor(""), grant_option(0) { + ThriftHiveMetastore_grant_role_args() : role_name(), principal_name(), principal_type((PrincipalType::type)0), grantor(), grantorType((PrincipalType::type)0), grant_option(0) { } virtual ~ThriftHiveMetastore_grant_role_args() throw() {} @@ -9686,7 +9711,7 @@ class ThriftHiveMetastore_revoke_role_args { public: - ThriftHiveMetastore_revoke_role_args() : role_name(""), principal_name("") { + ThriftHiveMetastore_revoke_role_args() : role_name(), principal_name(), principal_type((PrincipalType::type)0) { } virtual ~ThriftHiveMetastore_revoke_role_args() throw() {} @@ -9821,7 +9846,7 @@ class ThriftHiveMetastore_list_roles_args { public: - ThriftHiveMetastore_list_roles_args() : principal_name("") { + ThriftHiveMetastore_list_roles_args() : principal_name(), principal_type((PrincipalType::type)0) { } virtual ~ThriftHiveMetastore_list_roles_args() throw() {} @@ -9949,7 +9974,7 @@ class ThriftHiveMetastore_get_privilege_set_args { public: - ThriftHiveMetastore_get_privilege_set_args() : user_name("") { + ThriftHiveMetastore_get_privilege_set_args() : user_name() { } virtual ~ThriftHiveMetastore_get_privilege_set_args() throw() {} @@ -10085,7 +10110,7 @@ class ThriftHiveMetastore_list_privileges_args { public: - ThriftHiveMetastore_list_privileges_args() : principal_name("") { + ThriftHiveMetastore_list_privileges_args() : principal_name(), principal_type((PrincipalType::type)0) { } virtual ~ThriftHiveMetastore_list_privileges_args() throw() {} @@ -10456,7 +10481,7 @@ class ThriftHiveMetastore_set_ugi_args { public: - ThriftHiveMetastore_set_ugi_args() : user_name("") { + ThriftHiveMetastore_set_ugi_args() : user_name() { } virtual ~ThriftHiveMetastore_set_ugi_args() throw() {} @@ -10583,7 +10608,7 @@ class ThriftHiveMetastore_get_delegation_token_args { public: - ThriftHiveMetastore_get_delegation_token_args() : token_owner(""), renewer_kerberos_principal_name("") { + ThriftHiveMetastore_get_delegation_token_args() : token_owner(), renewer_kerberos_principal_name() { } virtual ~ThriftHiveMetastore_get_delegation_token_args() throw() {} @@ -10643,7 +10668,7 @@ class ThriftHiveMetastore_get_delegation_token_result { public: - ThriftHiveMetastore_get_delegation_token_result() : success("") { + ThriftHiveMetastore_get_delegation_token_result() : success() { } virtual ~ThriftHiveMetastore_get_delegation_token_result() throw() {} @@ -10709,7 +10734,7 @@ class ThriftHiveMetastore_renew_delegation_token_args { public: - ThriftHiveMetastore_renew_delegation_token_args() : token_str_form("") { + ThriftHiveMetastore_renew_delegation_token_args() : token_str_form() { } virtual ~ThriftHiveMetastore_renew_delegation_token_args() throw() {} @@ -10827,7 +10852,7 @@ class ThriftHiveMetastore_cancel_delegation_token_args { public: - ThriftHiveMetastore_cancel_delegation_token_args() : token_str_form("") { + ThriftHiveMetastore_cancel_delegation_token_args() : token_str_form() { } virtual ~ThriftHiveMetastore_cancel_delegation_token_args() throw() {} @@ -10927,12 +10952,12 @@ }; -class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { +class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceClient { public: ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : - facebook::fb303::FacebookServiceClient(prot, prot) {} + ::facebook::fb303::FacebookServiceClient(prot, prot) {} ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : - facebook::fb303::FacebookServiceClient(iprot, oprot) {} + ::facebook::fb303::FacebookServiceClient(iprot, oprot) {} boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } @@ -11166,12 +11191,14 @@ void recv_cancel_delegation_token(); }; -class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { +class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceProcessor { protected: boost::shared_ptr iface_; - virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext); + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); private: - std::map processMap_; + typedef void (ThriftHiveMetastoreProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; void process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -11249,7 +11276,7 @@ void process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); public: ThriftHiveMetastoreProcessor(boost::shared_ptr iface) : - facebook::fb303::FacebookServiceProcessor(iface), + ::facebook::fb303::FacebookServiceProcessor(iface), iface_(iface) { processMap_["create_database"] = &ThriftHiveMetastoreProcessor::process_create_database; processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database; @@ -11328,16 +11355,26 @@ processMap_["cancel_delegation_token"] = &ThriftHiveMetastoreProcessor::process_cancel_delegation_token; } - virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext); virtual ~ThriftHiveMetastoreProcessor() {} }; -class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceMultiface { +class ThriftHiveMetastoreProcessorFactory : public ::apache::thrift::TProcessorFactory { public: + ThriftHiveMetastoreProcessorFactory(const ::boost::shared_ptr< ThriftHiveMetastoreIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + ::boost::shared_ptr< ThriftHiveMetastoreIfFactory > handlerFactory_; +}; + +class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceMultiface { + public: ThriftHiveMetastoreMultiface(std::vector >& ifaces) : ifaces_(ifaces) { std::vector >::iterator iter; for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { - facebook::fb303::FacebookServiceMultiface::add(*iter); + ::facebook::fb303::FacebookServiceMultiface::add(*iter); } } virtual ~ThriftHiveMetastoreMultiface() {} @@ -11345,815 +11382,725 @@ std::vector > ifaces_; ThriftHiveMetastoreMultiface() {} void add(boost::shared_ptr iface) { - facebook::fb303::FacebookServiceMultiface::add(iface); + ::facebook::fb303::FacebookServiceMultiface::add(iface); ifaces_.push_back(iface); } public: void create_database(const Database& database) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->create_database(database); } + ifaces_[i]->create_database(database); } void get_database(Database& _return, const std::string& name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_database(_return, name); - return; - } else { - ifaces_[i]->get_database(_return, name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_database(_return, name); } + ifaces_[i]->get_database(_return, name); + return; } void drop_database(const std::string& name, const bool deleteData, const bool cascade) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->drop_database(name, deleteData, cascade); } + ifaces_[i]->drop_database(name, deleteData, cascade); } void get_databases(std::vector & _return, const std::string& pattern) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_databases(_return, pattern); - return; - } else { - ifaces_[i]->get_databases(_return, pattern); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_databases(_return, pattern); } + ifaces_[i]->get_databases(_return, pattern); + return; } void get_all_databases(std::vector & _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_all_databases(_return); - return; - } else { - ifaces_[i]->get_all_databases(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_all_databases(_return); } + ifaces_[i]->get_all_databases(_return); + return; } void alter_database(const std::string& dbname, const Database& db) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_database(dbname, db); } + ifaces_[i]->alter_database(dbname, db); } void get_type(Type& _return, const std::string& name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_type(_return, name); - return; - } else { - ifaces_[i]->get_type(_return, name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_type(_return, name); } + ifaces_[i]->get_type(_return, name); + return; } bool create_type(const Type& type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->create_type(type); - } else { - ifaces_[i]->create_type(type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_type(type); } + return ifaces_[i]->create_type(type); } bool drop_type(const std::string& type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_type(type); - } else { - ifaces_[i]->drop_type(type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_type(type); } + return ifaces_[i]->drop_type(type); } void get_type_all(std::map & _return, const std::string& name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_type_all(_return, name); - return; - } else { - ifaces_[i]->get_type_all(_return, name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_type_all(_return, name); } + ifaces_[i]->get_type_all(_return, name); + return; } void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_fields(_return, db_name, table_name); - return; - } else { - ifaces_[i]->get_fields(_return, db_name, table_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_fields(_return, db_name, table_name); } + ifaces_[i]->get_fields(_return, db_name, table_name); + return; } void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_schema(_return, db_name, table_name); - return; - } else { - ifaces_[i]->get_schema(_return, db_name, table_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_schema(_return, db_name, table_name); } + ifaces_[i]->get_schema(_return, db_name, table_name); + return; } void create_table(const Table& tbl) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->create_table(tbl); } + ifaces_[i]->create_table(tbl); } void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->create_table_with_environment_context(tbl, environment_context); } + ifaces_[i]->create_table_with_environment_context(tbl, environment_context); } void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->drop_table(dbname, name, deleteData); } + ifaces_[i]->drop_table(dbname, name, deleteData); } void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_tables(_return, db_name, pattern); - return; - } else { - ifaces_[i]->get_tables(_return, db_name, pattern); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_tables(_return, db_name, pattern); } + ifaces_[i]->get_tables(_return, db_name, pattern); + return; } void get_all_tables(std::vector & _return, const std::string& db_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_all_tables(_return, db_name); - return; - } else { - ifaces_[i]->get_all_tables(_return, db_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_all_tables(_return, db_name); } + ifaces_[i]->get_all_tables(_return, db_name); + return; } void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_table(_return, dbname, tbl_name); - return; - } else { - ifaces_[i]->get_table(_return, dbname, tbl_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table(_return, dbname, tbl_name); } + ifaces_[i]->get_table(_return, dbname, tbl_name); + return; } void get_table_objects_by_name(std::vector & _return, const std::string& dbname, const std::vector & tbl_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_table_objects_by_name(_return, dbname, tbl_names); - return; - } else { - ifaces_[i]->get_table_objects_by_name(_return, dbname, tbl_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_objects_by_name(_return, dbname, tbl_names); } + ifaces_[i]->get_table_objects_by_name(_return, dbname, 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) { size_t sz = ifaces_.size(); - for (size_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); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); } + ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); + return; } void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_table(dbname, tbl_name, new_tbl); } + ifaces_[i]->alter_table(dbname, tbl_name, new_tbl); } void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); } + ifaces_[i]->alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); } void add_partition(Partition& _return, const Partition& new_part) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_partition(_return, new_part); - return; - } else { - ifaces_[i]->add_partition(_return, new_part); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partition(_return, new_part); } + ifaces_[i]->add_partition(_return, new_part); + return; } void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); - return; - } else { - ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); } + ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); + return; } int32_t add_partitions(const std::vector & new_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->add_partitions(new_parts); - } else { - ifaces_[i]->add_partitions(new_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partitions(new_parts); } + return ifaces_[i]->add_partitions(new_parts); } void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); - return; - } else { - ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); } + ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); + return; } void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); - return; - } else { - ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); } + ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); + return; } bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); - } else { - ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); } + return ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); } bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - } else { - ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); } + return ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); } void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); - return; - } else { - ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); } + ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); + return; } void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); - return; - } else { - ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); } + ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); + return; } void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); - return; - } else { - ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); } + ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); + return; } void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); - return; - } else { - ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); } + ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); + return; } void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); - return; - } else { - ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); } + ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); + return; } void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); - return; - } else { - ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); } + ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); + return; } void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); - return; - } else { - ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); } + ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); + return; } void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); - return; - } else { - ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); } + ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); + return; } void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); - return; - } else { - ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); } + ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); + return; } void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); - return; - } else { - ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); } + ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); + return; } void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); - return; - } else { - ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); } + ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); + return; } void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_partition(db_name, tbl_name, new_part); } + ifaces_[i]->alter_partition(db_name, tbl_name, new_part); } void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_partitions(db_name, tbl_name, new_parts); } + ifaces_[i]->alter_partitions(db_name, tbl_name, new_parts); } void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); } + ifaces_[i]->alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); } void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->rename_partition(db_name, tbl_name, part_vals, new_part); } + ifaces_[i]->rename_partition(db_name, tbl_name, part_vals, new_part); } void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_config_value(_return, name, defaultValue); - return; - } else { - ifaces_[i]->get_config_value(_return, name, defaultValue); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_config_value(_return, name, defaultValue); } + ifaces_[i]->get_config_value(_return, name, defaultValue); + return; } void partition_name_to_vals(std::vector & _return, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->partition_name_to_vals(_return, part_name); - return; - } else { - ifaces_[i]->partition_name_to_vals(_return, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->partition_name_to_vals(_return, part_name); } + ifaces_[i]->partition_name_to_vals(_return, part_name); + return; } void partition_name_to_spec(std::map & _return, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->partition_name_to_spec(_return, part_name); - return; - } else { - ifaces_[i]->partition_name_to_spec(_return, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->partition_name_to_spec(_return, part_name); } + ifaces_[i]->partition_name_to_spec(_return, part_name); + return; } void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->markPartitionForEvent(db_name, tbl_name, part_vals, eventType); } + ifaces_[i]->markPartitionForEvent(db_name, tbl_name, part_vals, eventType); } bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - } else { - ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); } + return ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); } void add_index(Index& _return, const Index& new_index, const Table& index_table) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_index(_return, new_index, index_table); - return; - } else { - ifaces_[i]->add_index(_return, new_index, index_table); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_index(_return, new_index, index_table); } + ifaces_[i]->add_index(_return, new_index, index_table); + return; } void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_index(dbname, base_tbl_name, idx_name, new_idx); } + ifaces_[i]->alter_index(dbname, base_tbl_name, idx_name, new_idx); } bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); - } else { - ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); } + return ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); } void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); - return; - } else { - ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); } + ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); + return; } void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); - return; - } else { - ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); } + ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); + return; } void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); - return; - } else { - ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); } + ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); + return; } bool update_table_column_statistics(const ColumnStatistics& stats_obj) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->update_table_column_statistics(stats_obj); - } else { - ifaces_[i]->update_table_column_statistics(stats_obj); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->update_table_column_statistics(stats_obj); } + return ifaces_[i]->update_table_column_statistics(stats_obj); } bool update_partition_column_statistics(const ColumnStatistics& stats_obj) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->update_partition_column_statistics(stats_obj); - } else { - ifaces_[i]->update_partition_column_statistics(stats_obj); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->update_partition_column_statistics(stats_obj); } + return ifaces_[i]->update_partition_column_statistics(stats_obj); } void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); - return; - } else { - ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); } + ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); + return; } void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); - return; - } else { - ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); } + ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); + return; } bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - } else { - ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); } + return ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); } bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); - } else { - ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); } + return ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); } bool create_role(const Role& role) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->create_role(role); - } else { - ifaces_[i]->create_role(role); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_role(role); } + return ifaces_[i]->create_role(role); } bool drop_role(const std::string& role_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_role(role_name); - } else { - ifaces_[i]->drop_role(role_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_role(role_name); } + return ifaces_[i]->drop_role(role_name); } void get_role_names(std::vector & _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_role_names(_return); - return; - } else { - ifaces_[i]->get_role_names(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_role_names(_return); } + ifaces_[i]->get_role_names(_return); + return; } bool grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); - } else { - ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); } + return ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); } bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->revoke_role(role_name, principal_name, principal_type); - } else { - ifaces_[i]->revoke_role(role_name, principal_name, principal_type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revoke_role(role_name, principal_name, principal_type); } + return ifaces_[i]->revoke_role(role_name, principal_name, principal_type); } void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->list_roles(_return, principal_name, principal_type); - return; - } else { - ifaces_[i]->list_roles(_return, principal_name, principal_type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->list_roles(_return, principal_name, principal_type); } + ifaces_[i]->list_roles(_return, principal_name, principal_type); + return; } void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); - return; - } else { - ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); } + ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); + return; } void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); - return; - } else { - ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); } + ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); + return; } bool grant_privileges(const PrivilegeBag& privileges) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->grant_privileges(privileges); - } else { - ifaces_[i]->grant_privileges(privileges); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_privileges(privileges); } + return ifaces_[i]->grant_privileges(privileges); } bool revoke_privileges(const PrivilegeBag& privileges) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->revoke_privileges(privileges); - } else { - ifaces_[i]->revoke_privileges(privileges); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revoke_privileges(privileges); } + return ifaces_[i]->revoke_privileges(privileges); } void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->set_ugi(_return, user_name, group_names); - return; - } else { - ifaces_[i]->set_ugi(_return, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->set_ugi(_return, user_name, group_names); } + ifaces_[i]->set_ugi(_return, user_name, group_names); + return; } void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); - return; - } else { - ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); } + ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); + return; } int64_t renew_delegation_token(const std::string& token_str_form) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->renew_delegation_token(token_str_form); - } else { - ifaces_[i]->renew_delegation_token(token_str_form); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->renew_delegation_token(token_str_form); } + return ifaces_[i]->renew_delegation_token(token_str_form); } void cancel_delegation_token(const std::string& token_str_form) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->cancel_delegation_token(token_str_form); } + ifaces_[i]->cancel_delegation_token(token_str_form); } }; Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (revision 1406838) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_metastore_TYPES_H #define hive_metastore_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include #include "fb303_types.h" @@ -58,7 +59,7 @@ static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972"; static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72}; - Version() : version(""), comments("") { + Version() : version(), comments() { } virtual ~Version() throw() {} @@ -95,6 +96,8 @@ }; +void swap(Version &a, Version &b); + typedef struct _FieldSchema__isset { _FieldSchema__isset() : name(false), type(false), comment(false) {} bool name; @@ -108,7 +111,7 @@ static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271"; static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; - FieldSchema() : name(""), type(""), comment("") { + FieldSchema() : name(), type(), comment() { } virtual ~FieldSchema() throw() {} @@ -152,6 +155,8 @@ }; +void swap(FieldSchema &a, FieldSchema &b); + typedef struct _Type__isset { _Type__isset() : name(false), type1(false), type2(false), fields(false) {} bool name; @@ -166,7 +171,7 @@ static const char* ascii_fingerprint; // = "20DF02DE523C27F7066C7BD4D9120842"; static const uint8_t binary_fingerprint[16]; // = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42}; - Type() : name(""), type1(""), type2("") { + Type() : name(), type1(), type2() { } virtual ~Type() throw() {} @@ -226,6 +231,8 @@ }; +void swap(Type &a, Type &b); + typedef struct _HiveObjectRef__isset { _HiveObjectRef__isset() : objectType(false), dbName(false), objectName(false), partValues(false), columnName(false) {} bool objectType; @@ -241,7 +248,7 @@ static const char* ascii_fingerprint; // = "205CD8311CF3AA9EC161BAEF8D7C933C"; static const uint8_t binary_fingerprint[16]; // = {0x20,0x5C,0xD8,0x31,0x1C,0xF3,0xAA,0x9E,0xC1,0x61,0xBA,0xEF,0x8D,0x7C,0x93,0x3C}; - HiveObjectRef() : dbName(""), objectName(""), columnName("") { + HiveObjectRef() : objectType((HiveObjectType::type)0), dbName(), objectName(), columnName() { } virtual ~HiveObjectRef() throw() {} @@ -299,6 +306,8 @@ }; +void swap(HiveObjectRef &a, HiveObjectRef &b); + typedef struct _PrivilegeGrantInfo__isset { _PrivilegeGrantInfo__isset() : privilege(false), createTime(false), grantor(false), grantorType(false), grantOption(false) {} bool privilege; @@ -314,7 +323,7 @@ static const char* ascii_fingerprint; // = "A58923AF7294BE492D6F90E07E8CEE1F"; static const uint8_t binary_fingerprint[16]; // = {0xA5,0x89,0x23,0xAF,0x72,0x94,0xBE,0x49,0x2D,0x6F,0x90,0xE0,0x7E,0x8C,0xEE,0x1F}; - PrivilegeGrantInfo() : privilege(""), createTime(0), grantor(""), grantOption(0) { + PrivilegeGrantInfo() : privilege(), createTime(0), grantor(), grantorType((PrincipalType::type)0), grantOption(0) { } virtual ~PrivilegeGrantInfo() throw() {} @@ -372,6 +381,8 @@ }; +void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b); + typedef struct _HiveObjectPrivilege__isset { _HiveObjectPrivilege__isset() : hiveObject(false), principalName(false), principalType(false), grantInfo(false) {} bool hiveObject; @@ -386,7 +397,7 @@ static const char* ascii_fingerprint; // = "83D71969B23BD853E29DBA9D43B29AF8"; static const uint8_t binary_fingerprint[16]; // = {0x83,0xD7,0x19,0x69,0xB2,0x3B,0xD8,0x53,0xE2,0x9D,0xBA,0x9D,0x43,0xB2,0x9A,0xF8}; - HiveObjectPrivilege() : principalName("") { + HiveObjectPrivilege() : principalName(), principalType((PrincipalType::type)0) { } virtual ~HiveObjectPrivilege() throw() {} @@ -437,6 +448,8 @@ }; +void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b); + typedef struct _PrivilegeBag__isset { _PrivilegeBag__isset() : privileges(false) {} bool privileges; @@ -478,6 +491,8 @@ }; +void swap(PrivilegeBag &a, PrivilegeBag &b); + typedef struct _PrincipalPrivilegeSet__isset { _PrincipalPrivilegeSet__isset() : userPrivileges(false), groupPrivileges(false), rolePrivileges(false) {} bool userPrivileges; @@ -535,6 +550,8 @@ }; +void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b); + typedef struct _Role__isset { _Role__isset() : roleName(false), createTime(false), ownerName(false) {} bool roleName; @@ -548,7 +565,7 @@ static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; - Role() : roleName(""), createTime(0), ownerName("") { + Role() : roleName(), createTime(0), ownerName() { } virtual ~Role() throw() {} @@ -592,6 +609,8 @@ }; +void swap(Role &a, Role &b); + typedef struct _Database__isset { _Database__isset() : name(false), description(false), locationUri(false), parameters(false), privileges(false) {} bool name; @@ -607,7 +626,7 @@ static const char* ascii_fingerprint; // = "213967572143E49C9F1A23F7A866E2F5"; static const uint8_t binary_fingerprint[16]; // = {0x21,0x39,0x67,0x57,0x21,0x43,0xE4,0x9C,0x9F,0x1A,0x23,0xF7,0xA8,0x66,0xE2,0xF5}; - Database() : name(""), description(""), locationUri("") { + Database() : name(), description(), locationUri() { } virtual ~Database() throw() {} @@ -668,6 +687,8 @@ }; +void swap(Database &a, Database &b); + typedef struct _SerDeInfo__isset { _SerDeInfo__isset() : name(false), serializationLib(false), parameters(false) {} bool name; @@ -681,7 +702,7 @@ static const char* ascii_fingerprint; // = "B1021C32A35A2AEFCD2F57A5424159A7"; static const uint8_t binary_fingerprint[16]; // = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; - SerDeInfo() : name(""), serializationLib("") { + SerDeInfo() : name(), serializationLib() { } virtual ~SerDeInfo() throw() {} @@ -725,6 +746,8 @@ }; +void swap(SerDeInfo &a, SerDeInfo &b); + typedef struct _Order__isset { _Order__isset() : col(false), order(false) {} bool col; @@ -737,7 +760,7 @@ static const char* ascii_fingerprint; // = "EEBC915CE44901401D881E6091423036"; static const uint8_t binary_fingerprint[16]; // = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36}; - Order() : col(""), order(0) { + Order() : col(), order(0) { } virtual ~Order() throw() {} @@ -774,6 +797,8 @@ }; +void swap(Order &a, Order &b); + typedef struct _SkewedInfo__isset { _SkewedInfo__isset() : skewedColNames(false), skewedColValues(false), skewedColValueLocationMaps(false) {} bool skewedColNames; @@ -831,6 +856,8 @@ }; +void swap(SkewedInfo &a, SkewedInfo &b); + typedef struct _StorageDescriptor__isset { _StorageDescriptor__isset() : cols(false), location(false), inputFormat(false), outputFormat(false), compressed(false), numBuckets(false), serdeInfo(false), bucketCols(false), sortCols(false), parameters(false), skewedInfo(false) {} bool cols; @@ -852,7 +879,7 @@ static const char* ascii_fingerprint; // = "BDC4DB93B74677CE1C04198D60E6CB80"; static const uint8_t binary_fingerprint[16]; // = {0xBD,0xC4,0xDB,0x93,0xB7,0x46,0x77,0xCE,0x1C,0x04,0x19,0x8D,0x60,0xE6,0xCB,0x80}; - StorageDescriptor() : location(""), inputFormat(""), outputFormat(""), compressed(0), numBuckets(0) { + StorageDescriptor() : location(), inputFormat(), outputFormat(), compressed(0), numBuckets(0) { } virtual ~StorageDescriptor() throw() {} @@ -955,6 +982,8 @@ }; +void swap(StorageDescriptor &a, StorageDescriptor &b); + typedef struct _Table__isset { _Table__isset() : tableName(false), dbName(false), owner(false), createTime(false), lastAccessTime(false), retention(false), sd(false), partitionKeys(false), parameters(false), viewOriginalText(false), viewExpandedText(false), tableType(false), privileges(false) {} bool tableName; @@ -978,7 +1007,7 @@ static const char* ascii_fingerprint; // = "F21F7F0ACA98ECCFC83F6605440D007F"; static const uint8_t binary_fingerprint[16]; // = {0xF2,0x1F,0x7F,0x0A,0xCA,0x98,0xEC,0xCF,0xC8,0x3F,0x66,0x05,0x44,0x0D,0x00,0x7F}; - Table() : tableName(""), dbName(""), owner(""), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(""), viewExpandedText(""), tableType("") { + Table() : tableName(), dbName(), owner(), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(), viewExpandedText(), tableType() { } virtual ~Table() throw() {} @@ -1095,6 +1124,8 @@ }; +void swap(Table &a, Table &b); + typedef struct _Partition__isset { _Partition__isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false), privileges(false) {} bool values; @@ -1113,7 +1144,7 @@ static const char* ascii_fingerprint; // = "E5EF1F030CF964C052658DD22257D025"; static const uint8_t binary_fingerprint[16]; // = {0xE5,0xEF,0x1F,0x03,0x0C,0xF9,0x64,0xC0,0x52,0x65,0x8D,0xD2,0x22,0x57,0xD0,0x25}; - Partition() : dbName(""), tableName(""), createTime(0), lastAccessTime(0) { + Partition() : dbName(), tableName(), createTime(0), lastAccessTime(0) { } virtual ~Partition() throw() {} @@ -1195,6 +1226,8 @@ }; +void swap(Partition &a, Partition &b); + typedef struct _Index__isset { _Index__isset() : indexName(false), indexHandlerClass(false), dbName(false), origTableName(false), createTime(false), lastAccessTime(false), indexTableName(false), sd(false), parameters(false), deferredRebuild(false) {} bool indexName; @@ -1215,7 +1248,7 @@ static const char* ascii_fingerprint; // = "BA1090E838C806A4F8D8D137C5085EDD"; static const uint8_t binary_fingerprint[16]; // = {0xBA,0x10,0x90,0xE8,0x38,0xC8,0x06,0xA4,0xF8,0xD8,0xD1,0x37,0xC5,0x08,0x5E,0xDD}; - Index() : indexName(""), indexHandlerClass(""), dbName(""), origTableName(""), createTime(0), lastAccessTime(0), indexTableName(""), deferredRebuild(0) { + Index() : indexName(), indexHandlerClass(), dbName(), origTableName(), createTime(0), lastAccessTime(0), indexTableName(), deferredRebuild(0) { } virtual ~Index() throw() {} @@ -1308,7 +1341,9 @@ }; +void swap(Index &a, Index &b); + class BooleanColumnStatsData { public: @@ -1357,7 +1392,9 @@ }; +void swap(BooleanColumnStatsData &a, BooleanColumnStatsData &b); + class DoubleColumnStatsData { public: @@ -1413,7 +1450,9 @@ }; +void swap(DoubleColumnStatsData &a, DoubleColumnStatsData &b); + class LongColumnStatsData { public: @@ -1469,7 +1508,9 @@ }; +void swap(LongColumnStatsData &a, LongColumnStatsData &b); + class StringColumnStatsData { public: @@ -1525,7 +1566,9 @@ }; +void swap(StringColumnStatsData &a, StringColumnStatsData &b); + class BinaryColumnStatsData { public: @@ -1574,6 +1617,8 @@ }; +void swap(BinaryColumnStatsData &a, BinaryColumnStatsData &b); + typedef struct _ColumnStatisticsData__isset { _ColumnStatisticsData__isset() : booleanStats(false), longStats(false), doubleStats(false), stringStats(false), binaryStats(false) {} bool booleanStats; @@ -1647,14 +1692,16 @@ }; +void swap(ColumnStatisticsData &a, ColumnStatisticsData &b); + class ColumnStatisticsObj { public: static const char* ascii_fingerprint; // = "DEE09584C51BCAF60824FE4509B59567"; static const uint8_t binary_fingerprint[16]; // = {0xDE,0xE0,0x95,0x84,0xC5,0x1B,0xCA,0xF6,0x08,0x24,0xFE,0x45,0x09,0xB5,0x95,0x67}; - ColumnStatisticsObj() : colName(""), colType("") { + ColumnStatisticsObj() : colName(), colType() { } virtual ~ColumnStatisticsObj() throw() {} @@ -1696,6 +1743,8 @@ }; +void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b); + typedef struct _ColumnStatisticsDesc__isset { _ColumnStatisticsDesc__isset() : partName(false), lastAnalyzed(false) {} bool partName; @@ -1708,7 +1757,7 @@ static const char* ascii_fingerprint; // = "261759FF6F8FAB53F941453007FE18CB"; static const uint8_t binary_fingerprint[16]; // = {0x26,0x17,0x59,0xFF,0x6F,0x8F,0xAB,0x53,0xF9,0x41,0x45,0x30,0x07,0xFE,0x18,0xCB}; - ColumnStatisticsDesc() : isTblLevel(0), dbName(""), tableName(""), partName(""), lastAnalyzed(0) { + ColumnStatisticsDesc() : isTblLevel(0), dbName(), tableName(), partName(), lastAnalyzed(0) { } virtual ~ColumnStatisticsDesc() throw() {} @@ -1772,7 +1821,9 @@ }; +void swap(ColumnStatisticsDesc &a, ColumnStatisticsDesc &b); + class ColumnStatistics { public: @@ -1814,6 +1865,8 @@ }; +void swap(ColumnStatistics &a, ColumnStatistics &b); + typedef struct _Schema__isset { _Schema__isset() : fieldSchemas(false), properties(false) {} bool fieldSchemas; @@ -1863,6 +1916,8 @@ }; +void swap(Schema &a, Schema &b); + typedef struct _EnvironmentContext__isset { _EnvironmentContext__isset() : properties(false) {} bool properties; @@ -1904,6 +1959,8 @@ }; +void swap(EnvironmentContext &a, EnvironmentContext &b); + typedef struct _MetaException__isset { _MetaException__isset() : message(false) {} bool message; @@ -1915,7 +1972,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - MetaException() : message("") { + MetaException() : message() { } virtual ~MetaException() throw() {} @@ -1945,6 +2002,8 @@ }; +void swap(MetaException &a, MetaException &b); + typedef struct _UnknownTableException__isset { _UnknownTableException__isset() : message(false) {} bool message; @@ -1956,7 +2015,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - UnknownTableException() : message("") { + UnknownTableException() : message() { } virtual ~UnknownTableException() throw() {} @@ -1986,6 +2045,8 @@ }; +void swap(UnknownTableException &a, UnknownTableException &b); + typedef struct _UnknownDBException__isset { _UnknownDBException__isset() : message(false) {} bool message; @@ -1997,7 +2058,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - UnknownDBException() : message("") { + UnknownDBException() : message() { } virtual ~UnknownDBException() throw() {} @@ -2027,6 +2088,8 @@ }; +void swap(UnknownDBException &a, UnknownDBException &b); + typedef struct _AlreadyExistsException__isset { _AlreadyExistsException__isset() : message(false) {} bool message; @@ -2038,7 +2101,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - AlreadyExistsException() : message("") { + AlreadyExistsException() : message() { } virtual ~AlreadyExistsException() throw() {} @@ -2068,6 +2131,8 @@ }; +void swap(AlreadyExistsException &a, AlreadyExistsException &b); + typedef struct _InvalidPartitionException__isset { _InvalidPartitionException__isset() : message(false) {} bool message; @@ -2079,7 +2144,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - InvalidPartitionException() : message("") { + InvalidPartitionException() : message() { } virtual ~InvalidPartitionException() throw() {} @@ -2109,6 +2174,8 @@ }; +void swap(InvalidPartitionException &a, InvalidPartitionException &b); + typedef struct _UnknownPartitionException__isset { _UnknownPartitionException__isset() : message(false) {} bool message; @@ -2120,7 +2187,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - UnknownPartitionException() : message("") { + UnknownPartitionException() : message() { } virtual ~UnknownPartitionException() throw() {} @@ -2150,6 +2217,8 @@ }; +void swap(UnknownPartitionException &a, UnknownPartitionException &b); + typedef struct _InvalidObjectException__isset { _InvalidObjectException__isset() : message(false) {} bool message; @@ -2161,7 +2230,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - InvalidObjectException() : message("") { + InvalidObjectException() : message() { } virtual ~InvalidObjectException() throw() {} @@ -2191,6 +2260,8 @@ }; +void swap(InvalidObjectException &a, InvalidObjectException &b); + typedef struct _NoSuchObjectException__isset { _NoSuchObjectException__isset() : message(false) {} bool message; @@ -2202,7 +2273,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - NoSuchObjectException() : message("") { + NoSuchObjectException() : message() { } virtual ~NoSuchObjectException() throw() {} @@ -2232,6 +2303,8 @@ }; +void swap(NoSuchObjectException &a, NoSuchObjectException &b); + typedef struct _IndexAlreadyExistsException__isset { _IndexAlreadyExistsException__isset() : message(false) {} bool message; @@ -2243,7 +2316,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - IndexAlreadyExistsException() : message("") { + IndexAlreadyExistsException() : message() { } virtual ~IndexAlreadyExistsException() throw() {} @@ -2273,6 +2346,8 @@ }; +void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b); + typedef struct _InvalidOperationException__isset { _InvalidOperationException__isset() : message(false) {} bool message; @@ -2284,7 +2359,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - InvalidOperationException() : message("") { + InvalidOperationException() : message() { } virtual ~InvalidOperationException() throw() {} @@ -2314,6 +2389,8 @@ }; +void swap(InvalidOperationException &a, InvalidOperationException &b); + typedef struct _ConfigValSecurityException__isset { _ConfigValSecurityException__isset() : message(false) {} bool message; @@ -2325,7 +2402,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - ConfigValSecurityException() : message("") { + ConfigValSecurityException() : message() { } virtual ~ConfigValSecurityException() throw() {} @@ -2355,6 +2432,8 @@ }; +void swap(ConfigValSecurityException &a, ConfigValSecurityException &b); + typedef struct _InvalidInputException__isset { _InvalidInputException__isset() : message(false) {} bool message; @@ -2366,7 +2445,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - InvalidInputException() : message("") { + InvalidInputException() : message() { } virtual ~InvalidInputException() throw() {} @@ -2396,6 +2475,8 @@ }; +void swap(InvalidInputException &a, InvalidInputException &b); + }}} // namespace #endif Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (revision 1406838) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -2,10 +2,10 @@ // You should copy it to another filename to avoid overwriting it. #include "ThriftHiveMetastore.h" -#include -#include -#include -#include +#include +#include +#include +#include using namespace ::apache::thrift; using namespace ::apache::thrift::protocol; @@ -14,7 +14,7 @@ using boost::shared_ptr; -using namespace Apache::Hadoop::Hive; +using namespace ::Apache::Hadoop::Hive; class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { public: Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp (revision 1406838) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_metastore_constants.h" Index: metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (revision 1406838) +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (working copy) @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -9,7 +9,7 @@ require 'hive_metastore_types' module ThriftHiveMetastore - class Client < FacebookService::Client + class Client < ::FacebookService::Client include ::Thrift::Client def create_database(database) @@ -1287,7 +1287,7 @@ end - class Processor < FacebookService::Processor + class Processor < ::FacebookService::Processor include ::Thrift::Processor def process_create_database(seqid, iprot, oprot) @@ -1295,11 +1295,11 @@ result = Create_database_result.new() begin @handler.create_database(args.database) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'create_database', seqid) @@ -1310,9 +1310,9 @@ result = Get_database_result.new() begin result.success = @handler.get_database(args.name) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_database', seqid) @@ -1323,11 +1323,11 @@ result = Drop_database_result.new() begin @handler.drop_database(args.name, args.deleteData, args.cascade) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue InvalidOperationException => o2 + rescue ::InvalidOperationException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'drop_database', seqid) @@ -1338,7 +1338,7 @@ result = Get_databases_result.new() begin result.success = @handler.get_databases(args.pattern) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_databases', seqid) @@ -1349,7 +1349,7 @@ result = Get_all_databases_result.new() begin result.success = @handler.get_all_databases() - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_all_databases', seqid) @@ -1360,9 +1360,9 @@ result = Alter_database_result.new() begin @handler.alter_database(args.dbname, args.db) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_database', seqid) @@ -1373,9 +1373,9 @@ result = Get_type_result.new() begin result.success = @handler.get_type(args.name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_type', seqid) @@ -1386,11 +1386,11 @@ result = Create_type_result.new() begin result.success = @handler.create_type(args.type) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'create_type', seqid) @@ -1401,9 +1401,9 @@ result = Drop_type_result.new() begin result.success = @handler.drop_type(args.type) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_type', seqid) @@ -1414,7 +1414,7 @@ result = Get_type_all_result.new() begin result.success = @handler.get_type_all(args.name) - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_type_all', seqid) @@ -1425,11 +1425,11 @@ result = Get_fields_result.new() begin result.success = @handler.get_fields(args.db_name, args.table_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue UnknownTableException => o2 + rescue ::UnknownTableException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_fields', seqid) @@ -1440,11 +1440,11 @@ result = Get_schema_result.new() begin result.success = @handler.get_schema(args.db_name, args.table_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue UnknownTableException => o2 + rescue ::UnknownTableException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_schema', seqid) @@ -1455,13 +1455,13 @@ result = Create_table_result.new() begin @handler.create_table(args.tbl) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 - rescue NoSuchObjectException => o4 + rescue ::NoSuchObjectException => o4 result.o4 = o4 end write_result(result, oprot, 'create_table', seqid) @@ -1472,13 +1472,13 @@ result = Create_table_with_environment_context_result.new() begin @handler.create_table_with_environment_context(args.tbl, args.environment_context) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 - rescue NoSuchObjectException => o4 + rescue ::NoSuchObjectException => o4 result.o4 = o4 end write_result(result, oprot, 'create_table_with_environment_context', seqid) @@ -1489,9 +1489,9 @@ result = Drop_table_result.new() begin @handler.drop_table(args.dbname, args.name, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'drop_table', seqid) @@ -1502,7 +1502,7 @@ result = Get_tables_result.new() begin result.success = @handler.get_tables(args.db_name, args.pattern) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_tables', seqid) @@ -1513,7 +1513,7 @@ result = Get_all_tables_result.new() begin result.success = @handler.get_all_tables(args.db_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_all_tables', seqid) @@ -1524,9 +1524,9 @@ result = Get_table_result.new() begin result.success = @handler.get_table(args.dbname, args.tbl_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_table', seqid) @@ -1537,11 +1537,11 @@ result = Get_table_objects_by_name_result.new() begin result.success = @handler.get_table_objects_by_name(args.dbname, args.tbl_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue InvalidOperationException => o2 + rescue ::InvalidOperationException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_table_objects_by_name', seqid) @@ -1552,11 +1552,11 @@ 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 + rescue ::MetaException => o1 result.o1 = o1 - rescue InvalidOperationException => o2 + rescue ::InvalidOperationException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_table_names_by_filter', seqid) @@ -1567,9 +1567,9 @@ result = Alter_table_result.new() begin @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_table', seqid) @@ -1580,9 +1580,9 @@ result = Alter_table_with_environment_context_result.new() begin @handler.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_table_with_environment_context', seqid) @@ -1593,11 +1593,11 @@ result = Add_partition_result.new() begin result.success = @handler.add_partition(args.new_part) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_partition', seqid) @@ -1608,11 +1608,11 @@ result = Add_partition_with_environment_context_result.new() begin result.success = @handler.add_partition_with_environment_context(args.new_part, args.environment_context) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_partition_with_environment_context', seqid) @@ -1623,11 +1623,11 @@ result = Add_partitions_result.new() begin result.success = @handler.add_partitions(args.new_parts) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_partitions', seqid) @@ -1638,11 +1638,11 @@ result = Append_partition_result.new() begin result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'append_partition', seqid) @@ -1653,11 +1653,11 @@ result = Append_partition_by_name_result.new() begin result.success = @handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'append_partition_by_name', seqid) @@ -1668,9 +1668,9 @@ result = Drop_partition_result.new() begin result.success = @handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_partition', seqid) @@ -1681,9 +1681,9 @@ result = Drop_partition_by_name_result.new() begin result.success = @handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_partition_by_name', seqid) @@ -1694,9 +1694,9 @@ result = Get_partition_result.new() begin result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition', seqid) @@ -1707,9 +1707,9 @@ result = Get_partition_with_auth_result.new() begin result.success = @handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_with_auth', seqid) @@ -1720,9 +1720,9 @@ result = Get_partition_by_name_result.new() begin result.success = @handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_by_name', seqid) @@ -1733,9 +1733,9 @@ result = Get_partitions_result.new() begin result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions', seqid) @@ -1746,9 +1746,9 @@ result = Get_partitions_with_auth_result.new() begin result.success = @handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_with_auth', seqid) @@ -1759,7 +1759,7 @@ result = Get_partition_names_result.new() begin result.success = @handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_names', seqid) @@ -1770,9 +1770,9 @@ result = Get_partitions_ps_result.new() begin result.success = @handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_ps', seqid) @@ -1783,9 +1783,9 @@ result = Get_partitions_ps_with_auth_result.new() begin result.success = @handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_ps_with_auth', seqid) @@ -1796,9 +1796,9 @@ result = Get_partition_names_ps_result.new() begin result.success = @handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_names_ps', seqid) @@ -1809,9 +1809,9 @@ result = Get_partitions_by_filter_result.new() begin result.success = @handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_by_filter', seqid) @@ -1822,9 +1822,9 @@ result = Get_partitions_by_names_result.new() begin result.success = @handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_by_names', seqid) @@ -1835,9 +1835,9 @@ result = Alter_partition_result.new() begin @handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_partition', seqid) @@ -1848,9 +1848,9 @@ result = Alter_partitions_result.new() begin @handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_partitions', seqid) @@ -1861,9 +1861,9 @@ result = Alter_partition_with_environment_context_result.new() begin @handler.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_partition_with_environment_context', seqid) @@ -1874,9 +1874,9 @@ result = Rename_partition_result.new() begin @handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'rename_partition', seqid) @@ -1887,7 +1887,7 @@ result = Get_config_value_result.new() begin result.success = @handler.get_config_value(args.name, args.defaultValue) - rescue ConfigValSecurityException => o1 + rescue ::ConfigValSecurityException => o1 result.o1 = o1 end write_result(result, oprot, 'get_config_value', seqid) @@ -1898,7 +1898,7 @@ result = Partition_name_to_vals_result.new() begin result.success = @handler.partition_name_to_vals(args.part_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'partition_name_to_vals', seqid) @@ -1909,7 +1909,7 @@ result = Partition_name_to_spec_result.new() begin result.success = @handler.partition_name_to_spec(args.part_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'partition_name_to_spec', seqid) @@ -1920,17 +1920,17 @@ result = MarkPartitionForEvent_result.new() begin @handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 - rescue UnknownTableException => o4 + rescue ::UnknownTableException => o4 result.o4 = o4 - rescue UnknownPartitionException => o5 + rescue ::UnknownPartitionException => o5 result.o5 = o5 - rescue InvalidPartitionException => o6 + rescue ::InvalidPartitionException => o6 result.o6 = o6 end write_result(result, oprot, 'markPartitionForEvent', seqid) @@ -1941,17 +1941,17 @@ result = IsPartitionMarkedForEvent_result.new() begin result.success = @handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 - rescue UnknownTableException => o4 + rescue ::UnknownTableException => o4 result.o4 = o4 - rescue UnknownPartitionException => o5 + rescue ::UnknownPartitionException => o5 result.o5 = o5 - rescue InvalidPartitionException => o6 + rescue ::InvalidPartitionException => o6 result.o6 = o6 end write_result(result, oprot, 'isPartitionMarkedForEvent', seqid) @@ -1962,11 +1962,11 @@ result = Add_index_result.new() begin result.success = @handler.add_index(args.new_index, args.index_table) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_index', seqid) @@ -1977,9 +1977,9 @@ result = Alter_index_result.new() begin @handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_index', seqid) @@ -1990,9 +1990,9 @@ result = Drop_index_by_name_result.new() begin result.success = @handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_index_by_name', seqid) @@ -2003,9 +2003,9 @@ result = Get_index_by_name_result.new() begin result.success = @handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_index_by_name', seqid) @@ -2016,9 +2016,9 @@ result = Get_indexes_result.new() begin result.success = @handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_indexes', seqid) @@ -2029,7 +2029,7 @@ result = Get_index_names_result.new() begin result.success = @handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_index_names', seqid) @@ -2040,13 +2040,13 @@ result = Update_table_column_statistics_result.new() begin result.success = @handler.update_table_column_statistics(args.stats_obj) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 - rescue InvalidInputException => o4 + rescue ::InvalidInputException => o4 result.o4 = o4 end write_result(result, oprot, 'update_table_column_statistics', seqid) @@ -2057,13 +2057,13 @@ result = Update_partition_column_statistics_result.new() begin result.success = @handler.update_partition_column_statistics(args.stats_obj) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 - rescue InvalidInputException => o4 + rescue ::InvalidInputException => o4 result.o4 = o4 end write_result(result, oprot, 'update_partition_column_statistics', seqid) @@ -2074,13 +2074,13 @@ result = Get_table_column_statistics_result.new() begin result.success = @handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 - rescue InvalidInputException => o3 + rescue ::InvalidInputException => o3 result.o3 = o3 - rescue InvalidObjectException => o4 + rescue ::InvalidObjectException => o4 result.o4 = o4 end write_result(result, oprot, 'get_table_column_statistics', seqid) @@ -2091,13 +2091,13 @@ result = Get_partition_column_statistics_result.new() begin result.success = @handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 - rescue InvalidInputException => o3 + rescue ::InvalidInputException => o3 result.o3 = o3 - rescue InvalidObjectException => o4 + rescue ::InvalidObjectException => o4 result.o4 = o4 end write_result(result, oprot, 'get_partition_column_statistics', seqid) @@ -2108,13 +2108,13 @@ result = Delete_partition_column_statistics_result.new() begin result.success = @handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 - rescue InvalidObjectException => o3 + rescue ::InvalidObjectException => o3 result.o3 = o3 - rescue InvalidInputException => o4 + rescue ::InvalidInputException => o4 result.o4 = o4 end write_result(result, oprot, 'delete_partition_column_statistics', seqid) @@ -2125,13 +2125,13 @@ result = Delete_table_column_statistics_result.new() begin result.success = @handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 - rescue InvalidObjectException => o3 + rescue ::InvalidObjectException => o3 result.o3 = o3 - rescue InvalidInputException => o4 + rescue ::InvalidInputException => o4 result.o4 = o4 end write_result(result, oprot, 'delete_table_column_statistics', seqid) @@ -2142,7 +2142,7 @@ result = Create_role_result.new() begin result.success = @handler.create_role(args.role) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'create_role', seqid) @@ -2153,7 +2153,7 @@ result = Drop_role_result.new() begin result.success = @handler.drop_role(args.role_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'drop_role', seqid) @@ -2164,7 +2164,7 @@ result = Get_role_names_result.new() begin result.success = @handler.get_role_names() - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_role_names', seqid) @@ -2175,7 +2175,7 @@ result = Grant_role_result.new() begin result.success = @handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'grant_role', seqid) @@ -2186,7 +2186,7 @@ result = Revoke_role_result.new() begin result.success = @handler.revoke_role(args.role_name, args.principal_name, args.principal_type) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'revoke_role', seqid) @@ -2197,7 +2197,7 @@ result = List_roles_result.new() begin result.success = @handler.list_roles(args.principal_name, args.principal_type) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'list_roles', seqid) @@ -2208,7 +2208,7 @@ result = Get_privilege_set_result.new() begin result.success = @handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_privilege_set', seqid) @@ -2219,7 +2219,7 @@ result = List_privileges_result.new() begin result.success = @handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'list_privileges', seqid) @@ -2230,7 +2230,7 @@ result = Grant_privileges_result.new() begin result.success = @handler.grant_privileges(args.privileges) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'grant_privileges', seqid) @@ -2241,7 +2241,7 @@ result = Revoke_privileges_result.new() begin result.success = @handler.revoke_privileges(args.privileges) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'revoke_privileges', seqid) @@ -2252,7 +2252,7 @@ result = Set_ugi_result.new() begin result.success = @handler.set_ugi(args.user_name, args.group_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'set_ugi', seqid) @@ -2263,7 +2263,7 @@ result = Get_delegation_token_result.new() begin result.success = @handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_delegation_token', seqid) @@ -2274,7 +2274,7 @@ result = Renew_delegation_token_result.new() begin result.success = @handler.renew_delegation_token(args.token_str_form) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'renew_delegation_token', seqid) @@ -2285,7 +2285,7 @@ result = Cancel_delegation_token_result.new() begin @handler.cancel_delegation_token(args.token_str_form) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'cancel_delegation_token', seqid) @@ -2300,7 +2300,7 @@ DATABASE = 1 FIELDS = { - DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => Database} + DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => ::Database} } def struct_fields; FIELDS; end @@ -2318,9 +2318,9 @@ O3 = 3 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2354,9 +2354,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Database}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Database}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2394,9 +2394,9 @@ O3 = 3 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidOperationException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidOperationException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2430,7 +2430,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2463,7 +2463,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2481,7 +2481,7 @@ FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - DB => {:type => ::Thrift::Types::STRUCT, :name => 'db', :class => Database} + DB => {:type => ::Thrift::Types::STRUCT, :name => 'db', :class => ::Database} } def struct_fields; FIELDS; end @@ -2498,8 +2498,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2533,9 +2533,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Type}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Type}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2551,7 +2551,7 @@ TYPE = 1 FIELDS = { - TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => Type} + TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => ::Type} } def struct_fields; FIELDS; end @@ -2571,9 +2571,9 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2608,8 +2608,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2642,8 +2642,8 @@ O2 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Type}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Type}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2680,10 +2680,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException} } def struct_fields; FIELDS; end @@ -2720,10 +2720,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException} } def struct_fields; FIELDS; end @@ -2739,7 +2739,7 @@ TBL = 1 FIELDS = { - TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => Table} + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table} } def struct_fields; FIELDS; end @@ -2758,10 +2758,10 @@ O4 = 4 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2778,8 +2778,8 @@ ENVIRONMENT_CONTEXT = 2 FIELDS = { - TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => Table}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -2798,10 +2798,10 @@ O4 = 4 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2838,8 +2838,8 @@ O3 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2875,7 +2875,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2909,7 +2909,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2945,9 +2945,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Table}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Table}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2984,10 +2984,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Table}}, - 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} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Table}}, + 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 @@ -3027,9 +3027,9 @@ 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} + 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 @@ -3049,7 +3049,7 @@ FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => Table} + NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => ::Table} } def struct_fields; FIELDS; end @@ -3066,8 +3066,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3088,8 +3088,8 @@ FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => Table}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => ::Table}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -3106,8 +3106,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3123,7 +3123,7 @@ NEW_PART = 1 FIELDS = { - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} } def struct_fields; FIELDS; end @@ -3142,10 +3142,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3162,8 +3162,8 @@ ENVIRONMENT_CONTEXT = 2 FIELDS = { - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -3182,10 +3182,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3201,7 +3201,7 @@ NEW_PARTS = 1 FIELDS = { - NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}} + NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} } def struct_fields; FIELDS; end @@ -3221,9 +3221,9 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3262,10 +3262,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3304,10 +3304,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3348,8 +3348,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3390,8 +3390,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3429,9 +3429,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3473,9 +3473,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3513,9 +3513,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3553,9 +3553,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3597,9 +3597,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3637,7 +3637,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3677,9 +3677,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3723,9 +3723,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3766,8 +3766,8 @@ 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 => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3807,9 +3807,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3847,9 +3847,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3869,7 +3869,7 @@ FIELDS = { DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} } def struct_fields; FIELDS; end @@ -3886,8 +3886,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3907,7 +3907,7 @@ FIELDS = { DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}} + NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} } def struct_fields; FIELDS; end @@ -3924,8 +3924,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3946,8 +3946,8 @@ FIELDS = { DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -3964,8 +3964,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3987,7 +3987,7 @@ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} } def struct_fields; FIELDS; end @@ -4004,8 +4004,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4041,7 +4041,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ConfigValSecurityException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::ConfigValSecurityException} } def struct_fields; FIELDS; end @@ -4075,7 +4075,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4109,7 +4109,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4131,13 +4131,13 @@ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, PART_VALS => {:type => ::Thrift::Types::MAP, :name => 'part_vals', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => PartitionEventType} + EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => ::PartitionEventType} } def struct_fields; FIELDS; end def validate - unless @eventType.nil? || PartitionEventType::VALID_VALUES.include?(@eventType) + unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') end end @@ -4155,12 +4155,12 @@ O6 = 6 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => UnknownTableException}, - O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => UnknownPartitionException}, - O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => InvalidPartitionException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::UnknownTableException}, + O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => ::UnknownPartitionException}, + O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => ::InvalidPartitionException} } def struct_fields; FIELDS; end @@ -4182,13 +4182,13 @@ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, PART_VALS => {:type => ::Thrift::Types::MAP, :name => 'part_vals', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => PartitionEventType} + EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => ::PartitionEventType} } def struct_fields; FIELDS; end def validate - unless @eventType.nil? || PartitionEventType::VALID_VALUES.include?(@eventType) + unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') end end @@ -4208,12 +4208,12 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => UnknownTableException}, - O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => UnknownPartitionException}, - O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => InvalidPartitionException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::UnknownTableException}, + O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => ::UnknownPartitionException}, + O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => ::InvalidPartitionException} } def struct_fields; FIELDS; end @@ -4230,8 +4230,8 @@ INDEX_TABLE = 2 FIELDS = { - NEW_INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'new_index', :class => Index}, - INDEX_TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'index_table', :class => Table} + NEW_INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'new_index', :class => ::Index}, + INDEX_TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'index_table', :class => ::Table} } def struct_fields; FIELDS; end @@ -4250,10 +4250,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4275,7 +4275,7 @@ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, BASE_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'base_tbl_name'}, IDX_NAME => {:type => ::Thrift::Types::STRING, :name => 'idx_name'}, - NEW_IDX => {:type => ::Thrift::Types::STRUCT, :name => 'new_idx', :class => Index} + NEW_IDX => {:type => ::Thrift::Types::STRUCT, :name => 'new_idx', :class => ::Index} } def struct_fields; FIELDS; end @@ -4292,8 +4292,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4334,8 +4334,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4373,9 +4373,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -4413,9 +4413,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Index}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Index}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4453,7 +4453,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4469,7 +4469,7 @@ STATS_OBJ = 1 FIELDS = { - STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ColumnStatistics} + STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ::ColumnStatistics} } def struct_fields; FIELDS; end @@ -4490,10 +4490,10 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} } def struct_fields; FIELDS; end @@ -4509,7 +4509,7 @@ STATS_OBJ = 1 FIELDS = { - STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ColumnStatistics} + STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ::ColumnStatistics} } def struct_fields; FIELDS; end @@ -4530,10 +4530,10 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} } def struct_fields; FIELDS; end @@ -4573,11 +4573,11 @@ O4 = 4 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ColumnStatistics}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidInputException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ColumnStatistics}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidInputException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidObjectException} } def struct_fields; FIELDS; end @@ -4619,11 +4619,11 @@ O4 = 4 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ColumnStatistics}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidInputException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ColumnStatistics}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidInputException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidObjectException} } def struct_fields; FIELDS; end @@ -4666,10 +4666,10 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidObjectException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} } def struct_fields; FIELDS; end @@ -4710,10 +4710,10 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidObjectException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} } def struct_fields; FIELDS; end @@ -4729,7 +4729,7 @@ ROLE = 1 FIELDS = { - ROLE => {:type => ::Thrift::Types::STRUCT, :name => 'role', :class => Role} + ROLE => {:type => ::Thrift::Types::STRUCT, :name => 'role', :class => ::Role} } def struct_fields; FIELDS; end @@ -4747,7 +4747,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4781,7 +4781,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4814,7 +4814,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4837,19 +4837,19 @@ FIELDS = { ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType}, + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType}, GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, - GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => PrincipalType}, + GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => ::PrincipalType}, GRANT_OPTION => {:type => ::Thrift::Types::BOOL, :name => 'grant_option'} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end - unless @grantorType.nil? || PrincipalType::VALID_VALUES.include?(@grantorType) + unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') end end @@ -4864,7 +4864,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4884,13 +4884,13 @@ FIELDS = { ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType} + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end end @@ -4905,7 +4905,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4923,13 +4923,13 @@ FIELDS = { PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType} + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end end @@ -4943,8 +4943,8 @@ O1 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Role}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Role}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4962,7 +4962,7 @@ GROUP_NAMES = 3 FIELDS = { - HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef}, + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef}, USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} } @@ -4981,8 +4981,8 @@ O1 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => PrincipalPrivilegeSet}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -5001,14 +5001,14 @@ FIELDS = { PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType}, - HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef} + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType}, + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end end @@ -5022,8 +5022,8 @@ O1 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => HiveObjectPrivilege}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::HiveObjectPrivilege}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -5039,7 +5039,7 @@ PRIVILEGES = 1 FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrivilegeBag} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} } def struct_fields; FIELDS; end @@ -5057,7 +5057,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -5073,7 +5073,7 @@ PRIVILEGES = 1 FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrivilegeBag} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} } def struct_fields; FIELDS; end @@ -5091,7 +5091,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -5127,7 +5127,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -5163,7 +5163,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -5197,7 +5197,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -5229,7 +5229,7 @@ O1 = 1 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end Index: metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (revision 1406838) +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'fb303_types' @@ -80,7 +81,7 @@ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, TYPE1 => {:type => ::Thrift::Types::STRING, :name => 'type1', :optional => true}, TYPE2 => {:type => ::Thrift::Types::STRING, :name => 'type2', :optional => true}, - FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}, :optional => true} + FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}, :optional => true} } def struct_fields; FIELDS; end @@ -100,7 +101,7 @@ COLUMNNAME = 5 FIELDS = { - OBJECTTYPE => {:type => ::Thrift::Types::I32, :name => 'objectType', :enum_class => HiveObjectType}, + OBJECTTYPE => {:type => ::Thrift::Types::I32, :name => 'objectType', :enum_class => ::HiveObjectType}, DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, OBJECTNAME => {:type => ::Thrift::Types::STRING, :name => 'objectName'}, PARTVALUES => {:type => ::Thrift::Types::LIST, :name => 'partValues', :element => {:type => ::Thrift::Types::STRING}}, @@ -110,7 +111,7 @@ def struct_fields; FIELDS; end def validate - unless @objectType.nil? || HiveObjectType::VALID_VALUES.include?(@objectType) + unless @objectType.nil? || ::HiveObjectType::VALID_VALUES.include?(@objectType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field objectType!') end end @@ -130,14 +131,14 @@ PRIVILEGE => {:type => ::Thrift::Types::STRING, :name => 'privilege'}, CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, - GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => PrincipalType}, + GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => ::PrincipalType}, GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'} } def struct_fields; FIELDS; end def validate - unless @grantorType.nil? || PrincipalType::VALID_VALUES.include?(@grantorType) + unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') end end @@ -153,16 +154,16 @@ GRANTINFO = 4 FIELDS = { - HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef}, + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef}, PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, - PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => PrincipalType}, - GRANTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'grantInfo', :class => PrivilegeGrantInfo} + PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType}, + GRANTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'grantInfo', :class => ::PrivilegeGrantInfo} } def struct_fields; FIELDS; end def validate - unless @principalType.nil? || PrincipalType::VALID_VALUES.include?(@principalType) + unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') end end @@ -175,7 +176,7 @@ PRIVILEGES = 1 FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => HiveObjectPrivilege}} + PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => ::HiveObjectPrivilege}} } def struct_fields; FIELDS; end @@ -193,9 +194,9 @@ ROLEPRIVILEGES = 3 FIELDS = { - USERPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'userPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}}, - GROUPPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'groupPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}}, - ROLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'rolePrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}} + USERPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'userPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}}, + GROUPPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'groupPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}}, + ROLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'rolePrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}} } def struct_fields; FIELDS; end @@ -239,7 +240,7 @@ DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}, LOCATIONURI => {:type => ::Thrift::Types::STRING, :name => 'locationUri'}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -323,17 +324,17 @@ SKEWEDINFO = 11 FIELDS = { - COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'}, INPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'inputFormat'}, OUTPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'outputFormat'}, COMPRESSED => {:type => ::Thrift::Types::BOOL, :name => 'compressed'}, NUMBUCKETS => {:type => ::Thrift::Types::I32, :name => 'numBuckets'}, - SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => SerDeInfo}, + SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => ::SerDeInfo}, BUCKETCOLS => {:type => ::Thrift::Types::LIST, :name => 'bucketCols', :element => {:type => ::Thrift::Types::STRING}}, - SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => Order}}, + SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Order}}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - SKEWEDINFO => {:type => ::Thrift::Types::STRUCT, :name => 'skewedInfo', :class => SkewedInfo, :optional => true} + SKEWEDINFO => {:type => ::Thrift::Types::STRUCT, :name => 'skewedInfo', :class => ::SkewedInfo, :optional => true} } def struct_fields; FIELDS; end @@ -367,13 +368,13 @@ CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, RETENTION => {:type => ::Thrift::Types::I32, :name => 'retention'}, - SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, - PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor}, + PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'}, VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'}, TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'}, - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -401,9 +402,9 @@ TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, - SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -435,7 +436,7 @@ CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, INDEXTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'indexTableName'}, - SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'} } @@ -603,11 +604,11 @@ BINARYSTATS = 5 FIELDS = { - BOOLEANSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'booleanStats', :class => BooleanColumnStatsData}, - LONGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'longStats', :class => LongColumnStatsData}, - DOUBLESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'doubleStats', :class => DoubleColumnStatsData}, - STRINGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'stringStats', :class => StringColumnStatsData}, - BINARYSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'binaryStats', :class => BinaryColumnStatsData} + BOOLEANSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'booleanStats', :class => ::BooleanColumnStatsData}, + LONGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'longStats', :class => ::LongColumnStatsData}, + DOUBLESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'doubleStats', :class => ::DoubleColumnStatsData}, + STRINGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'stringStats', :class => ::StringColumnStatsData}, + BINARYSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'binaryStats', :class => ::BinaryColumnStatsData} } def struct_fields; FIELDS; end @@ -628,7 +629,7 @@ FIELDS = { COLNAME => {:type => ::Thrift::Types::STRING, :name => 'colName'}, COLTYPE => {:type => ::Thrift::Types::STRING, :name => 'colType'}, - STATSDATA => {:type => ::Thrift::Types::STRUCT, :name => 'statsData', :class => ColumnStatisticsData} + STATSDATA => {:type => ::Thrift::Types::STRUCT, :name => 'statsData', :class => ::ColumnStatisticsData} } def struct_fields; FIELDS; end @@ -675,8 +676,8 @@ STATSOBJ = 2 FIELDS = { - STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ColumnStatisticsDesc}, - STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ColumnStatisticsObj}} + STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ::ColumnStatisticsDesc}, + STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}} } def struct_fields; FIELDS; end @@ -695,7 +696,7 @@ PROPERTIES = 2 FIELDS = { - FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} } Index: metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb (revision 1406838) +++ metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'hive_metastore_types' DDL_TIME = %q"transient_lastDdlTime" Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidPartitionException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class InvalidPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidPartitionException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidPartitionExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidPartitionExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class InvalidPartitionExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidPartitionExceptionStandardScheme getScheme() { + return new InvalidPartitionExceptionStandardScheme(); + } + } + + private static class InvalidPartitionExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidPartitionException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidPartitionException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidPartitionExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidPartitionExceptionTupleScheme getScheme() { + return new InvalidPartitionExceptionTupleScheme(); + } + } + + private static class InvalidPartitionExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } 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 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -5395,7 +5405,7 @@ } - public static class Processor extends com.facebook.fb303.FacebookService.Processor implements org.apache.thrift.TProcessor { + public static class Processor extends com.facebook.fb303.FacebookService.Processor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); @@ -5484,16 +5494,20 @@ return processMap; } - private static class create_database extends org.apache.thrift.ProcessFunction { + public static class create_database extends org.apache.thrift.ProcessFunction { public create_database() { super("create_database"); } - protected create_database_args getEmptyArgsInstance() { + public create_database_args getEmptyArgsInstance() { return new create_database_args(); } - protected create_database_result getResult(I iface, create_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_database_result getResult(I iface, create_database_args args) throws org.apache.thrift.TException { create_database_result result = new create_database_result(); try { iface.create_database(args.database); @@ -5508,16 +5522,20 @@ } } - private static class get_database extends org.apache.thrift.ProcessFunction { + public static class get_database extends org.apache.thrift.ProcessFunction { public get_database() { super("get_database"); } - protected get_database_args getEmptyArgsInstance() { + public get_database_args getEmptyArgsInstance() { return new get_database_args(); } - protected get_database_result getResult(I iface, get_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_database_result getResult(I iface, get_database_args args) throws org.apache.thrift.TException { get_database_result result = new get_database_result(); try { result.success = iface.get_database(args.name); @@ -5530,16 +5548,20 @@ } } - private static class drop_database extends org.apache.thrift.ProcessFunction { + public static class drop_database extends org.apache.thrift.ProcessFunction { public drop_database() { super("drop_database"); } - protected drop_database_args getEmptyArgsInstance() { + public drop_database_args getEmptyArgsInstance() { return new drop_database_args(); } - protected drop_database_result getResult(I iface, drop_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_database_result getResult(I iface, drop_database_args args) throws org.apache.thrift.TException { drop_database_result result = new drop_database_result(); try { iface.drop_database(args.name, args.deleteData, args.cascade); @@ -5554,16 +5576,20 @@ } } - private static class get_databases extends org.apache.thrift.ProcessFunction { + public static class get_databases extends org.apache.thrift.ProcessFunction { public get_databases() { super("get_databases"); } - protected get_databases_args getEmptyArgsInstance() { + public get_databases_args getEmptyArgsInstance() { return new get_databases_args(); } - protected get_databases_result getResult(I iface, get_databases_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_databases_result getResult(I iface, get_databases_args args) throws org.apache.thrift.TException { get_databases_result result = new get_databases_result(); try { result.success = iface.get_databases(args.pattern); @@ -5574,16 +5600,20 @@ } } - private static class get_all_databases extends org.apache.thrift.ProcessFunction { + public static class get_all_databases extends org.apache.thrift.ProcessFunction { public get_all_databases() { super("get_all_databases"); } - protected get_all_databases_args getEmptyArgsInstance() { + public get_all_databases_args getEmptyArgsInstance() { return new get_all_databases_args(); } - protected get_all_databases_result getResult(I iface, get_all_databases_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_all_databases_result getResult(I iface, get_all_databases_args args) throws org.apache.thrift.TException { get_all_databases_result result = new get_all_databases_result(); try { result.success = iface.get_all_databases(); @@ -5594,16 +5624,20 @@ } } - private static class alter_database extends org.apache.thrift.ProcessFunction { + public static class alter_database extends org.apache.thrift.ProcessFunction { public alter_database() { super("alter_database"); } - protected alter_database_args getEmptyArgsInstance() { + public alter_database_args getEmptyArgsInstance() { return new alter_database_args(); } - protected alter_database_result getResult(I iface, alter_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_database_result getResult(I iface, alter_database_args args) throws org.apache.thrift.TException { alter_database_result result = new alter_database_result(); try { iface.alter_database(args.dbname, args.db); @@ -5616,16 +5650,20 @@ } } - private static class get_type extends org.apache.thrift.ProcessFunction { + public static class get_type extends org.apache.thrift.ProcessFunction { public get_type() { super("get_type"); } - protected get_type_args getEmptyArgsInstance() { + public get_type_args getEmptyArgsInstance() { return new get_type_args(); } - protected get_type_result getResult(I iface, get_type_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_type_result getResult(I iface, get_type_args args) throws org.apache.thrift.TException { get_type_result result = new get_type_result(); try { result.success = iface.get_type(args.name); @@ -5638,16 +5676,20 @@ } } - private static class create_type extends org.apache.thrift.ProcessFunction { + public static class create_type extends org.apache.thrift.ProcessFunction { public create_type() { super("create_type"); } - protected create_type_args getEmptyArgsInstance() { + public create_type_args getEmptyArgsInstance() { return new create_type_args(); } - protected create_type_result getResult(I iface, create_type_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_type_result getResult(I iface, create_type_args args) throws org.apache.thrift.TException { create_type_result result = new create_type_result(); try { result.success = iface.create_type(args.type); @@ -5663,16 +5705,20 @@ } } - private static class drop_type extends org.apache.thrift.ProcessFunction { + public static class drop_type extends org.apache.thrift.ProcessFunction { public drop_type() { super("drop_type"); } - protected drop_type_args getEmptyArgsInstance() { + public drop_type_args getEmptyArgsInstance() { return new drop_type_args(); } - protected drop_type_result getResult(I iface, drop_type_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_type_result getResult(I iface, drop_type_args args) throws org.apache.thrift.TException { drop_type_result result = new drop_type_result(); try { result.success = iface.drop_type(args.type); @@ -5686,16 +5732,20 @@ } } - private static class get_type_all extends org.apache.thrift.ProcessFunction { + public static class get_type_all extends org.apache.thrift.ProcessFunction { public get_type_all() { super("get_type_all"); } - protected get_type_all_args getEmptyArgsInstance() { + public get_type_all_args getEmptyArgsInstance() { return new get_type_all_args(); } - protected get_type_all_result getResult(I iface, get_type_all_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_type_all_result getResult(I iface, get_type_all_args args) throws org.apache.thrift.TException { get_type_all_result result = new get_type_all_result(); try { result.success = iface.get_type_all(args.name); @@ -5706,16 +5756,20 @@ } } - private static class get_fields extends org.apache.thrift.ProcessFunction { + public static class get_fields extends org.apache.thrift.ProcessFunction { public get_fields() { super("get_fields"); } - protected get_fields_args getEmptyArgsInstance() { + public get_fields_args getEmptyArgsInstance() { return new get_fields_args(); } - protected get_fields_result getResult(I iface, get_fields_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_fields_result getResult(I iface, get_fields_args args) throws org.apache.thrift.TException { get_fields_result result = new get_fields_result(); try { result.success = iface.get_fields(args.db_name, args.table_name); @@ -5730,16 +5784,20 @@ } } - private static class get_schema extends org.apache.thrift.ProcessFunction { + public static class get_schema extends org.apache.thrift.ProcessFunction { public get_schema() { super("get_schema"); } - protected get_schema_args getEmptyArgsInstance() { + public get_schema_args getEmptyArgsInstance() { return new get_schema_args(); } - protected get_schema_result getResult(I iface, get_schema_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_schema_result getResult(I iface, get_schema_args args) throws org.apache.thrift.TException { get_schema_result result = new get_schema_result(); try { result.success = iface.get_schema(args.db_name, args.table_name); @@ -5754,16 +5812,20 @@ } } - private static class create_table extends org.apache.thrift.ProcessFunction { + public static class create_table extends org.apache.thrift.ProcessFunction { public create_table() { super("create_table"); } - protected create_table_args getEmptyArgsInstance() { + public create_table_args getEmptyArgsInstance() { return new create_table_args(); } - protected create_table_result getResult(I iface, create_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_table_result getResult(I iface, create_table_args args) throws org.apache.thrift.TException { create_table_result result = new create_table_result(); try { iface.create_table(args.tbl); @@ -5780,16 +5842,20 @@ } } - private static class create_table_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class create_table_with_environment_context extends org.apache.thrift.ProcessFunction { public create_table_with_environment_context() { super("create_table_with_environment_context"); } - protected create_table_with_environment_context_args getEmptyArgsInstance() { + public create_table_with_environment_context_args getEmptyArgsInstance() { return new create_table_with_environment_context_args(); } - protected create_table_with_environment_context_result getResult(I iface, create_table_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_table_with_environment_context_result getResult(I iface, create_table_with_environment_context_args args) throws org.apache.thrift.TException { create_table_with_environment_context_result result = new create_table_with_environment_context_result(); try { iface.create_table_with_environment_context(args.tbl, args.environment_context); @@ -5806,16 +5872,20 @@ } } - private static class drop_table extends org.apache.thrift.ProcessFunction { + public static class drop_table extends org.apache.thrift.ProcessFunction { public drop_table() { super("drop_table"); } - protected drop_table_args getEmptyArgsInstance() { + public drop_table_args getEmptyArgsInstance() { return new drop_table_args(); } - protected drop_table_result getResult(I iface, drop_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_table_result getResult(I iface, drop_table_args args) throws org.apache.thrift.TException { drop_table_result result = new drop_table_result(); try { iface.drop_table(args.dbname, args.name, args.deleteData); @@ -5828,16 +5898,20 @@ } } - private static class get_tables extends org.apache.thrift.ProcessFunction { + public static class get_tables extends org.apache.thrift.ProcessFunction { public get_tables() { super("get_tables"); } - protected get_tables_args getEmptyArgsInstance() { + public get_tables_args getEmptyArgsInstance() { return new get_tables_args(); } - protected get_tables_result getResult(I iface, get_tables_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_tables_result getResult(I iface, get_tables_args args) throws org.apache.thrift.TException { get_tables_result result = new get_tables_result(); try { result.success = iface.get_tables(args.db_name, args.pattern); @@ -5848,16 +5922,20 @@ } } - private static class get_all_tables extends org.apache.thrift.ProcessFunction { + public static class get_all_tables extends org.apache.thrift.ProcessFunction { public get_all_tables() { super("get_all_tables"); } - protected get_all_tables_args getEmptyArgsInstance() { + public get_all_tables_args getEmptyArgsInstance() { return new get_all_tables_args(); } - protected get_all_tables_result getResult(I iface, get_all_tables_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_all_tables_result getResult(I iface, get_all_tables_args args) throws org.apache.thrift.TException { get_all_tables_result result = new get_all_tables_result(); try { result.success = iface.get_all_tables(args.db_name); @@ -5868,16 +5946,20 @@ } } - private static class get_table extends org.apache.thrift.ProcessFunction { + public static class get_table extends org.apache.thrift.ProcessFunction { public get_table() { super("get_table"); } - protected get_table_args getEmptyArgsInstance() { + public get_table_args getEmptyArgsInstance() { return new get_table_args(); } - protected get_table_result getResult(I iface, get_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_table_result getResult(I iface, get_table_args args) throws org.apache.thrift.TException { get_table_result result = new get_table_result(); try { result.success = iface.get_table(args.dbname, args.tbl_name); @@ -5890,16 +5972,20 @@ } } - private static class get_table_objects_by_name extends org.apache.thrift.ProcessFunction { + public static class get_table_objects_by_name extends org.apache.thrift.ProcessFunction { public get_table_objects_by_name() { super("get_table_objects_by_name"); } - protected get_table_objects_by_name_args getEmptyArgsInstance() { + public get_table_objects_by_name_args getEmptyArgsInstance() { return new get_table_objects_by_name_args(); } - protected get_table_objects_by_name_result getResult(I iface, get_table_objects_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_table_objects_by_name_result getResult(I iface, get_table_objects_by_name_args args) throws org.apache.thrift.TException { get_table_objects_by_name_result result = new get_table_objects_by_name_result(); try { result.success = iface.get_table_objects_by_name(args.dbname, args.tbl_names); @@ -5914,16 +6000,20 @@ } } - private static class get_table_names_by_filter extends org.apache.thrift.ProcessFunction { + public static class get_table_names_by_filter extends org.apache.thrift.ProcessFunction { public get_table_names_by_filter() { super("get_table_names_by_filter"); } - protected get_table_names_by_filter_args getEmptyArgsInstance() { + public get_table_names_by_filter_args getEmptyArgsInstance() { return new get_table_names_by_filter_args(); } - protected get_table_names_by_filter_result getResult(I iface, get_table_names_by_filter_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_table_names_by_filter_result getResult(I iface, get_table_names_by_filter_args args) throws org.apache.thrift.TException { 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); @@ -5938,16 +6028,20 @@ } } - private static class alter_table extends org.apache.thrift.ProcessFunction { + public static class alter_table extends org.apache.thrift.ProcessFunction { public alter_table() { super("alter_table"); } - protected alter_table_args getEmptyArgsInstance() { + public alter_table_args getEmptyArgsInstance() { return new alter_table_args(); } - protected alter_table_result getResult(I iface, alter_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_table_result getResult(I iface, alter_table_args args) throws org.apache.thrift.TException { alter_table_result result = new alter_table_result(); try { iface.alter_table(args.dbname, args.tbl_name, args.new_tbl); @@ -5960,16 +6054,20 @@ } } - private static class alter_table_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class alter_table_with_environment_context extends org.apache.thrift.ProcessFunction { public alter_table_with_environment_context() { super("alter_table_with_environment_context"); } - protected alter_table_with_environment_context_args getEmptyArgsInstance() { + public alter_table_with_environment_context_args getEmptyArgsInstance() { return new alter_table_with_environment_context_args(); } - protected alter_table_with_environment_context_result getResult(I iface, alter_table_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_table_with_environment_context_result getResult(I iface, alter_table_with_environment_context_args args) throws org.apache.thrift.TException { alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); try { iface.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); @@ -5982,16 +6080,20 @@ } } - private static class add_partition extends org.apache.thrift.ProcessFunction { + public static class add_partition extends org.apache.thrift.ProcessFunction { public add_partition() { super("add_partition"); } - protected add_partition_args getEmptyArgsInstance() { + public add_partition_args getEmptyArgsInstance() { return new add_partition_args(); } - protected add_partition_result getResult(I iface, add_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_partition_result getResult(I iface, add_partition_args args) throws org.apache.thrift.TException { add_partition_result result = new add_partition_result(); try { result.success = iface.add_partition(args.new_part); @@ -6006,16 +6108,20 @@ } } - private static class add_partition_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class add_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public add_partition_with_environment_context() { super("add_partition_with_environment_context"); } - protected add_partition_with_environment_context_args getEmptyArgsInstance() { + public add_partition_with_environment_context_args getEmptyArgsInstance() { return new add_partition_with_environment_context_args(); } - protected add_partition_with_environment_context_result getResult(I iface, add_partition_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_partition_with_environment_context_result getResult(I iface, add_partition_with_environment_context_args args) throws org.apache.thrift.TException { add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); try { result.success = iface.add_partition_with_environment_context(args.new_part, args.environment_context); @@ -6030,16 +6136,20 @@ } } - private static class add_partitions extends org.apache.thrift.ProcessFunction { + public static class add_partitions extends org.apache.thrift.ProcessFunction { public add_partitions() { super("add_partitions"); } - protected add_partitions_args getEmptyArgsInstance() { + public add_partitions_args getEmptyArgsInstance() { return new add_partitions_args(); } - protected add_partitions_result getResult(I iface, add_partitions_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_partitions_result getResult(I iface, add_partitions_args args) throws org.apache.thrift.TException { add_partitions_result result = new add_partitions_result(); try { result.success = iface.add_partitions(args.new_parts); @@ -6055,16 +6165,20 @@ } } - private static class append_partition extends org.apache.thrift.ProcessFunction { + public static class append_partition extends org.apache.thrift.ProcessFunction { public append_partition() { super("append_partition"); } - protected append_partition_args getEmptyArgsInstance() { + public append_partition_args getEmptyArgsInstance() { return new append_partition_args(); } - protected append_partition_result getResult(I iface, append_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public append_partition_result getResult(I iface, append_partition_args args) throws org.apache.thrift.TException { append_partition_result result = new append_partition_result(); try { result.success = iface.append_partition(args.db_name, args.tbl_name, args.part_vals); @@ -6079,16 +6193,20 @@ } } - private static class append_partition_by_name extends org.apache.thrift.ProcessFunction { + public static class append_partition_by_name extends org.apache.thrift.ProcessFunction { public append_partition_by_name() { super("append_partition_by_name"); } - protected append_partition_by_name_args getEmptyArgsInstance() { + public append_partition_by_name_args getEmptyArgsInstance() { return new append_partition_by_name_args(); } - protected append_partition_by_name_result getResult(I iface, append_partition_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public append_partition_by_name_result getResult(I iface, append_partition_by_name_args args) throws org.apache.thrift.TException { append_partition_by_name_result result = new append_partition_by_name_result(); try { result.success = iface.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); @@ -6103,16 +6221,20 @@ } } - private static class drop_partition extends org.apache.thrift.ProcessFunction { + public static class drop_partition extends org.apache.thrift.ProcessFunction { public drop_partition() { super("drop_partition"); } - protected drop_partition_args getEmptyArgsInstance() { + public drop_partition_args getEmptyArgsInstance() { return new drop_partition_args(); } - protected drop_partition_result getResult(I iface, drop_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_partition_result getResult(I iface, drop_partition_args args) throws org.apache.thrift.TException { drop_partition_result result = new drop_partition_result(); try { result.success = iface.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); @@ -6126,16 +6248,20 @@ } } - private static class drop_partition_by_name extends org.apache.thrift.ProcessFunction { + public static class drop_partition_by_name extends org.apache.thrift.ProcessFunction { public drop_partition_by_name() { super("drop_partition_by_name"); } - protected drop_partition_by_name_args getEmptyArgsInstance() { + public drop_partition_by_name_args getEmptyArgsInstance() { return new drop_partition_by_name_args(); } - protected drop_partition_by_name_result getResult(I iface, drop_partition_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_partition_by_name_result getResult(I iface, drop_partition_by_name_args args) throws org.apache.thrift.TException { drop_partition_by_name_result result = new drop_partition_by_name_result(); try { result.success = iface.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); @@ -6149,16 +6275,20 @@ } } - private static class get_partition extends org.apache.thrift.ProcessFunction { + public static class get_partition extends org.apache.thrift.ProcessFunction { public get_partition() { super("get_partition"); } - protected get_partition_args getEmptyArgsInstance() { + public get_partition_args getEmptyArgsInstance() { return new get_partition_args(); } - protected get_partition_result getResult(I iface, get_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_result getResult(I iface, get_partition_args args) throws org.apache.thrift.TException { get_partition_result result = new get_partition_result(); try { result.success = iface.get_partition(args.db_name, args.tbl_name, args.part_vals); @@ -6171,16 +6301,20 @@ } } - private static class get_partition_with_auth extends org.apache.thrift.ProcessFunction { + public static class get_partition_with_auth extends org.apache.thrift.ProcessFunction { public get_partition_with_auth() { super("get_partition_with_auth"); } - protected get_partition_with_auth_args getEmptyArgsInstance() { + public get_partition_with_auth_args getEmptyArgsInstance() { return new get_partition_with_auth_args(); } - protected get_partition_with_auth_result getResult(I iface, get_partition_with_auth_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_with_auth_result getResult(I iface, get_partition_with_auth_args args) throws org.apache.thrift.TException { get_partition_with_auth_result result = new get_partition_with_auth_result(); try { result.success = iface.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); @@ -6193,16 +6327,20 @@ } } - private static class get_partition_by_name extends org.apache.thrift.ProcessFunction { + public static class get_partition_by_name extends org.apache.thrift.ProcessFunction { public get_partition_by_name() { super("get_partition_by_name"); } - protected get_partition_by_name_args getEmptyArgsInstance() { + public get_partition_by_name_args getEmptyArgsInstance() { return new get_partition_by_name_args(); } - protected get_partition_by_name_result getResult(I iface, get_partition_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_by_name_result getResult(I iface, get_partition_by_name_args args) throws org.apache.thrift.TException { get_partition_by_name_result result = new get_partition_by_name_result(); try { result.success = iface.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); @@ -6215,16 +6353,20 @@ } } - private static class get_partitions extends org.apache.thrift.ProcessFunction { + public static class get_partitions extends org.apache.thrift.ProcessFunction { public get_partitions() { super("get_partitions"); } - protected get_partitions_args getEmptyArgsInstance() { + public get_partitions_args getEmptyArgsInstance() { return new get_partitions_args(); } - protected get_partitions_result getResult(I iface, get_partitions_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_result getResult(I iface, get_partitions_args args) throws org.apache.thrift.TException { get_partitions_result result = new get_partitions_result(); try { result.success = iface.get_partitions(args.db_name, args.tbl_name, args.max_parts); @@ -6237,16 +6379,20 @@ } } - private static class get_partitions_with_auth extends org.apache.thrift.ProcessFunction { + public static class get_partitions_with_auth extends org.apache.thrift.ProcessFunction { public get_partitions_with_auth() { super("get_partitions_with_auth"); } - protected get_partitions_with_auth_args getEmptyArgsInstance() { + public get_partitions_with_auth_args getEmptyArgsInstance() { return new get_partitions_with_auth_args(); } - protected get_partitions_with_auth_result getResult(I iface, get_partitions_with_auth_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_with_auth_result getResult(I iface, get_partitions_with_auth_args args) throws org.apache.thrift.TException { get_partitions_with_auth_result result = new get_partitions_with_auth_result(); try { result.success = iface.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); @@ -6259,16 +6405,20 @@ } } - private static class get_partition_names extends org.apache.thrift.ProcessFunction { + public static class get_partition_names extends org.apache.thrift.ProcessFunction { public get_partition_names() { super("get_partition_names"); } - protected get_partition_names_args getEmptyArgsInstance() { + public get_partition_names_args getEmptyArgsInstance() { return new get_partition_names_args(); } - protected get_partition_names_result getResult(I iface, get_partition_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_names_result getResult(I iface, get_partition_names_args args) throws org.apache.thrift.TException { get_partition_names_result result = new get_partition_names_result(); try { result.success = iface.get_partition_names(args.db_name, args.tbl_name, args.max_parts); @@ -6279,16 +6429,20 @@ } } - private static class get_partitions_ps extends org.apache.thrift.ProcessFunction { + public static class get_partitions_ps extends org.apache.thrift.ProcessFunction { public get_partitions_ps() { super("get_partitions_ps"); } - protected get_partitions_ps_args getEmptyArgsInstance() { + public get_partitions_ps_args getEmptyArgsInstance() { return new get_partitions_ps_args(); } - protected get_partitions_ps_result getResult(I iface, get_partitions_ps_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_ps_result getResult(I iface, get_partitions_ps_args args) throws org.apache.thrift.TException { get_partitions_ps_result result = new get_partitions_ps_result(); try { result.success = iface.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); @@ -6301,16 +6455,20 @@ } } - private static class get_partitions_ps_with_auth extends org.apache.thrift.ProcessFunction { + public static class get_partitions_ps_with_auth extends org.apache.thrift.ProcessFunction { public get_partitions_ps_with_auth() { super("get_partitions_ps_with_auth"); } - protected get_partitions_ps_with_auth_args getEmptyArgsInstance() { + public get_partitions_ps_with_auth_args getEmptyArgsInstance() { return new get_partitions_ps_with_auth_args(); } - protected get_partitions_ps_with_auth_result getResult(I iface, get_partitions_ps_with_auth_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_ps_with_auth_result getResult(I iface, get_partitions_ps_with_auth_args args) throws org.apache.thrift.TException { get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); try { result.success = iface.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); @@ -6323,16 +6481,20 @@ } } - private static class get_partition_names_ps extends org.apache.thrift.ProcessFunction { + public static class get_partition_names_ps extends org.apache.thrift.ProcessFunction { public get_partition_names_ps() { super("get_partition_names_ps"); } - protected get_partition_names_ps_args getEmptyArgsInstance() { + public get_partition_names_ps_args getEmptyArgsInstance() { return new get_partition_names_ps_args(); } - protected get_partition_names_ps_result getResult(I iface, get_partition_names_ps_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_names_ps_result getResult(I iface, get_partition_names_ps_args args) throws org.apache.thrift.TException { get_partition_names_ps_result result = new get_partition_names_ps_result(); try { result.success = iface.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); @@ -6345,16 +6507,20 @@ } } - private static class get_partitions_by_filter extends org.apache.thrift.ProcessFunction { + public static class get_partitions_by_filter extends org.apache.thrift.ProcessFunction { public get_partitions_by_filter() { super("get_partitions_by_filter"); } - protected get_partitions_by_filter_args getEmptyArgsInstance() { + public get_partitions_by_filter_args getEmptyArgsInstance() { return new get_partitions_by_filter_args(); } - protected get_partitions_by_filter_result getResult(I iface, get_partitions_by_filter_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_by_filter_result getResult(I iface, get_partitions_by_filter_args args) throws org.apache.thrift.TException { get_partitions_by_filter_result result = new get_partitions_by_filter_result(); try { result.success = iface.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); @@ -6367,16 +6533,20 @@ } } - private static class get_partitions_by_names extends org.apache.thrift.ProcessFunction { + public static class get_partitions_by_names extends org.apache.thrift.ProcessFunction { public get_partitions_by_names() { super("get_partitions_by_names"); } - protected get_partitions_by_names_args getEmptyArgsInstance() { + public get_partitions_by_names_args getEmptyArgsInstance() { return new get_partitions_by_names_args(); } - protected get_partitions_by_names_result getResult(I iface, get_partitions_by_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_by_names_result getResult(I iface, get_partitions_by_names_args args) throws org.apache.thrift.TException { get_partitions_by_names_result result = new get_partitions_by_names_result(); try { result.success = iface.get_partitions_by_names(args.db_name, args.tbl_name, args.names); @@ -6389,16 +6559,20 @@ } } - private static class alter_partition extends org.apache.thrift.ProcessFunction { + public static class alter_partition extends org.apache.thrift.ProcessFunction { public alter_partition() { super("alter_partition"); } - protected alter_partition_args getEmptyArgsInstance() { + public alter_partition_args getEmptyArgsInstance() { return new alter_partition_args(); } - protected alter_partition_result getResult(I iface, alter_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_partition_result getResult(I iface, alter_partition_args args) throws org.apache.thrift.TException { alter_partition_result result = new alter_partition_result(); try { iface.alter_partition(args.db_name, args.tbl_name, args.new_part); @@ -6411,16 +6585,20 @@ } } - private static class alter_partitions extends org.apache.thrift.ProcessFunction { + public static class alter_partitions extends org.apache.thrift.ProcessFunction { public alter_partitions() { super("alter_partitions"); } - protected alter_partitions_args getEmptyArgsInstance() { + public alter_partitions_args getEmptyArgsInstance() { return new alter_partitions_args(); } - protected alter_partitions_result getResult(I iface, alter_partitions_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_partitions_result getResult(I iface, alter_partitions_args args) throws org.apache.thrift.TException { alter_partitions_result result = new alter_partitions_result(); try { iface.alter_partitions(args.db_name, args.tbl_name, args.new_parts); @@ -6433,16 +6611,20 @@ } } - private static class alter_partition_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class alter_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public alter_partition_with_environment_context() { super("alter_partition_with_environment_context"); } - protected alter_partition_with_environment_context_args getEmptyArgsInstance() { + public alter_partition_with_environment_context_args getEmptyArgsInstance() { return new alter_partition_with_environment_context_args(); } - protected alter_partition_with_environment_context_result getResult(I iface, alter_partition_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_partition_with_environment_context_result getResult(I iface, alter_partition_with_environment_context_args args) throws org.apache.thrift.TException { alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); try { iface.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); @@ -6455,16 +6637,20 @@ } } - private static class rename_partition extends org.apache.thrift.ProcessFunction { + public static class rename_partition extends org.apache.thrift.ProcessFunction { public rename_partition() { super("rename_partition"); } - protected rename_partition_args getEmptyArgsInstance() { + public rename_partition_args getEmptyArgsInstance() { return new rename_partition_args(); } - protected rename_partition_result getResult(I iface, rename_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public rename_partition_result getResult(I iface, rename_partition_args args) throws org.apache.thrift.TException { rename_partition_result result = new rename_partition_result(); try { iface.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); @@ -6477,16 +6663,20 @@ } } - private static class get_config_value extends org.apache.thrift.ProcessFunction { + public static class get_config_value extends org.apache.thrift.ProcessFunction { public get_config_value() { super("get_config_value"); } - protected get_config_value_args getEmptyArgsInstance() { + public get_config_value_args getEmptyArgsInstance() { return new get_config_value_args(); } - protected get_config_value_result getResult(I iface, get_config_value_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_config_value_result getResult(I iface, get_config_value_args args) throws org.apache.thrift.TException { get_config_value_result result = new get_config_value_result(); try { result.success = iface.get_config_value(args.name, args.defaultValue); @@ -6497,16 +6687,20 @@ } } - private static class partition_name_to_vals extends org.apache.thrift.ProcessFunction { + public static class partition_name_to_vals extends org.apache.thrift.ProcessFunction { public partition_name_to_vals() { super("partition_name_to_vals"); } - protected partition_name_to_vals_args getEmptyArgsInstance() { + public partition_name_to_vals_args getEmptyArgsInstance() { return new partition_name_to_vals_args(); } - protected partition_name_to_vals_result getResult(I iface, partition_name_to_vals_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public partition_name_to_vals_result getResult(I iface, partition_name_to_vals_args args) throws org.apache.thrift.TException { partition_name_to_vals_result result = new partition_name_to_vals_result(); try { result.success = iface.partition_name_to_vals(args.part_name); @@ -6517,16 +6711,20 @@ } } - private static class partition_name_to_spec extends org.apache.thrift.ProcessFunction { + public static class partition_name_to_spec extends org.apache.thrift.ProcessFunction { public partition_name_to_spec() { super("partition_name_to_spec"); } - protected partition_name_to_spec_args getEmptyArgsInstance() { + public partition_name_to_spec_args getEmptyArgsInstance() { return new partition_name_to_spec_args(); } - protected partition_name_to_spec_result getResult(I iface, partition_name_to_spec_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public partition_name_to_spec_result getResult(I iface, partition_name_to_spec_args args) throws org.apache.thrift.TException { partition_name_to_spec_result result = new partition_name_to_spec_result(); try { result.success = iface.partition_name_to_spec(args.part_name); @@ -6537,16 +6735,20 @@ } } - private static class markPartitionForEvent extends org.apache.thrift.ProcessFunction { + public static class markPartitionForEvent extends org.apache.thrift.ProcessFunction { public markPartitionForEvent() { super("markPartitionForEvent"); } - protected markPartitionForEvent_args getEmptyArgsInstance() { + public markPartitionForEvent_args getEmptyArgsInstance() { return new markPartitionForEvent_args(); } - protected markPartitionForEvent_result getResult(I iface, markPartitionForEvent_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public markPartitionForEvent_result getResult(I iface, markPartitionForEvent_args args) throws org.apache.thrift.TException { markPartitionForEvent_result result = new markPartitionForEvent_result(); try { iface.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); @@ -6567,16 +6769,20 @@ } } - private static class isPartitionMarkedForEvent extends org.apache.thrift.ProcessFunction { + public static class isPartitionMarkedForEvent extends org.apache.thrift.ProcessFunction { public isPartitionMarkedForEvent() { super("isPartitionMarkedForEvent"); } - protected isPartitionMarkedForEvent_args getEmptyArgsInstance() { + public isPartitionMarkedForEvent_args getEmptyArgsInstance() { return new isPartitionMarkedForEvent_args(); } - protected isPartitionMarkedForEvent_result getResult(I iface, isPartitionMarkedForEvent_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public isPartitionMarkedForEvent_result getResult(I iface, isPartitionMarkedForEvent_args args) throws org.apache.thrift.TException { isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); try { result.success = iface.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); @@ -6598,16 +6804,20 @@ } } - private static class add_index extends org.apache.thrift.ProcessFunction { + public static class add_index extends org.apache.thrift.ProcessFunction { public add_index() { super("add_index"); } - protected add_index_args getEmptyArgsInstance() { + public add_index_args getEmptyArgsInstance() { return new add_index_args(); } - protected add_index_result getResult(I iface, add_index_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_index_result getResult(I iface, add_index_args args) throws org.apache.thrift.TException { add_index_result result = new add_index_result(); try { result.success = iface.add_index(args.new_index, args.index_table); @@ -6622,16 +6832,20 @@ } } - private static class alter_index extends org.apache.thrift.ProcessFunction { + public static class alter_index extends org.apache.thrift.ProcessFunction { public alter_index() { super("alter_index"); } - protected alter_index_args getEmptyArgsInstance() { + public alter_index_args getEmptyArgsInstance() { return new alter_index_args(); } - protected alter_index_result getResult(I iface, alter_index_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_index_result getResult(I iface, alter_index_args args) throws org.apache.thrift.TException { alter_index_result result = new alter_index_result(); try { iface.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); @@ -6644,16 +6858,20 @@ } } - private static class drop_index_by_name extends org.apache.thrift.ProcessFunction { + public static class drop_index_by_name extends org.apache.thrift.ProcessFunction { public drop_index_by_name() { super("drop_index_by_name"); } - protected drop_index_by_name_args getEmptyArgsInstance() { + public drop_index_by_name_args getEmptyArgsInstance() { return new drop_index_by_name_args(); } - protected drop_index_by_name_result getResult(I iface, drop_index_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_index_by_name_result getResult(I iface, drop_index_by_name_args args) throws org.apache.thrift.TException { drop_index_by_name_result result = new drop_index_by_name_result(); try { result.success = iface.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); @@ -6667,16 +6885,20 @@ } } - private static class get_index_by_name extends org.apache.thrift.ProcessFunction { + public static class get_index_by_name extends org.apache.thrift.ProcessFunction { public get_index_by_name() { super("get_index_by_name"); } - protected get_index_by_name_args getEmptyArgsInstance() { + public get_index_by_name_args getEmptyArgsInstance() { return new get_index_by_name_args(); } - protected get_index_by_name_result getResult(I iface, get_index_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_index_by_name_result getResult(I iface, get_index_by_name_args args) throws org.apache.thrift.TException { get_index_by_name_result result = new get_index_by_name_result(); try { result.success = iface.get_index_by_name(args.db_name, args.tbl_name, args.index_name); @@ -6689,16 +6911,20 @@ } } - private static class get_indexes extends org.apache.thrift.ProcessFunction { + public static class get_indexes extends org.apache.thrift.ProcessFunction { public get_indexes() { super("get_indexes"); } - protected get_indexes_args getEmptyArgsInstance() { + public get_indexes_args getEmptyArgsInstance() { return new get_indexes_args(); } - protected get_indexes_result getResult(I iface, get_indexes_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_indexes_result getResult(I iface, get_indexes_args args) throws org.apache.thrift.TException { get_indexes_result result = new get_indexes_result(); try { result.success = iface.get_indexes(args.db_name, args.tbl_name, args.max_indexes); @@ -6711,16 +6937,20 @@ } } - private static class get_index_names extends org.apache.thrift.ProcessFunction { + public static class get_index_names extends org.apache.thrift.ProcessFunction { public get_index_names() { super("get_index_names"); } - protected get_index_names_args getEmptyArgsInstance() { + public get_index_names_args getEmptyArgsInstance() { return new get_index_names_args(); } - protected get_index_names_result getResult(I iface, get_index_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_index_names_result getResult(I iface, get_index_names_args args) throws org.apache.thrift.TException { get_index_names_result result = new get_index_names_result(); try { result.success = iface.get_index_names(args.db_name, args.tbl_name, args.max_indexes); @@ -6731,16 +6961,20 @@ } } - private static class update_table_column_statistics extends org.apache.thrift.ProcessFunction { + public static class update_table_column_statistics extends org.apache.thrift.ProcessFunction { public update_table_column_statistics() { super("update_table_column_statistics"); } - protected update_table_column_statistics_args getEmptyArgsInstance() { + public update_table_column_statistics_args getEmptyArgsInstance() { return new update_table_column_statistics_args(); } - protected update_table_column_statistics_result getResult(I iface, update_table_column_statistics_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public update_table_column_statistics_result getResult(I iface, update_table_column_statistics_args args) throws org.apache.thrift.TException { update_table_column_statistics_result result = new update_table_column_statistics_result(); try { result.success = iface.update_table_column_statistics(args.stats_obj); @@ -6758,16 +6992,20 @@ } } - private static class update_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public static class update_partition_column_statistics extends org.apache.thrift.ProcessFunction { public update_partition_column_statistics() { super("update_partition_column_statistics"); } - protected update_partition_column_statistics_args getEmptyArgsInstance() { + public update_partition_column_statistics_args getEmptyArgsInstance() { return new update_partition_column_statistics_args(); } - protected update_partition_column_statistics_result getResult(I iface, update_partition_column_statistics_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public update_partition_column_statistics_result getResult(I iface, update_partition_column_statistics_args args) throws org.apache.thrift.TException { update_partition_column_statistics_result result = new update_partition_column_statistics_result(); try { result.success = iface.update_partition_column_statistics(args.stats_obj); @@ -6785,16 +7023,20 @@ } } - private static class get_table_column_statistics extends org.apache.thrift.ProcessFunction { + public static class get_table_column_statistics extends org.apache.thrift.ProcessFunction { public get_table_column_statistics() { super("get_table_column_statistics"); } - protected get_table_column_statistics_args getEmptyArgsInstance() { + public get_table_column_statistics_args getEmptyArgsInstance() { return new get_table_column_statistics_args(); } - protected get_table_column_statistics_result getResult(I iface, get_table_column_statistics_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_table_column_statistics_result getResult(I iface, get_table_column_statistics_args args) throws org.apache.thrift.TException { get_table_column_statistics_result result = new get_table_column_statistics_result(); try { result.success = iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name); @@ -6811,16 +7053,20 @@ } } - private static class get_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public static class get_partition_column_statistics extends org.apache.thrift.ProcessFunction { public get_partition_column_statistics() { super("get_partition_column_statistics"); } - protected get_partition_column_statistics_args getEmptyArgsInstance() { + public get_partition_column_statistics_args getEmptyArgsInstance() { return new get_partition_column_statistics_args(); } - protected get_partition_column_statistics_result getResult(I iface, get_partition_column_statistics_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_column_statistics_result getResult(I iface, get_partition_column_statistics_args args) throws org.apache.thrift.TException { get_partition_column_statistics_result result = new get_partition_column_statistics_result(); try { result.success = iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); @@ -6837,16 +7083,20 @@ } } - private static class delete_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public static class delete_partition_column_statistics extends org.apache.thrift.ProcessFunction { public delete_partition_column_statistics() { super("delete_partition_column_statistics"); } - protected delete_partition_column_statistics_args getEmptyArgsInstance() { + public delete_partition_column_statistics_args getEmptyArgsInstance() { return new delete_partition_column_statistics_args(); } - protected delete_partition_column_statistics_result getResult(I iface, delete_partition_column_statistics_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public delete_partition_column_statistics_result getResult(I iface, delete_partition_column_statistics_args args) throws org.apache.thrift.TException { delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); try { result.success = iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); @@ -6864,16 +7114,20 @@ } } - private static class delete_table_column_statistics extends org.apache.thrift.ProcessFunction { + public static class delete_table_column_statistics extends org.apache.thrift.ProcessFunction { public delete_table_column_statistics() { super("delete_table_column_statistics"); } - protected delete_table_column_statistics_args getEmptyArgsInstance() { + public delete_table_column_statistics_args getEmptyArgsInstance() { return new delete_table_column_statistics_args(); } - protected delete_table_column_statistics_result getResult(I iface, delete_table_column_statistics_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public delete_table_column_statistics_result getResult(I iface, delete_table_column_statistics_args args) throws org.apache.thrift.TException { delete_table_column_statistics_result result = new delete_table_column_statistics_result(); try { result.success = iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); @@ -6891,16 +7145,20 @@ } } - private static class create_role extends org.apache.thrift.ProcessFunction { + public static class create_role extends org.apache.thrift.ProcessFunction { public create_role() { super("create_role"); } - protected create_role_args getEmptyArgsInstance() { + public create_role_args getEmptyArgsInstance() { return new create_role_args(); } - protected create_role_result getResult(I iface, create_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_role_result getResult(I iface, create_role_args args) throws org.apache.thrift.TException { create_role_result result = new create_role_result(); try { result.success = iface.create_role(args.role); @@ -6912,16 +7170,20 @@ } } - private static class drop_role extends org.apache.thrift.ProcessFunction { + public static class drop_role extends org.apache.thrift.ProcessFunction { public drop_role() { super("drop_role"); } - protected drop_role_args getEmptyArgsInstance() { + public drop_role_args getEmptyArgsInstance() { return new drop_role_args(); } - protected drop_role_result getResult(I iface, drop_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_role_result getResult(I iface, drop_role_args args) throws org.apache.thrift.TException { drop_role_result result = new drop_role_result(); try { result.success = iface.drop_role(args.role_name); @@ -6933,16 +7195,20 @@ } } - private static class get_role_names extends org.apache.thrift.ProcessFunction { + public static class get_role_names extends org.apache.thrift.ProcessFunction { public get_role_names() { super("get_role_names"); } - protected get_role_names_args getEmptyArgsInstance() { + public get_role_names_args getEmptyArgsInstance() { return new get_role_names_args(); } - protected get_role_names_result getResult(I iface, get_role_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_role_names_result getResult(I iface, get_role_names_args args) throws org.apache.thrift.TException { get_role_names_result result = new get_role_names_result(); try { result.success = iface.get_role_names(); @@ -6953,16 +7219,20 @@ } } - private static class grant_role extends org.apache.thrift.ProcessFunction { + public static class grant_role extends org.apache.thrift.ProcessFunction { public grant_role() { super("grant_role"); } - protected grant_role_args getEmptyArgsInstance() { + public grant_role_args getEmptyArgsInstance() { return new grant_role_args(); } - protected grant_role_result getResult(I iface, grant_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public grant_role_result getResult(I iface, grant_role_args args) throws org.apache.thrift.TException { grant_role_result result = new grant_role_result(); try { result.success = iface.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option); @@ -6974,16 +7244,20 @@ } } - private static class revoke_role extends org.apache.thrift.ProcessFunction { + public static class revoke_role extends org.apache.thrift.ProcessFunction { public revoke_role() { super("revoke_role"); } - protected revoke_role_args getEmptyArgsInstance() { + public revoke_role_args getEmptyArgsInstance() { return new revoke_role_args(); } - protected revoke_role_result getResult(I iface, revoke_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public revoke_role_result getResult(I iface, revoke_role_args args) throws org.apache.thrift.TException { revoke_role_result result = new revoke_role_result(); try { result.success = iface.revoke_role(args.role_name, args.principal_name, args.principal_type); @@ -6995,16 +7269,20 @@ } } - private static class list_roles extends org.apache.thrift.ProcessFunction { + public static class list_roles extends org.apache.thrift.ProcessFunction { public list_roles() { super("list_roles"); } - protected list_roles_args getEmptyArgsInstance() { + public list_roles_args getEmptyArgsInstance() { return new list_roles_args(); } - protected list_roles_result getResult(I iface, list_roles_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public list_roles_result getResult(I iface, list_roles_args args) throws org.apache.thrift.TException { list_roles_result result = new list_roles_result(); try { result.success = iface.list_roles(args.principal_name, args.principal_type); @@ -7015,16 +7293,20 @@ } } - private static class get_privilege_set extends org.apache.thrift.ProcessFunction { + public static class get_privilege_set extends org.apache.thrift.ProcessFunction { public get_privilege_set() { super("get_privilege_set"); } - protected get_privilege_set_args getEmptyArgsInstance() { + public get_privilege_set_args getEmptyArgsInstance() { return new get_privilege_set_args(); } - protected get_privilege_set_result getResult(I iface, get_privilege_set_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_privilege_set_result getResult(I iface, get_privilege_set_args args) throws org.apache.thrift.TException { get_privilege_set_result result = new get_privilege_set_result(); try { result.success = iface.get_privilege_set(args.hiveObject, args.user_name, args.group_names); @@ -7035,16 +7317,20 @@ } } - private static class list_privileges extends org.apache.thrift.ProcessFunction { + public static class list_privileges extends org.apache.thrift.ProcessFunction { public list_privileges() { super("list_privileges"); } - protected list_privileges_args getEmptyArgsInstance() { + public list_privileges_args getEmptyArgsInstance() { return new list_privileges_args(); } - protected list_privileges_result getResult(I iface, list_privileges_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public list_privileges_result getResult(I iface, list_privileges_args args) throws org.apache.thrift.TException { list_privileges_result result = new list_privileges_result(); try { result.success = iface.list_privileges(args.principal_name, args.principal_type, args.hiveObject); @@ -7055,16 +7341,20 @@ } } - private static class grant_privileges extends org.apache.thrift.ProcessFunction { + public static class grant_privileges extends org.apache.thrift.ProcessFunction { public grant_privileges() { super("grant_privileges"); } - protected grant_privileges_args getEmptyArgsInstance() { + public grant_privileges_args getEmptyArgsInstance() { return new grant_privileges_args(); } - protected grant_privileges_result getResult(I iface, grant_privileges_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public grant_privileges_result getResult(I iface, grant_privileges_args args) throws org.apache.thrift.TException { grant_privileges_result result = new grant_privileges_result(); try { result.success = iface.grant_privileges(args.privileges); @@ -7076,16 +7366,20 @@ } } - private static class revoke_privileges extends org.apache.thrift.ProcessFunction { + public static class revoke_privileges extends org.apache.thrift.ProcessFunction { public revoke_privileges() { super("revoke_privileges"); } - protected revoke_privileges_args getEmptyArgsInstance() { + public revoke_privileges_args getEmptyArgsInstance() { return new revoke_privileges_args(); } - protected revoke_privileges_result getResult(I iface, revoke_privileges_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public revoke_privileges_result getResult(I iface, revoke_privileges_args args) throws org.apache.thrift.TException { revoke_privileges_result result = new revoke_privileges_result(); try { result.success = iface.revoke_privileges(args.privileges); @@ -7097,16 +7391,20 @@ } } - private static class set_ugi extends org.apache.thrift.ProcessFunction { + public static class set_ugi extends org.apache.thrift.ProcessFunction { public set_ugi() { super("set_ugi"); } - protected set_ugi_args getEmptyArgsInstance() { + public set_ugi_args getEmptyArgsInstance() { return new set_ugi_args(); } - protected set_ugi_result getResult(I iface, set_ugi_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public set_ugi_result getResult(I iface, set_ugi_args args) throws org.apache.thrift.TException { set_ugi_result result = new set_ugi_result(); try { result.success = iface.set_ugi(args.user_name, args.group_names); @@ -7117,16 +7415,20 @@ } } - private static class get_delegation_token extends org.apache.thrift.ProcessFunction { + public static class get_delegation_token extends org.apache.thrift.ProcessFunction { public get_delegation_token() { super("get_delegation_token"); } - protected get_delegation_token_args getEmptyArgsInstance() { + public get_delegation_token_args getEmptyArgsInstance() { return new get_delegation_token_args(); } - protected get_delegation_token_result getResult(I iface, get_delegation_token_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_delegation_token_result getResult(I iface, get_delegation_token_args args) throws org.apache.thrift.TException { get_delegation_token_result result = new get_delegation_token_result(); try { result.success = iface.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name); @@ -7137,16 +7439,20 @@ } } - private static class renew_delegation_token extends org.apache.thrift.ProcessFunction { + public static class renew_delegation_token extends org.apache.thrift.ProcessFunction { public renew_delegation_token() { super("renew_delegation_token"); } - protected renew_delegation_token_args getEmptyArgsInstance() { + public renew_delegation_token_args getEmptyArgsInstance() { return new renew_delegation_token_args(); } - protected renew_delegation_token_result getResult(I iface, renew_delegation_token_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public renew_delegation_token_result getResult(I iface, renew_delegation_token_args args) throws org.apache.thrift.TException { renew_delegation_token_result result = new renew_delegation_token_result(); try { result.success = iface.renew_delegation_token(args.token_str_form); @@ -7158,16 +7464,20 @@ } } - private static class cancel_delegation_token extends org.apache.thrift.ProcessFunction { + public static class cancel_delegation_token extends org.apache.thrift.ProcessFunction { public cancel_delegation_token() { super("cancel_delegation_token"); } - protected cancel_delegation_token_args getEmptyArgsInstance() { + public cancel_delegation_token_args getEmptyArgsInstance() { return new cancel_delegation_token_args(); } - protected cancel_delegation_token_result getResult(I iface, cancel_delegation_token_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public cancel_delegation_token_result getResult(I iface, cancel_delegation_token_args args) throws org.apache.thrift.TException { cancel_delegation_token_result result = new cancel_delegation_token_result(); try { iface.cancel_delegation_token(args.token_str_form); @@ -7185,6 +7495,12 @@ private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_database_argsTupleSchemeFactory()); + } + private Database database; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -7246,7 +7562,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -7405,43 +7720,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DATABASE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.database = new Database(); - this.database.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - this.database.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -7462,6 +7745,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (database != null) { + database.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -7480,6 +7767,90 @@ } } + private static class create_database_argsStandardSchemeFactory implements SchemeFactory { + public create_database_argsStandardScheme getScheme() { + return new create_database_argsStandardScheme(); + } + } + + private static class create_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DATABASE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.database = new Database(); + struct.database.read(iprot); + struct.setDatabaseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.database != null) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + struct.database.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_database_argsTupleSchemeFactory implements SchemeFactory { + public create_database_argsTupleScheme getScheme() { + return new create_database_argsTupleScheme(); + } + } + + private static class create_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDatabase()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetDatabase()) { + struct.database.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.database = new Database(); + struct.database.read(iprot); + struct.setDatabaseIsSet(true); + } + } + } + } public static class create_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -7489,6 +7860,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_database_resultTupleSchemeFactory()); + } + private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required @@ -7558,7 +7935,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -7853,67 +8229,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -7949,6 +8270,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -7967,6 +8289,140 @@ } } + private static class create_database_resultStandardSchemeFactory implements SchemeFactory { + public create_database_resultStandardScheme getScheme() { + return new create_database_resultStandardScheme(); + } + } + + private static class create_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_database_resultTupleSchemeFactory implements SchemeFactory { + public create_database_resultTupleScheme getScheme() { + return new create_database_resultTupleScheme(); + } + } + + private static class create_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -7974,6 +8430,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_database_argsTupleSchemeFactory()); + } + private String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -8035,7 +8497,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -8194,42 +8655,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -8250,6 +8680,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -8268,6 +8699,88 @@ } } + private static class get_database_argsStandardSchemeFactory implements SchemeFactory { + public get_database_argsStandardScheme getScheme() { + return new get_database_argsStandardScheme(); + } + } + + private static class get_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_database_argsTupleSchemeFactory implements SchemeFactory { + public get_database_argsTupleScheme getScheme() { + return new get_database_argsTupleScheme(); + } + } + + private static class get_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + } + } public static class get_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -8277,6 +8790,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_database_resultTupleSchemeFactory()); + } + private Database success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -8346,7 +8865,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -8641,67 +9159,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Database(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -8737,6 +9200,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -8755,6 +9222,140 @@ } } + private static class get_database_resultStandardSchemeFactory implements SchemeFactory { + public get_database_resultStandardScheme getScheme() { + return new get_database_resultStandardScheme(); + } + } + + private static class get_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Database(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_database_resultTupleSchemeFactory implements SchemeFactory { + public get_database_resultTupleScheme getScheme() { + return new get_database_resultTupleScheme(); + } + } + + private static class get_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Database(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class drop_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -8764,6 +9365,12 @@ private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_database_argsTupleSchemeFactory()); + } + private String name; // required private boolean deleteData; // required private boolean cascade; // required @@ -8835,8 +9442,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; private static final int __CASCADE_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -8870,8 +9476,7 @@ * Performs a deep copy on other. */ public drop_database_args(drop_database_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } @@ -8925,16 +9530,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public boolean isCascade() { @@ -8947,16 +9552,16 @@ } public void unsetCascade() { - __isset_bit_vector.clear(__CASCADE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CASCADE_ISSET_ID); } /** Returns true if field cascade is set (has been assigned a value) and false otherwise */ public boolean isSetCascade() { - return __isset_bit_vector.get(__CASCADE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); } public void setCascadeIsSet(boolean value) { - __isset_bit_vector.set(__CASCADE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -9131,64 +9736,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // CASCADE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.cascade = iprot.readBool(); - setCascadeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(CASCADE_FIELD_DESC); - oprot.writeBool(this.cascade); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -9217,6 +9769,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -9230,13 +9783,137 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_database_argsStandardSchemeFactory implements SchemeFactory { + public drop_database_argsStandardScheme getScheme() { + return new drop_database_argsStandardScheme(); + } + } + + private static class drop_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CASCADE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.cascade = iprot.readBool(); + struct.setCascadeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(CASCADE_FIELD_DESC); + oprot.writeBool(struct.cascade); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_database_argsTupleSchemeFactory implements SchemeFactory { + public drop_database_argsTupleScheme getScheme() { + return new drop_database_argsTupleScheme(); + } + } + + private static class drop_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetDeleteData()) { + optionals.set(1); + } + if (struct.isSetCascade()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + if (struct.isSetCascade()) { + oprot.writeBool(struct.cascade); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + if (incoming.get(2)) { + struct.cascade = iprot.readBool(); + struct.setCascadeIsSet(true); + } + } + } + } public static class drop_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -9246,6 +9923,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_database_resultTupleSchemeFactory()); + } + private NoSuchObjectException o1; // required private InvalidOperationException o2; // required private MetaException o3; // required @@ -9315,7 +9998,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -9610,67 +10292,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -9706,6 +10333,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -9724,6 +10352,140 @@ } } + private static class drop_database_resultStandardSchemeFactory implements SchemeFactory { + public drop_database_resultStandardScheme getScheme() { + return new drop_database_resultStandardScheme(); + } + } + + private static class drop_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_database_resultTupleSchemeFactory implements SchemeFactory { + public drop_database_resultTupleScheme getScheme() { + return new drop_database_resultTupleScheme(); + } + } + + private static class drop_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_databases_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -9731,6 +10493,12 @@ private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_databases_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_databases_argsTupleSchemeFactory()); + } + private String pattern; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -9792,7 +10560,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -9951,42 +10718,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PATTERN - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.pattern = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -10007,6 +10743,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10025,6 +10762,88 @@ } } + private static class get_databases_argsStandardSchemeFactory implements SchemeFactory { + public get_databases_argsStandardScheme getScheme() { + return new get_databases_argsStandardScheme(); + } + } + + private static class get_databases_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PATTERN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(struct.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_databases_argsTupleSchemeFactory implements SchemeFactory { + public get_databases_argsTupleScheme getScheme() { + return new get_databases_argsTupleScheme(); + } + } + + private static class get_databases_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPattern()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPattern()) { + oprot.writeString(struct.pattern); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } + } + } + } public static class get_databases_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -10033,6 +10852,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_databases_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_databases_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -10098,7 +10923,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -10345,71 +11169,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); - this.success = new ArrayList(_list128.size); - for (int _i129 = 0; _i129 < _list128.size; ++_i129) - { - String _elem130; // required - _elem130 = iprot.readString(); - this.success.add(_elem130); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter131 : this.success) - { - oprot.writeString(_iter131); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -10437,6 +11202,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10455,13 +11221,158 @@ } } + private static class get_databases_resultStandardSchemeFactory implements SchemeFactory { + public get_databases_resultStandardScheme getScheme() { + return new get_databases_resultStandardScheme(); + } + } + + private static class get_databases_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list256 = iprot.readListBegin(); + struct.success = new ArrayList(_list256.size); + for (int _i257 = 0; _i257 < _list256.size; ++_i257) + { + String _elem258; // required + _elem258 = iprot.readString(); + struct.success.add(_elem258); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter259 : struct.success) + { + oprot.writeString(_iter259); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_databases_resultTupleSchemeFactory implements SchemeFactory { + public get_databases_resultTupleScheme getScheme() { + return new get_databases_resultTupleScheme(); + } + } + + private static class get_databases_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter260 : struct.success) + { + oprot.writeString(_iter260); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list261 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list261.size); + for (int _i262 = 0; _i262 < _list261.size; ++_i262) + { + String _elem263; // required + _elem263 = iprot.readString(); + struct.success.add(_elem263); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_all_databases_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_databases_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_databases_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -10602,30 +11513,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -10639,6 +11531,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10657,6 +11550,62 @@ } } + private static class get_all_databases_argsStandardSchemeFactory implements SchemeFactory { + public get_all_databases_argsStandardScheme getScheme() { + return new get_all_databases_argsStandardScheme(); + } + } + + private static class get_all_databases_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_databases_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_databases_argsTupleSchemeFactory implements SchemeFactory { + public get_all_databases_argsTupleScheme getScheme() { + return new get_all_databases_argsTupleScheme(); + } + } + + private static class get_all_databases_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class get_all_databases_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -10665,6 +11614,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_databases_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_databases_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -10730,7 +11685,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -10977,71 +11931,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list132 = iprot.readListBegin(); - this.success = new ArrayList(_list132.size); - for (int _i133 = 0; _i133 < _list132.size; ++_i133) - { - String _elem134; // required - _elem134 = iprot.readString(); - this.success.add(_elem134); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter135 : this.success) - { - oprot.writeString(_iter135); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -11069,6 +11964,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -11087,6 +11983,145 @@ } } + private static class get_all_databases_resultStandardSchemeFactory implements SchemeFactory { + public get_all_databases_resultStandardScheme getScheme() { + return new get_all_databases_resultStandardScheme(); + } + } + + private static class get_all_databases_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list264 = iprot.readListBegin(); + struct.success = new ArrayList(_list264.size); + for (int _i265 = 0; _i265 < _list264.size; ++_i265) + { + String _elem266; // required + _elem266 = iprot.readString(); + struct.success.add(_elem266); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_databases_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter267 : struct.success) + { + oprot.writeString(_iter267); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_databases_resultTupleSchemeFactory implements SchemeFactory { + public get_all_databases_resultTupleScheme getScheme() { + return new get_all_databases_resultTupleScheme(); + } + } + + private static class get_all_databases_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter268 : struct.success) + { + oprot.writeString(_iter268); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list269 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list269.size); + for (int _i270 = 0; _i270 < _list269.size; ++_i270) + { + String _elem271; // required + _elem271 = iprot.readString(); + struct.success.add(_elem271); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class alter_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -11095,6 +12130,12 @@ private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_database_argsTupleSchemeFactory()); + } + private String dbname; // required private Database db; // required @@ -11160,7 +12201,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -11387,55 +12427,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.db = new Database(); - this.db.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.db != null) { - oprot.writeFieldBegin(DB_FIELD_DESC); - this.db.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -11464,6 +12460,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (db != null) { + db.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -11482,6 +12482,113 @@ } } + private static class alter_database_argsStandardSchemeFactory implements SchemeFactory { + public alter_database_argsStandardScheme getScheme() { + return new alter_database_argsStandardScheme(); + } + } + + private static class alter_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.db = new Database(); + struct.db.read(iprot); + struct.setDbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.db != null) { + oprot.writeFieldBegin(DB_FIELD_DESC); + struct.db.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_database_argsTupleSchemeFactory implements SchemeFactory { + public alter_database_argsTupleScheme getScheme() { + return new alter_database_argsTupleScheme(); + } + } + + private static class alter_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetDb()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetDb()) { + struct.db.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.db = new Database(); + struct.db.read(iprot); + struct.setDbIsSet(true); + } + } + } + } public static class alter_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -11490,6 +12597,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_database_resultTupleSchemeFactory()); + } + private MetaException o1; // required private NoSuchObjectException o2; // required @@ -11555,7 +12668,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -11782,55 +12894,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -11858,6 +12927,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -11876,6 +12946,115 @@ } } + private static class alter_database_resultStandardSchemeFactory implements SchemeFactory { + public alter_database_resultStandardScheme getScheme() { + return new alter_database_resultStandardScheme(); + } + } + + private static class alter_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_database_resultTupleSchemeFactory implements SchemeFactory { + public alter_database_resultTupleScheme getScheme() { + return new alter_database_resultTupleScheme(); + } + } + + private static class alter_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -11883,6 +13062,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_argsTupleSchemeFactory()); + } + private String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -11944,7 +13129,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -12103,42 +13287,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -12159,6 +13312,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -12177,6 +13331,88 @@ } } + private static class get_type_argsStandardSchemeFactory implements SchemeFactory { + public get_type_argsStandardScheme getScheme() { + return new get_type_argsStandardScheme(); + } + } + + private static class get_type_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_argsTupleSchemeFactory implements SchemeFactory { + public get_type_argsTupleScheme getScheme() { + return new get_type_argsTupleScheme(); + } + } + + private static class get_type_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + } + } public static class get_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12186,6 +13422,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_resultTupleSchemeFactory()); + } + private Type success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -12255,7 +13497,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -12550,67 +13791,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Type(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -12646,6 +13832,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -12664,6 +13854,140 @@ } } + private static class get_type_resultStandardSchemeFactory implements SchemeFactory { + public get_type_resultStandardScheme getScheme() { + return new get_type_resultStandardScheme(); + } + } + + private static class get_type_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Type(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_resultTupleSchemeFactory implements SchemeFactory { + public get_type_resultTupleScheme getScheme() { + return new get_type_resultTupleScheme(); + } + } + + private static class get_type_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Type(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class create_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12671,6 +13995,12 @@ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_type_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_type_argsTupleSchemeFactory()); + } + private Type type; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -12732,7 +14062,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -12891,43 +14220,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TYPE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.type = new Type(); - this.type.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - this.type.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -12948,6 +14245,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (type != null) { + type.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -12966,6 +14267,90 @@ } } + private static class create_type_argsStandardSchemeFactory implements SchemeFactory { + public create_type_argsStandardScheme getScheme() { + return new create_type_argsStandardScheme(); + } + } + + private static class create_type_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_type_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.type = new Type(); + struct.type.read(iprot); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_type_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + struct.type.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_type_argsTupleSchemeFactory implements SchemeFactory { + public create_type_argsTupleScheme getScheme() { + return new create_type_argsTupleScheme(); + } + } + + private static class create_type_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetType()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetType()) { + struct.type.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.type = new Type(); + struct.type.read(iprot); + struct.setTypeIsSet(true); + } + } + } + } public static class create_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12976,6 +14361,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_type_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_type_resultTupleSchemeFactory()); + } + private boolean success; // required private AlreadyExistsException o1; // required private InvalidObjectException o2; // required @@ -13050,8 +14441,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -13088,8 +14478,7 @@ * Performs a deep copy on other. */ public create_type_result(create_type_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); @@ -13125,16 +14514,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public AlreadyExistsException getO1() { @@ -13415,79 +14804,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -13527,6 +14849,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -13540,13 +14863,170 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class create_type_resultStandardSchemeFactory implements SchemeFactory { + public create_type_resultStandardScheme getScheme() { + return new create_type_resultStandardScheme(); + } + } + + private static class create_type_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_type_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_type_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_type_resultTupleSchemeFactory implements SchemeFactory { + public create_type_resultTupleScheme getScheme() { + return new create_type_resultTupleScheme(); + } + } + + private static class create_type_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class drop_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -13554,6 +15034,12 @@ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_type_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_type_argsTupleSchemeFactory()); + } + private String type; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -13615,7 +15101,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -13774,42 +15259,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -13830,6 +15284,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -13848,6 +15303,88 @@ } } + private static class drop_type_argsStandardSchemeFactory implements SchemeFactory { + public drop_type_argsStandardScheme getScheme() { + return new drop_type_argsStandardScheme(); + } + } + + private static class drop_type_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_type_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_type_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(struct.type); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_type_argsTupleSchemeFactory implements SchemeFactory { + public drop_type_argsTupleScheme getScheme() { + return new drop_type_argsTupleScheme(); + } + } + + private static class drop_type_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetType()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetType()) { + oprot.writeString(struct.type); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } + } + } + } public static class drop_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -13857,6 +15394,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_type_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_type_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -13927,8 +15470,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -13961,8 +15503,7 @@ * Performs a deep copy on other. */ public drop_type_result(drop_type_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -13994,16 +15535,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -14224,67 +15765,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -14316,6 +15802,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -14329,13 +15816,145 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_type_resultStandardSchemeFactory implements SchemeFactory { + public drop_type_resultStandardScheme getScheme() { + return new drop_type_resultStandardScheme(); + } + } + + private static class drop_type_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_type_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_type_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_type_resultTupleSchemeFactory implements SchemeFactory { + public drop_type_resultTupleScheme getScheme() { + return new drop_type_resultTupleScheme(); + } + } + + private static class drop_type_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_type_all_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -14343,6 +15962,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_all_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_all_argsTupleSchemeFactory()); + } + private String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -14404,7 +16029,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -14563,42 +16187,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -14619,6 +16212,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -14637,6 +16231,88 @@ } } + private static class get_type_all_argsStandardSchemeFactory implements SchemeFactory { + public get_type_all_argsStandardScheme getScheme() { + return new get_type_all_argsStandardScheme(); + } + } + + private static class get_type_all_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_all_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_all_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_all_argsTupleSchemeFactory implements SchemeFactory { + public get_type_all_argsTupleScheme getScheme() { + return new get_type_all_argsTupleScheme(); + } + } + + private static class get_type_all_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_all_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_all_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + } + } public static class get_type_all_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -14645,6 +16321,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_all_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_all_resultTupleSchemeFactory()); + } + private Map success; // required private MetaException o2; // required @@ -14710,7 +16392,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -14962,75 +16643,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map136 = iprot.readMapBegin(); - this.success = new HashMap(2*_map136.size); - for (int _i137 = 0; _i137 < _map136.size; ++_i137) - { - String _key138; // required - Type _val139; // required - _key138 = iprot.readString(); - _val139 = new Type(); - _val139.read(iprot); - this.success.put(_key138, _val139); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Map.Entry _iter140 : this.success.entrySet()) - { - oprot.writeString(_iter140.getKey()); - _iter140.getValue().write(oprot); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -15058,6 +16676,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -15076,6 +16695,153 @@ } } + private static class get_type_all_resultStandardSchemeFactory implements SchemeFactory { + public get_type_all_resultStandardScheme getScheme() { + return new get_type_all_resultStandardScheme(); + } + } + + private static class get_type_all_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_all_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map272 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map272.size); + for (int _i273 = 0; _i273 < _map272.size; ++_i273) + { + String _key274; // required + Type _val275; // required + _key274 = iprot.readString(); + _val275 = new Type(); + _val275.read(iprot); + struct.success.put(_key274, _val275); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_all_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Map.Entry _iter276 : struct.success.entrySet()) + { + oprot.writeString(_iter276.getKey()); + _iter276.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_all_resultTupleSchemeFactory implements SchemeFactory { + public get_type_all_resultTupleScheme getScheme() { + return new get_type_all_resultTupleScheme(); + } + } + + private static class get_type_all_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_all_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter277 : struct.success.entrySet()) + { + oprot.writeString(_iter277.getKey()); + _iter277.getValue().write(oprot); + } + } + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_all_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map278 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map278.size); + for (int _i279 = 0; _i279 < _map278.size; ++_i279) + { + String _key280; // required + Type _val281; // required + _key280 = iprot.readString(); + _val281 = new Type(); + _val281.read(iprot); + struct.success.put(_key280, _val281); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_fields_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -15084,6 +16850,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_fields_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_fields_argsTupleSchemeFactory()); + } + private String db_name; // required private String table_name; // required @@ -15149,7 +16921,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -15376,54 +17147,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.table_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -15452,6 +17180,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -15470,6 +17199,111 @@ } } + private static class get_fields_argsStandardSchemeFactory implements SchemeFactory { + public get_fields_argsStandardScheme getScheme() { + return new get_fields_argsStandardScheme(); + } + } + + private static class get_fields_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_fields_argsTupleSchemeFactory implements SchemeFactory { + public get_fields_argsTupleScheme getScheme() { + return new get_fields_argsTupleScheme(); + } + } + + private static class get_fields_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTable_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + } + } + } public static class get_fields_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -15480,6 +17314,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_fields_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_fields_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private UnknownTableException o2; // required @@ -15553,7 +17393,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -15936,96 +17775,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list141 = iprot.readListBegin(); - this.success = new ArrayList(_list141.size); - for (int _i142 = 0; _i142 < _list141.size; ++_i142) - { - FieldSchema _elem143; // required - _elem143 = new FieldSchema(); - _elem143.read(iprot); - this.success.add(_elem143); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (FieldSchema _iter144 : this.success) - { - _iter144.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -16069,6 +17824,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -16087,6 +17843,197 @@ } } + private static class get_fields_resultStandardSchemeFactory implements SchemeFactory { + public get_fields_resultStandardScheme getScheme() { + return new get_fields_resultStandardScheme(); + } + } + + private static class get_fields_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list282 = iprot.readListBegin(); + struct.success = new ArrayList(_list282.size); + for (int _i283 = 0; _i283 < _list282.size; ++_i283) + { + FieldSchema _elem284; // required + _elem284 = new FieldSchema(); + _elem284.read(iprot); + struct.success.add(_elem284); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FieldSchema _iter285 : struct.success) + { + _iter285.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_fields_resultTupleSchemeFactory implements SchemeFactory { + public get_fields_resultTupleScheme getScheme() { + return new get_fields_resultTupleScheme(); + } + } + + private static class get_fields_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (FieldSchema _iter286 : struct.success) + { + _iter286.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list287.size); + for (int _i288 = 0; _i288 < _list287.size; ++_i288) + { + FieldSchema _elem289; // required + _elem289 = new FieldSchema(); + _elem289.read(iprot); + struct.success.add(_elem289); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_schema_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -16095,6 +18042,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_schema_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_schema_argsTupleSchemeFactory()); + } + private String db_name; // required private String table_name; // required @@ -16160,7 +18113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -16387,54 +18339,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.table_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -16463,6 +18372,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -16481,6 +18391,111 @@ } } + private static class get_schema_argsStandardSchemeFactory implements SchemeFactory { + public get_schema_argsStandardScheme getScheme() { + return new get_schema_argsStandardScheme(); + } + } + + private static class get_schema_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_schema_argsTupleSchemeFactory implements SchemeFactory { + public get_schema_argsTupleScheme getScheme() { + return new get_schema_argsTupleScheme(); + } + } + + private static class get_schema_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTable_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + } + } + } public static class get_schema_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -16491,6 +18506,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_schema_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_schema_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private UnknownTableException o2; // required @@ -16564,7 +18585,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -16947,96 +18967,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list145 = iprot.readListBegin(); - this.success = new ArrayList(_list145.size); - for (int _i146 = 0; _i146 < _list145.size; ++_i146) - { - FieldSchema _elem147; // required - _elem147 = new FieldSchema(); - _elem147.read(iprot); - this.success.add(_elem147); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (FieldSchema _iter148 : this.success) - { - _iter148.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -17080,6 +19016,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -17098,6 +19035,197 @@ } } + private static class get_schema_resultStandardSchemeFactory implements SchemeFactory { + public get_schema_resultStandardScheme getScheme() { + return new get_schema_resultStandardScheme(); + } + } + + private static class get_schema_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list290 = iprot.readListBegin(); + struct.success = new ArrayList(_list290.size); + for (int _i291 = 0; _i291 < _list290.size; ++_i291) + { + FieldSchema _elem292; // required + _elem292 = new FieldSchema(); + _elem292.read(iprot); + struct.success.add(_elem292); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FieldSchema _iter293 : struct.success) + { + _iter293.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_schema_resultTupleSchemeFactory implements SchemeFactory { + public get_schema_resultTupleScheme getScheme() { + return new get_schema_resultTupleScheme(); + } + } + + private static class get_schema_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (FieldSchema _iter294 : struct.success) + { + _iter294.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list295 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list295.size); + for (int _i296 = 0; _i296 < _list295.size; ++_i296) + { + FieldSchema _elem297; // required + _elem297 = new FieldSchema(); + _elem297.read(iprot); + struct.success.add(_elem297); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class create_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -17105,6 +19233,12 @@ private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_argsTupleSchemeFactory()); + } + private Table tbl; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -17166,7 +19300,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -17325,43 +19458,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -17382,6 +19483,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (tbl != null) { + tbl.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -17400,6 +19505,90 @@ } } + private static class create_table_argsStandardSchemeFactory implements SchemeFactory { + public create_table_argsStandardScheme getScheme() { + return new create_table_argsStandardScheme(); + } + } + + private static class create_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + struct.tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_argsTupleSchemeFactory implements SchemeFactory { + public create_table_argsTupleScheme getScheme() { + return new create_table_argsTupleScheme(); + } + } + + private static class create_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTbl()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTbl()) { + struct.tbl.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } + } + } + } public static class create_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -17410,6 +19599,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_resultTupleSchemeFactory()); + } + private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required @@ -17483,7 +19678,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -17846,79 +20040,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -17962,6 +20089,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -17980,6 +20108,165 @@ } } + private static class create_table_resultStandardSchemeFactory implements SchemeFactory { + public create_table_resultStandardScheme getScheme() { + return new create_table_resultStandardScheme(); + } + } + + private static class create_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_resultTupleSchemeFactory implements SchemeFactory { + public create_table_resultTupleScheme getScheme() { + return new create_table_resultTupleScheme(); + } + } + + private static class create_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + if (struct.isSetO4()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(3)) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class create_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -17988,6 +20275,12 @@ private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_with_environment_context_argsTupleSchemeFactory()); + } + private Table tbl; // required private EnvironmentContext environment_context; // required @@ -18053,7 +20346,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -18280,56 +20572,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -18358,6 +20605,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (tbl != null) { + tbl.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -18376,6 +20630,115 @@ } } + private static class create_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_argsStandardScheme getScheme() { + return new create_table_with_environment_context_argsStandardScheme(); + } + } + + private static class create_table_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + struct.tbl.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_argsTupleScheme getScheme() { + return new create_table_with_environment_context_argsTupleScheme(); + } + } + + private static class create_table_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTbl()) { + optionals.set(0); + } + if (struct.isSetEnvironment_context()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTbl()) { + struct.tbl.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } + if (incoming.get(1)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class create_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -18386,6 +20749,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_with_environment_context_resultTupleSchemeFactory()); + } + private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required @@ -18459,7 +20828,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -18822,79 +21190,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -18938,6 +21239,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -18956,6 +21258,165 @@ } } + private static class create_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_resultStandardScheme getScheme() { + return new create_table_with_environment_context_resultStandardScheme(); + } + } + + private static class create_table_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_resultTupleScheme getScheme() { + return new create_table_with_environment_context_resultTupleScheme(); + } + } + + private static class create_table_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + if (struct.isSetO4()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(3)) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class drop_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -18965,6 +21426,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_table_argsTupleSchemeFactory()); + } + private String dbname; // required private String name; // required private boolean deleteData; // required @@ -19035,8 +21502,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -19069,8 +21535,7 @@ * Performs a deep copy on other. */ public drop_table_args(drop_table_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } @@ -19148,16 +21613,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -19332,65 +21797,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -19423,6 +21834,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -19436,13 +21848,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_table_argsStandardSchemeFactory implements SchemeFactory { + public drop_table_argsStandardScheme getScheme() { + return new drop_table_argsStandardScheme(); + } + } + + private static class drop_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_table_argsTupleSchemeFactory implements SchemeFactory { + public drop_table_argsTupleScheme getScheme() { + return new drop_table_argsTupleScheme(); + } + } + + private static class drop_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetName()) { + optionals.set(1); + } + if (struct.isSetDeleteData()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(2)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -19451,6 +21989,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_table_resultTupleSchemeFactory()); + } + private NoSuchObjectException o1; // required private MetaException o3; // required @@ -19516,7 +22060,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -19743,55 +22286,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -19819,6 +22319,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -19837,6 +22338,115 @@ } } + private static class drop_table_resultStandardSchemeFactory implements SchemeFactory { + public drop_table_resultStandardScheme getScheme() { + return new drop_table_resultStandardScheme(); + } + } + + private static class drop_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_table_resultTupleSchemeFactory implements SchemeFactory { + public drop_table_resultTupleScheme getScheme() { + return new drop_table_resultTupleScheme(); + } + } + + private static class drop_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO3()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -19845,6 +22455,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_tables_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_tables_argsTupleSchemeFactory()); + } + private String db_name; // required private String pattern; // required @@ -19910,7 +22526,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -20137,54 +22752,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PATTERN - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.pattern = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -20213,6 +22785,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20231,6 +22804,111 @@ } } + private static class get_tables_argsStandardSchemeFactory implements SchemeFactory { + public get_tables_argsStandardScheme getScheme() { + return new get_tables_argsStandardScheme(); + } + } + + private static class get_tables_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATTERN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(struct.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_tables_argsTupleSchemeFactory implements SchemeFactory { + public get_tables_argsTupleScheme getScheme() { + return new get_tables_argsTupleScheme(); + } + } + + private static class get_tables_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetPattern()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetPattern()) { + oprot.writeString(struct.pattern); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } + } + } + } public static class get_tables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20239,6 +22917,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_tables_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_tables_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -20304,7 +22988,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -20551,71 +23234,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list149 = iprot.readListBegin(); - this.success = new ArrayList(_list149.size); - for (int _i150 = 0; _i150 < _list149.size; ++_i150) - { - String _elem151; // required - _elem151 = iprot.readString(); - this.success.add(_elem151); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter152 : this.success) - { - oprot.writeString(_iter152); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -20643,6 +23267,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20661,6 +23286,145 @@ } } + private static class get_tables_resultStandardSchemeFactory implements SchemeFactory { + public get_tables_resultStandardScheme getScheme() { + return new get_tables_resultStandardScheme(); + } + } + + private static class get_tables_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list298 = iprot.readListBegin(); + struct.success = new ArrayList(_list298.size); + for (int _i299 = 0; _i299 < _list298.size; ++_i299) + { + String _elem300; // required + _elem300 = iprot.readString(); + struct.success.add(_elem300); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter301 : struct.success) + { + oprot.writeString(_iter301); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_tables_resultTupleSchemeFactory implements SchemeFactory { + public get_tables_resultTupleScheme getScheme() { + return new get_tables_resultTupleScheme(); + } + } + + private static class get_tables_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter302 : struct.success) + { + oprot.writeString(_iter302); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list303 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list303.size); + for (int _i304 = 0; _i304 < _list303.size; ++_i304) + { + String _elem305; // required + _elem305 = iprot.readString(); + struct.success.add(_elem305); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_all_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20668,6 +23432,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_tables_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_tables_argsTupleSchemeFactory()); + } + private String db_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -20729,7 +23499,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -20888,42 +23657,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -20944,6 +23682,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20962,6 +23701,88 @@ } } + private static class get_all_tables_argsStandardSchemeFactory implements SchemeFactory { + public get_all_tables_argsStandardScheme getScheme() { + return new get_all_tables_argsStandardScheme(); + } + } + + private static class get_all_tables_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_tables_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_tables_argsTupleSchemeFactory implements SchemeFactory { + public get_all_tables_argsTupleScheme getScheme() { + return new get_all_tables_argsTupleScheme(); + } + } + + private static class get_all_tables_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + } + } + } public static class get_all_tables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20970,6 +23791,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_tables_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_tables_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -21035,7 +23862,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -21282,71 +24108,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list153 = iprot.readListBegin(); - this.success = new ArrayList(_list153.size); - for (int _i154 = 0; _i154 < _list153.size; ++_i154) - { - String _elem155; // required - _elem155 = iprot.readString(); - this.success.add(_elem155); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter156 : this.success) - { - oprot.writeString(_iter156); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -21374,6 +24141,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -21392,6 +24160,145 @@ } } + private static class get_all_tables_resultStandardSchemeFactory implements SchemeFactory { + public get_all_tables_resultStandardScheme getScheme() { + return new get_all_tables_resultStandardScheme(); + } + } + + private static class get_all_tables_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list306 = iprot.readListBegin(); + struct.success = new ArrayList(_list306.size); + for (int _i307 = 0; _i307 < _list306.size; ++_i307) + { + String _elem308; // required + _elem308 = iprot.readString(); + struct.success.add(_elem308); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_tables_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter309 : struct.success) + { + oprot.writeString(_iter309); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_tables_resultTupleSchemeFactory implements SchemeFactory { + public get_all_tables_resultTupleScheme getScheme() { + return new get_all_tables_resultTupleScheme(); + } + } + + private static class get_all_tables_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter310 : struct.success) + { + oprot.writeString(_iter310); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list311 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list311.size); + for (int _i312 = 0; _i312 < _list311.size; ++_i312) + { + String _elem313; // required + _elem313 = iprot.readString(); + struct.success.add(_elem313); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -21400,6 +24307,12 @@ private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_argsTupleSchemeFactory()); + } + private String dbname; // required private String tbl_name; // required @@ -21465,7 +24378,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -21692,54 +24604,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -21768,6 +24637,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -21786,6 +24656,111 @@ } } + private static class get_table_argsStandardSchemeFactory implements SchemeFactory { + public get_table_argsStandardScheme getScheme() { + return new get_table_argsStandardScheme(); + } + } + + private static class get_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_argsTupleSchemeFactory implements SchemeFactory { + public get_table_argsTupleScheme getScheme() { + return new get_table_argsTupleScheme(); + } + } + + private static class get_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + } + } + } public static class get_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -21795,6 +24770,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_resultTupleSchemeFactory()); + } + private Table success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -21864,7 +24845,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -22159,67 +25139,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Table(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -22255,6 +25180,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -22273,6 +25202,140 @@ } } + private static class get_table_resultStandardSchemeFactory implements SchemeFactory { + public get_table_resultStandardScheme getScheme() { + return new get_table_resultStandardScheme(); + } + } + + private static class get_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Table(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_resultTupleSchemeFactory implements SchemeFactory { + public get_table_resultTupleScheme getScheme() { + return new get_table_resultTupleScheme(); + } + } + + private static class get_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Table(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_table_objects_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22281,6 +25344,12 @@ private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_names", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_objects_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_objects_by_name_argsTupleSchemeFactory()); + } + private String dbname; // required private List tbl_names; // required @@ -22346,7 +25415,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -22593,71 +25661,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list157 = iprot.readListBegin(); - this.tbl_names = new ArrayList(_list157.size); - for (int _i158 = 0; _i158 < _list157.size; ++_i158) - { - String _elem159; // required - _elem159 = iprot.readString(); - this.tbl_names.add(_elem159); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_names != null) { - oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.tbl_names.size())); - for (String _iter160 : this.tbl_names) - { - oprot.writeString(_iter160); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -22686,6 +25694,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -22704,6 +25713,143 @@ } } + private static class get_table_objects_by_name_argsStandardSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_argsStandardScheme getScheme() { + return new get_table_objects_by_name_argsStandardScheme(); + } + } + + private static class get_table_objects_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list314 = iprot.readListBegin(); + struct.tbl_names = new ArrayList(_list314.size); + for (int _i315 = 0; _i315 < _list314.size; ++_i315) + { + String _elem316; // required + _elem316 = iprot.readString(); + struct.tbl_names.add(_elem316); + } + iprot.readListEnd(); + } + struct.setTbl_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_names != null) { + oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_names.size())); + for (String _iter317 : struct.tbl_names) + { + oprot.writeString(_iter317); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_objects_by_name_argsTupleSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_argsTupleScheme getScheme() { + return new get_table_objects_by_name_argsTupleScheme(); + } + } + + private static class get_table_objects_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_names()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_names()) { + { + oprot.writeI32(struct.tbl_names.size()); + for (String _iter318 : struct.tbl_names) + { + oprot.writeString(_iter318); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list319 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tbl_names = new ArrayList(_list319.size); + for (int _i320 = 0; _i320 < _list319.size; ++_i320) + { + String _elem321; // required + _elem321 = iprot.readString(); + struct.tbl_names.add(_elem321); + } + } + struct.setTbl_namesIsSet(true); + } + } + } + } public static class get_table_objects_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22714,6 +25860,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_objects_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_objects_by_name_resultTupleSchemeFactory()); + } + private List
success; // required private MetaException o1; // required private InvalidOperationException o2; // required @@ -22787,7 +25939,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -23170,96 +26321,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list161 = iprot.readListBegin(); - this.success = new ArrayList
(_list161.size); - for (int _i162 = 0; _i162 < _list161.size; ++_i162) - { - Table _elem163; // required - _elem163 = new Table(); - _elem163.read(iprot); - this.success.add(_elem163); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Table _iter164 : this.success) - { - _iter164.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -23303,6 +26370,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -23321,6 +26389,197 @@ } } + private static class get_table_objects_by_name_resultStandardSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_resultStandardScheme getScheme() { + return new get_table_objects_by_name_resultStandardScheme(); + } + } + + private static class get_table_objects_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list322 = iprot.readListBegin(); + struct.success = new ArrayList
(_list322.size); + for (int _i323 = 0; _i323 < _list322.size; ++_i323) + { + Table _elem324; // required + _elem324 = new Table(); + _elem324.read(iprot); + struct.success.add(_elem324); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Table _iter325 : struct.success) + { + _iter325.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_objects_by_name_resultTupleSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_resultTupleScheme getScheme() { + return new get_table_objects_by_name_resultTupleScheme(); + } + } + + private static class get_table_objects_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Table _iter326 : struct.success) + { + _iter326.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList
(_list327.size); + for (int _i328 = 0; _i328 < _list327.size; ++_i328) + { + Table _elem329; // required + _elem329 = new Table(); + _elem329.read(iprot); + struct.success.add(_elem329); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_table_names_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -23330,6 +26589,12 @@ private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_tables", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_names_by_filter_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_names_by_filter_argsTupleSchemeFactory()); + } + private String dbname; // required private String filter; // required private short max_tables; // required @@ -23400,8 +26665,7 @@ // isset id assignments private static final int __MAX_TABLES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -23436,8 +26700,7 @@ * 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); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } @@ -23515,16 +26778,16 @@ } public void unsetMax_tables() { - __isset_bit_vector.clear(__MAX_TABLES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); } /** Returns true if field max_tables is set (has been assigned a value) and false otherwise */ public boolean isSetMax_tables() { - return __isset_bit_vector.get(__MAX_TABLES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); } public void setMax_tablesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_TABLES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_TABLES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -23699,65 +26962,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // FILTER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.filter = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_TABLES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_tables = iprot.readI16(); - setMax_tablesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -23790,6 +26999,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -23803,13 +27013,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_table_names_by_filter_argsStandardSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_argsStandardScheme getScheme() { + return new get_table_names_by_filter_argsStandardScheme(); + } + } + + private static class get_table_names_by_filter_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FILTER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_TABLES + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_tables = iprot.readI16(); + struct.setMax_tablesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(struct.filter); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_TABLES_FIELD_DESC); + oprot.writeI16(struct.max_tables); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_names_by_filter_argsTupleSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_argsTupleScheme getScheme() { + return new get_table_names_by_filter_argsTupleScheme(); + } + } + + private static class get_table_names_by_filter_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetFilter()) { + optionals.set(1); + } + if (struct.isSetMax_tables()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetFilter()) { + oprot.writeString(struct.filter); + } + if (struct.isSetMax_tables()) { + oprot.writeI16(struct.max_tables); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } + if (incoming.get(2)) { + struct.max_tables = iprot.readI16(); + struct.setMax_tablesIsSet(true); + } + } + } + } public static class get_table_names_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -23820,6 +27156,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_names_by_filter_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_names_by_filter_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private InvalidOperationException o2; // required @@ -23893,7 +27235,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -24276,95 +27617,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list165 = iprot.readListBegin(); - this.success = new ArrayList(_list165.size); - for (int _i166 = 0; _i166 < _list165.size; ++_i166) - { - String _elem167; // required - _elem167 = iprot.readString(); - this.success.add(_elem167); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter168 : this.success) - { - oprot.writeString(_iter168); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -24408,6 +27666,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -24426,6 +27685,195 @@ } } + private static class get_table_names_by_filter_resultStandardSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_resultStandardScheme getScheme() { + return new get_table_names_by_filter_resultStandardScheme(); + } + } + + private static class get_table_names_by_filter_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list330 = iprot.readListBegin(); + struct.success = new ArrayList(_list330.size); + for (int _i331 = 0; _i331 < _list330.size; ++_i331) + { + String _elem332; // required + _elem332 = iprot.readString(); + struct.success.add(_elem332); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter333 : struct.success) + { + oprot.writeString(_iter333); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_names_by_filter_resultTupleSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_resultTupleScheme getScheme() { + return new get_table_names_by_filter_resultTupleScheme(); + } + } + + private static class get_table_names_by_filter_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter334 : struct.success) + { + oprot.writeString(_iter334); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list335.size); + for (int _i336 = 0; _i336 < _list335.size; ++_i336) + { + String _elem337; // required + _elem337 = iprot.readString(); + struct.success.add(_elem337); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class alter_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -24435,6 +27883,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_argsTupleSchemeFactory()); + } + private String dbname; // required private String tbl_name; // required private Table new_tbl; // required @@ -24504,7 +27958,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -24799,67 +28252,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_tbl = new Table(); - this.new_tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_tbl != null) { - oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); - this.new_tbl.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -24896,6 +28293,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_tbl != null) { + new_tbl.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -24914,6 +28315,136 @@ } } + private static class alter_table_argsStandardSchemeFactory implements SchemeFactory { + public alter_table_argsStandardScheme getScheme() { + return new alter_table_argsStandardScheme(); + } + } + + private static class alter_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_tbl != null) { + oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); + struct.new_tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_argsTupleSchemeFactory implements SchemeFactory { + public alter_table_argsTupleScheme getScheme() { + return new alter_table_argsTupleScheme(); + } + } + + private static class alter_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_tbl()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_tbl()) { + struct.new_tbl.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } + } + } + } public static class alter_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -24922,6 +28453,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -24987,7 +28524,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -25214,55 +28750,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -25290,6 +28783,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -25308,6 +28802,115 @@ } } + private static class alter_table_resultStandardSchemeFactory implements SchemeFactory { + public alter_table_resultStandardScheme getScheme() { + return new alter_table_resultStandardScheme(); + } + } + + private static class alter_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_resultTupleSchemeFactory implements SchemeFactory { + public alter_table_resultTupleScheme getScheme() { + return new alter_table_resultTupleScheme(); + } + } + + private static class alter_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -25318,6 +28921,12 @@ private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_with_environment_context_argsTupleSchemeFactory()); + } + private String dbname; // required private String tbl_name; // required private Table new_tbl; // required @@ -25391,7 +29000,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -25754,80 +29362,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_tbl = new Table(); - this.new_tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_tbl != null) { - oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); - this.new_tbl.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -25872,6 +29411,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_tbl != null) { + new_tbl.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -25890,6 +29436,161 @@ } } + private static class alter_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_argsStandardScheme getScheme() { + return new alter_table_with_environment_context_argsStandardScheme(); + } + } + + private static class alter_table_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_tbl != null) { + oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); + struct.new_tbl.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_argsTupleScheme getScheme() { + return new alter_table_with_environment_context_argsTupleScheme(); + } + } + + private static class alter_table_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_tbl()) { + optionals.set(2); + } + if (struct.isSetEnvironment_context()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_tbl()) { + struct.new_tbl.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class alter_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -25898,6 +29599,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_with_environment_context_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -25963,7 +29670,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -26190,55 +29896,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -26266,6 +29929,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -26284,6 +29948,115 @@ } } + private static class alter_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_resultStandardScheme getScheme() { + return new alter_table_with_environment_context_resultStandardScheme(); + } + } + + private static class alter_table_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_resultTupleScheme getScheme() { + return new alter_table_with_environment_context_resultTupleScheme(); + } + } + + private static class alter_table_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class add_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -26291,6 +30064,12 @@ private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_argsTupleSchemeFactory()); + } + private Partition new_part; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -26352,7 +30131,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -26511,43 +30289,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -26568,6 +30314,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -26586,6 +30336,90 @@ } } + private static class add_partition_argsStandardSchemeFactory implements SchemeFactory { + public add_partition_argsStandardScheme getScheme() { + return new add_partition_argsStandardScheme(); + } + } + + private static class add_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_argsTupleSchemeFactory implements SchemeFactory { + public add_partition_argsTupleScheme getScheme() { + return new add_partition_argsTupleScheme(); + } + } + + private static class add_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_part()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + } + } + } public static class add_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -26596,6 +30430,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -26669,7 +30509,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -27032,79 +30871,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -27148,6 +30920,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -27166,6 +30942,165 @@ } } + private static class add_partition_resultStandardSchemeFactory implements SchemeFactory { + public add_partition_resultStandardScheme getScheme() { + return new add_partition_resultStandardScheme(); + } + } + + private static class add_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_resultTupleSchemeFactory implements SchemeFactory { + public add_partition_resultTupleScheme getScheme() { + return new add_partition_resultTupleScheme(); + } + } + + private static class add_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class add_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -27174,6 +31109,12 @@ private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_with_environment_context_argsTupleSchemeFactory()); + } + private Partition new_part; // required private EnvironmentContext environment_context; // required @@ -27239,7 +31180,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -27466,56 +31406,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -27544,6 +31439,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -27562,6 +31464,115 @@ } } + private static class add_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_argsStandardScheme getScheme() { + return new add_partition_with_environment_context_argsStandardScheme(); + } + } + + private static class add_partition_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_argsTupleScheme getScheme() { + return new add_partition_with_environment_context_argsTupleScheme(); + } + } + + private static class add_partition_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_part()) { + optionals.set(0); + } + if (struct.isSetEnvironment_context()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + if (incoming.get(1)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class add_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -27572,6 +31583,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_with_environment_context_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -27645,7 +31662,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -28008,79 +32024,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -28124,6 +32073,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -28142,6 +32095,165 @@ } } + private static class add_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_resultStandardScheme getScheme() { + return new add_partition_with_environment_context_resultStandardScheme(); + } + } + + private static class add_partition_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_resultTupleScheme getScheme() { + return new add_partition_with_environment_context_resultTupleScheme(); + } + } + + private static class add_partition_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class add_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -28149,6 +32261,12 @@ private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_argsTupleSchemeFactory()); + } + private List new_parts; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -28210,7 +32328,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -28389,60 +32506,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_PARTS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list169 = iprot.readListBegin(); - this.new_parts = new ArrayList(_list169.size); - for (int _i170 = 0; _i170 < _list169.size; ++_i170) - { - Partition _elem171; // required - _elem171 = new Partition(); - _elem171.read(iprot); - this.new_parts.add(_elem171); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_parts != null) { - oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.new_parts.size())); - for (Partition _iter172 : this.new_parts) - { - _iter172.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -28463,6 +32531,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -28481,6 +32550,122 @@ } } + private static class add_partitions_argsStandardSchemeFactory implements SchemeFactory { + public add_partitions_argsStandardScheme getScheme() { + return new add_partitions_argsStandardScheme(); + } + } + + private static class add_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list338 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list338.size); + for (int _i339 = 0; _i339 < _list338.size; ++_i339) + { + Partition _elem340; // required + _elem340 = new Partition(); + _elem340.read(iprot); + struct.new_parts.add(_elem340); + } + iprot.readListEnd(); + } + struct.setNew_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_parts != null) { + oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.new_parts.size())); + for (Partition _iter341 : struct.new_parts) + { + _iter341.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partitions_argsTupleSchemeFactory implements SchemeFactory { + public add_partitions_argsTupleScheme getScheme() { + return new add_partitions_argsTupleScheme(); + } + } + + private static class add_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_parts()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNew_parts()) { + { + oprot.writeI32(struct.new_parts.size()); + for (Partition _iter342 : struct.new_parts) + { + _iter342.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list343.size); + for (int _i344 = 0; _i344 < _list343.size; ++_i344) + { + Partition _elem345; // required + _elem345 = new Partition(); + _elem345.read(iprot); + struct.new_parts.add(_elem345); + } + } + struct.setNew_partsIsSet(true); + } + } + } + } public static class add_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -28491,6 +32676,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_resultTupleSchemeFactory()); + } + private int success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -28565,8 +32756,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -28603,8 +32793,7 @@ * Performs a deep copy on other. */ public add_partitions_result(add_partitions_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); @@ -28640,16 +32829,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public InvalidObjectException getO1() { @@ -28930,79 +33119,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.success = iprot.readI32(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI32(this.success); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -29042,6 +33164,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -29055,13 +33178,170 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class add_partitions_resultStandardSchemeFactory implements SchemeFactory { + public add_partitions_resultStandardScheme getScheme() { + return new add_partitions_resultStandardScheme(); + } + } + + private static class add_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partitions_resultTupleSchemeFactory implements SchemeFactory { + public add_partitions_resultTupleScheme getScheme() { + return new add_partitions_resultTupleScheme(); + } + } + + private static class add_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class append_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -29071,6 +33351,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -29140,7 +33426,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -29455,83 +33740,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list173 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list173.size); - for (int _i174 = 0; _i174 < _list173.size; ++_i174) - { - String _elem175; // required - _elem175 = iprot.readString(); - this.part_vals.add(_elem175); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter176 : this.part_vals) - { - oprot.writeString(_iter176); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -29568,6 +33781,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -29586,6 +33800,166 @@ } } + private static class append_partition_argsStandardSchemeFactory implements SchemeFactory { + public append_partition_argsStandardScheme getScheme() { + return new append_partition_argsStandardScheme(); + } + } + + private static class append_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list346 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list346.size); + for (int _i347 = 0; _i347 < _list346.size; ++_i347) + { + String _elem348; // required + _elem348 = iprot.readString(); + struct.part_vals.add(_elem348); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter349 : struct.part_vals) + { + oprot.writeString(_iter349); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_argsTupleSchemeFactory implements SchemeFactory { + public append_partition_argsTupleScheme getScheme() { + return new append_partition_argsTupleScheme(); + } + } + + private static class append_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter350 : struct.part_vals) + { + oprot.writeString(_iter350); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list351.size); + for (int _i352 = 0; _i352 < _list351.size; ++_i352) + { + String _elem353; // required + _elem353 = iprot.readString(); + struct.part_vals.add(_elem353); + } + } + struct.setPart_valsIsSet(true); + } + } + } + } public static class append_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -29596,6 +33970,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -29669,7 +34049,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -30032,79 +34411,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -30148,6 +34460,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -30166,6 +34482,165 @@ } } + private static class append_partition_resultStandardSchemeFactory implements SchemeFactory { + public append_partition_resultStandardScheme getScheme() { + return new append_partition_resultStandardScheme(); + } + } + + private static class append_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_resultTupleSchemeFactory implements SchemeFactory { + public append_partition_resultTupleScheme getScheme() { + return new append_partition_resultTupleScheme(); + } + } + + private static class append_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class append_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -30175,6 +34650,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -30244,7 +34725,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -30539,66 +35019,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -30635,6 +35060,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -30653,6 +35079,134 @@ } } + private static class append_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { + public append_partition_by_name_argsStandardScheme getScheme() { + return new append_partition_by_name_argsStandardScheme(); + } + } + + private static class append_partition_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { + public append_partition_by_name_argsTupleScheme getScheme() { + return new append_partition_by_name_argsTupleScheme(); + } + } + + private static class append_partition_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class append_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -30663,6 +35217,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_by_name_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -30736,7 +35296,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -31099,79 +35658,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -31215,6 +35707,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -31233,6 +35729,165 @@ } } + private static class append_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { + public append_partition_by_name_resultStandardScheme getScheme() { + return new append_partition_by_name_resultStandardScheme(); + } + } + + private static class append_partition_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { + public append_partition_by_name_resultTupleScheme getScheme() { + return new append_partition_by_name_resultTupleScheme(); + } + } + + private static class append_partition_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class drop_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -31243,6 +35898,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -31317,8 +35978,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -31356,8 +36016,7 @@ * Performs a deep copy on other. */ public drop_partition_args(drop_partition_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -31481,16 +36140,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -31702,94 +36361,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list177 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list177.size); - for (int _i178 = 0; _i178 < _list177.size; ++_i178) - { - String _elem179; // required - _elem179 = iprot.readString(); - this.part_vals.add(_elem179); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter180 : this.part_vals) - { - oprot.writeString(_iter180); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -31830,6 +36406,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -31843,13 +36420,194 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_argsStandardSchemeFactory implements SchemeFactory { + public drop_partition_argsStandardScheme getScheme() { + return new drop_partition_argsStandardScheme(); + } + } + + private static class drop_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list354 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list354.size); + for (int _i355 = 0; _i355 < _list354.size; ++_i355) + { + String _elem356; // required + _elem356 = iprot.readString(); + struct.part_vals.add(_elem356); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter357 : struct.part_vals) + { + oprot.writeString(_iter357); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_argsTupleSchemeFactory implements SchemeFactory { + public drop_partition_argsTupleScheme getScheme() { + return new drop_partition_argsTupleScheme(); + } + } + + private static class drop_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter358 : struct.part_vals) + { + oprot.writeString(_iter358); + } + } + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list359 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list359.size); + for (int _i360 = 0; _i360 < _list359.size; ++_i360) + { + String _elem361; // required + _elem361 = iprot.readString(); + struct.part_vals.add(_elem361); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -31859,6 +36617,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -31929,8 +36693,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -31963,8 +36726,7 @@ * Performs a deep copy on other. */ public drop_partition_result(drop_partition_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -31996,16 +36758,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -32226,67 +36988,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -32318,6 +37025,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -32331,13 +37039,145 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_resultStandardSchemeFactory implements SchemeFactory { + public drop_partition_resultStandardScheme getScheme() { + return new drop_partition_resultStandardScheme(); + } + } + + private static class drop_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_resultTupleSchemeFactory implements SchemeFactory { + public drop_partition_resultTupleScheme getScheme() { + return new drop_partition_resultTupleScheme(); + } + } + + private static class drop_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class drop_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -32348,6 +37188,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -32422,8 +37268,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -32460,8 +37305,7 @@ * Performs a deep copy on other. */ public drop_partition_by_name_args(drop_partition_by_name_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -32566,16 +37410,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -32787,77 +37631,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -32898,6 +37676,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -32911,13 +37690,162 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { + public drop_partition_by_name_argsStandardScheme getScheme() { + return new drop_partition_by_name_argsStandardScheme(); + } + } + + private static class drop_partition_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { + public drop_partition_by_name_argsTupleScheme getScheme() { + return new drop_partition_by_name_argsTupleScheme(); + } + } + + private static class drop_partition_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -32927,6 +37855,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_by_name_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -32997,8 +37931,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -33031,8 +37964,7 @@ * Performs a deep copy on other. */ public drop_partition_by_name_result(drop_partition_by_name_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -33064,16 +37996,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -33294,67 +38226,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -33386,6 +38263,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -33399,13 +38277,145 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { + public drop_partition_by_name_resultStandardScheme getScheme() { + return new drop_partition_by_name_resultStandardScheme(); + } + } + + private static class drop_partition_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { + public drop_partition_by_name_resultTupleScheme getScheme() { + return new drop_partition_by_name_resultTupleScheme(); + } + } + + private static class drop_partition_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -33415,6 +38425,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -33484,7 +38500,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -33799,83 +38814,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list181 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list181.size); - for (int _i182 = 0; _i182 < _list181.size; ++_i182) - { - String _elem183; // required - _elem183 = iprot.readString(); - this.part_vals.add(_elem183); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter184 : this.part_vals) - { - oprot.writeString(_iter184); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -33912,6 +38855,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -33930,6 +38874,166 @@ } } + private static class get_partition_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_argsStandardScheme getScheme() { + return new get_partition_argsStandardScheme(); + } + } + + private static class get_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list362 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list362.size); + for (int _i363 = 0; _i363 < _list362.size; ++_i363) + { + String _elem364; // required + _elem364 = iprot.readString(); + struct.part_vals.add(_elem364); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter365 : struct.part_vals) + { + oprot.writeString(_iter365); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_argsTupleScheme getScheme() { + return new get_partition_argsTupleScheme(); + } + } + + private static class get_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter366 : struct.part_vals) + { + oprot.writeString(_iter366); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list367 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list367.size); + for (int _i368 = 0; _i368 < _list367.size; ++_i368) + { + String _elem369; // required + _elem369 = iprot.readString(); + struct.part_vals.add(_elem369); + } + } + struct.setPart_valsIsSet(true); + } + } + } + } public static class get_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -33939,6 +39043,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_resultTupleSchemeFactory()); + } + private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -34008,7 +39118,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -34303,67 +39412,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -34399,6 +39453,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -34417,6 +39475,140 @@ } } + private static class get_partition_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_resultStandardScheme getScheme() { + return new get_partition_resultStandardScheme(); + } + } + + private static class get_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_resultTupleScheme getScheme() { + return new get_partition_resultTupleScheme(); + } + } + + private static class get_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -34428,6 +39620,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_with_auth_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_with_auth_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -34505,7 +39703,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -34976,124 +40173,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list185 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list185.size); - for (int _i186 = 0; _i186 < _list185.size; ++_i186) - { - String _elem187; // required - _elem187 = iprot.readString(); - this.part_vals.add(_elem187); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list188 = iprot.readListBegin(); - this.group_names = new ArrayList(_list188.size); - for (int _i189 = 0; _i189 < _list188.size; ++_i189) - { - String _elem190; // required - _elem190 = iprot.readString(); - this.group_names.add(_elem190); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter191 : this.part_vals) - { - oprot.writeString(_iter191); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter192 : this.group_names) - { - oprot.writeString(_iter192); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -35146,6 +40230,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -35164,6 +40249,244 @@ } } + private static class get_partition_with_auth_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_with_auth_argsStandardScheme getScheme() { + return new get_partition_with_auth_argsStandardScheme(); + } + } + + private static class get_partition_with_auth_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list370 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list370.size); + for (int _i371 = 0; _i371 < _list370.size; ++_i371) + { + String _elem372; // required + _elem372 = iprot.readString(); + struct.part_vals.add(_elem372); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list373 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list373.size); + for (int _i374 = 0; _i374 < _list373.size; ++_i374) + { + String _elem375; // required + _elem375 = iprot.readString(); + struct.group_names.add(_elem375); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter376 : struct.part_vals) + { + oprot.writeString(_iter376); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter377 : struct.group_names) + { + oprot.writeString(_iter377); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_with_auth_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_with_auth_argsTupleScheme getScheme() { + return new get_partition_with_auth_argsTupleScheme(); + } + } + + private static class get_partition_with_auth_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetUser_name()) { + optionals.set(3); + } + if (struct.isSetGroup_names()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter378 : struct.part_vals) + { + oprot.writeString(_iter378); + } + } + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter379 : struct.group_names) + { + oprot.writeString(_iter379); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list380 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list380.size); + for (int _i381 = 0; _i381 < _list380.size; ++_i381) + { + String _elem382; // required + _elem382 = iprot.readString(); + struct.part_vals.add(_elem382); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list383.size); + for (int _i384 = 0; _i384 < _list383.size; ++_i384) + { + String _elem385; // required + _elem385 = iprot.readString(); + struct.group_names.add(_elem385); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_partition_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -35173,6 +40496,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_with_auth_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_with_auth_resultTupleSchemeFactory()); + } + private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -35242,7 +40571,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -35537,67 +40865,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -35633,6 +40906,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -35651,6 +40928,140 @@ } } + private static class get_partition_with_auth_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_with_auth_resultStandardScheme getScheme() { + return new get_partition_with_auth_resultStandardScheme(); + } + } + + private static class get_partition_with_auth_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_with_auth_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_with_auth_resultTupleScheme getScheme() { + return new get_partition_with_auth_resultTupleScheme(); + } + } + + private static class get_partition_with_auth_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -35660,6 +41071,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -35729,7 +41146,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -36024,66 +41440,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -36120,6 +41481,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -36138,6 +41500,134 @@ } } + private static class get_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_by_name_argsStandardScheme getScheme() { + return new get_partition_by_name_argsStandardScheme(); + } + } + + private static class get_partition_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_by_name_argsTupleScheme getScheme() { + return new get_partition_by_name_argsTupleScheme(); + } + } + + private static class get_partition_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class get_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -36147,6 +41637,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_by_name_resultTupleSchemeFactory()); + } + private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -36216,7 +41712,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -36511,67 +42006,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -36607,6 +42047,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -36625,6 +42069,140 @@ } } + private static class get_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_by_name_resultStandardScheme getScheme() { + return new get_partition_by_name_resultStandardScheme(); + } + } + + private static class get_partition_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_by_name_resultTupleScheme getScheme() { + return new get_partition_by_name_resultTupleScheme(); + } + } + + private static class get_partition_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -36634,6 +42212,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_parts; // required @@ -36704,8 +42288,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -36740,8 +42323,7 @@ * Performs a deep copy on other. */ public get_partitions_args(get_partitions_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -36819,16 +42401,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -37003,65 +42585,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -37094,6 +42622,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -37107,13 +42636,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_argsStandardScheme getScheme() { + return new get_partitions_argsStandardScheme(); + } + } + + private static class get_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_argsTupleScheme getScheme() { + return new get_partitions_argsTupleScheme(); + } + } + + private static class get_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_parts()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -37123,6 +42778,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -37192,7 +42853,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -37507,84 +43167,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list193 = iprot.readListBegin(); - this.success = new ArrayList(_list193.size); - for (int _i194 = 0; _i194 < _list193.size; ++_i194) - { - Partition _elem195; // required - _elem195 = new Partition(); - _elem195.read(iprot); - this.success.add(_elem195); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter196 : this.success) - { - _iter196.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -37620,6 +43208,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -37638,6 +43227,172 @@ } } + private static class get_partitions_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_resultStandardScheme getScheme() { + return new get_partitions_resultStandardScheme(); + } + } + + private static class get_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list386 = iprot.readListBegin(); + struct.success = new ArrayList(_list386.size); + for (int _i387 = 0; _i387 < _list386.size; ++_i387) + { + Partition _elem388; // required + _elem388 = new Partition(); + _elem388.read(iprot); + struct.success.add(_elem388); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter389 : struct.success) + { + _iter389.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_resultTupleScheme getScheme() { + return new get_partitions_resultTupleScheme(); + } + } + + private static class get_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter390 : struct.success) + { + _iter390.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list391 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list391.size); + for (int _i392 = 0; _i392 < _list391.size; ++_i392) + { + Partition _elem393; // required + _elem393 = new Partition(); + _elem393.read(iprot); + struct.success.add(_elem393); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -37649,6 +43404,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_with_auth_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_with_auth_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_parts; // required @@ -37727,8 +43488,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -37772,8 +43532,7 @@ * Performs a deep copy on other. */ public get_partitions_with_auth_args(get_partitions_with_auth_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -37863,16 +43622,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public String getUser_name() { @@ -38182,106 +43941,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list197 = iprot.readListBegin(); - this.group_names = new ArrayList(_list197.size); - for (int _i198 = 0; _i198 < _list197.size; ++_i198) - { - String _elem199; // required - _elem199 = iprot.readString(); - this.group_names.add(_elem199); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter200 : this.group_names) - { - oprot.writeString(_iter200); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -38330,6 +43994,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -38343,13 +44008,217 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_with_auth_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_argsStandardScheme getScheme() { + return new get_partitions_with_auth_argsStandardScheme(); + } + } + + private static class get_partitions_with_auth_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list394 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list394.size); + for (int _i395 = 0; _i395 < _list394.size; ++_i395) + { + String _elem396; // required + _elem396 = iprot.readString(); + struct.group_names.add(_elem396); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter397 : struct.group_names) + { + oprot.writeString(_iter397); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_with_auth_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_argsTupleScheme getScheme() { + return new get_partitions_with_auth_argsTupleScheme(); + } + } + + private static class get_partitions_with_auth_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_parts()) { + optionals.set(2); + } + if (struct.isSetUser_name()) { + optionals.set(3); + } + if (struct.isSetGroup_names()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter398 : struct.group_names) + { + oprot.writeString(_iter398); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + if (incoming.get(3)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list399 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list399.size); + for (int _i400 = 0; _i400 < _list399.size; ++_i400) + { + String _elem401; // required + _elem401 = iprot.readString(); + struct.group_names.add(_elem401); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_partitions_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -38359,6 +44228,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_with_auth_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_with_auth_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -38428,7 +44303,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -38743,84 +44617,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list201 = iprot.readListBegin(); - this.success = new ArrayList(_list201.size); - for (int _i202 = 0; _i202 < _list201.size; ++_i202) - { - Partition _elem203; // required - _elem203 = new Partition(); - _elem203.read(iprot); - this.success.add(_elem203); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter204 : this.success) - { - _iter204.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -38856,6 +44658,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -38874,6 +44677,172 @@ } } + private static class get_partitions_with_auth_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_resultStandardScheme getScheme() { + return new get_partitions_with_auth_resultStandardScheme(); + } + } + + private static class get_partitions_with_auth_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list402 = iprot.readListBegin(); + struct.success = new ArrayList(_list402.size); + for (int _i403 = 0; _i403 < _list402.size; ++_i403) + { + Partition _elem404; // required + _elem404 = new Partition(); + _elem404.read(iprot); + struct.success.add(_elem404); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter405 : struct.success) + { + _iter405.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_with_auth_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_resultTupleScheme getScheme() { + return new get_partitions_with_auth_resultTupleScheme(); + } + } + + private static class get_partitions_with_auth_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter406 : struct.success) + { + _iter406.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list407 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list407.size); + for (int _i408 = 0; _i408 < _list407.size; ++_i408) + { + Partition _elem409; // required + _elem409 = new Partition(); + _elem409.read(iprot); + struct.success.add(_elem409); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -38883,6 +44852,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_parts; // required @@ -38953,8 +44928,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -38989,8 +44963,7 @@ * Performs a deep copy on other. */ public get_partition_names_args(get_partition_names_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -39068,16 +45041,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -39252,65 +45225,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -39343,6 +45262,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -39356,13 +45276,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partition_names_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_names_argsStandardScheme getScheme() { + return new get_partition_names_argsStandardScheme(); + } + } + + private static class get_partition_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_names_argsTupleScheme getScheme() { + return new get_partition_names_argsTupleScheme(); + } + } + + private static class get_partition_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_parts()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partition_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -39371,6 +45417,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o2; // required @@ -39436,7 +45488,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -39683,71 +45734,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list205 = iprot.readListBegin(); - this.success = new ArrayList(_list205.size); - for (int _i206 = 0; _i206 < _list205.size; ++_i206) - { - String _elem207; // required - _elem207 = iprot.readString(); - this.success.add(_elem207); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter208 : this.success) - { - oprot.writeString(_iter208); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -39775,6 +45767,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -39793,6 +45786,145 @@ } } + private static class get_partition_names_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_names_resultStandardScheme getScheme() { + return new get_partition_names_resultStandardScheme(); + } + } + + private static class get_partition_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list410 = iprot.readListBegin(); + struct.success = new ArrayList(_list410.size); + for (int _i411 = 0; _i411 < _list410.size; ++_i411) + { + String _elem412; // required + _elem412 = iprot.readString(); + struct.success.add(_elem412); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter413 : struct.success) + { + oprot.writeString(_iter413); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_names_resultTupleScheme getScheme() { + return new get_partition_names_resultTupleScheme(); + } + } + + private static class get_partition_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter414 : struct.success) + { + oprot.writeString(_iter414); + } + } + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list415 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list415.size); + for (int _i416 = 0; _i416 < _list415.size; ++_i416) + { + String _elem417; // required + _elem417 = iprot.readString(); + struct.success.add(_elem417); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_ps_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -39803,6 +45935,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -39877,8 +46015,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -39918,8 +46055,7 @@ * Performs a deep copy on other. */ public get_partitions_ps_args(get_partitions_ps_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -40043,16 +46179,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -40264,94 +46400,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list209 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list209.size); - for (int _i210 = 0; _i210 < _list209.size; ++_i210) - { - String _elem211; // required - _elem211 = iprot.readString(); - this.part_vals.add(_elem211); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter212 : this.part_vals) - { - oprot.writeString(_iter212); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -40392,6 +46445,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -40405,13 +46459,194 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_ps_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_argsStandardScheme getScheme() { + return new get_partitions_ps_argsStandardScheme(); + } + } + + private static class get_partitions_ps_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list418 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list418.size); + for (int _i419 = 0; _i419 < _list418.size; ++_i419) + { + String _elem420; // required + _elem420 = iprot.readString(); + struct.part_vals.add(_elem420); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter421 : struct.part_vals) + { + oprot.writeString(_iter421); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_argsTupleScheme getScheme() { + return new get_partitions_ps_argsTupleScheme(); + } + } + + private static class get_partitions_ps_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter422 : struct.part_vals) + { + oprot.writeString(_iter422); + } + } + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list423 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list423.size); + for (int _i424 = 0; _i424 < _list423.size; ++_i424) + { + String _elem425; // required + _elem425 = iprot.readString(); + struct.part_vals.add(_elem425); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partitions_ps_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -40421,6 +46656,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -40490,7 +46731,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -40805,84 +47045,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list213 = iprot.readListBegin(); - this.success = new ArrayList(_list213.size); - for (int _i214 = 0; _i214 < _list213.size; ++_i214) - { - Partition _elem215; // required - _elem215 = new Partition(); - _elem215.read(iprot); - this.success.add(_elem215); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter216 : this.success) - { - _iter216.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -40918,6 +47086,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -40936,6 +47105,172 @@ } } + private static class get_partitions_ps_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_resultStandardScheme getScheme() { + return new get_partitions_ps_resultStandardScheme(); + } + } + + private static class get_partitions_ps_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list426 = iprot.readListBegin(); + struct.success = new ArrayList(_list426.size); + for (int _i427 = 0; _i427 < _list426.size; ++_i427) + { + Partition _elem428; // required + _elem428 = new Partition(); + _elem428.read(iprot); + struct.success.add(_elem428); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter429 : struct.success) + { + _iter429.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_resultTupleScheme getScheme() { + return new get_partitions_ps_resultTupleScheme(); + } + } + + private static class get_partitions_ps_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter430 : struct.success) + { + _iter430.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list431 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list431.size); + for (int _i432 = 0; _i432 < _list431.size; ++_i432) + { + Partition _elem433; // required + _elem433 = new Partition(); + _elem433.read(iprot); + struct.success.add(_elem433); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_ps_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -40948,6 +47283,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_with_auth_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_with_auth_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -41030,8 +47371,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -41080,8 +47420,7 @@ * Performs a deep copy on other. */ public get_partitions_ps_with_auth_args(get_partitions_ps_with_auth_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -41217,16 +47556,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public String getUser_name() { @@ -41573,135 +47912,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list217 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list217.size); - for (int _i218 = 0; _i218 < _list217.size; ++_i218) - { - String _elem219; // required - _elem219 = iprot.readString(); - this.part_vals.add(_elem219); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list220 = iprot.readListBegin(); - this.group_names = new ArrayList(_list220.size); - for (int _i221 = 0; _i221 < _list220.size; ++_i221) - { - String _elem222; // required - _elem222 = iprot.readString(); - this.group_names.add(_elem222); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter223 : this.part_vals) - { - oprot.writeString(_iter223); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter224 : this.group_names) - { - oprot.writeString(_iter224); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -41758,6 +47973,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -41771,13 +47987,272 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_ps_with_auth_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_argsStandardScheme getScheme() { + return new get_partitions_ps_with_auth_argsStandardScheme(); + } + } + + private static class get_partitions_ps_with_auth_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list434 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list434.size); + for (int _i435 = 0; _i435 < _list434.size; ++_i435) + { + String _elem436; // required + _elem436 = iprot.readString(); + struct.part_vals.add(_elem436); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list437 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list437.size); + for (int _i438 = 0; _i438 < _list437.size; ++_i438) + { + String _elem439; // required + _elem439 = iprot.readString(); + struct.group_names.add(_elem439); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter440 : struct.part_vals) + { + oprot.writeString(_iter440); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter441 : struct.group_names) + { + oprot.writeString(_iter441); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_with_auth_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_argsTupleScheme getScheme() { + return new get_partitions_ps_with_auth_argsTupleScheme(); + } + } + + private static class get_partitions_ps_with_auth_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + if (struct.isSetUser_name()) { + optionals.set(4); + } + if (struct.isSetGroup_names()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter442 : struct.part_vals) + { + oprot.writeString(_iter442); + } + } + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter443 : struct.group_names) + { + oprot.writeString(_iter443); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list444 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list444.size); + for (int _i445 = 0; _i445 < _list444.size; ++_i445) + { + String _elem446; // required + _elem446 = iprot.readString(); + struct.part_vals.add(_elem446); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + if (incoming.get(4)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list447 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list447.size); + for (int _i448 = 0; _i448 < _list447.size; ++_i448) + { + String _elem449; // required + _elem449 = iprot.readString(); + struct.group_names.add(_elem449); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_partitions_ps_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -41787,6 +48262,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_with_auth_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_with_auth_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -41856,7 +48337,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -42171,84 +48651,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list225 = iprot.readListBegin(); - this.success = new ArrayList(_list225.size); - for (int _i226 = 0; _i226 < _list225.size; ++_i226) - { - Partition _elem227; // required - _elem227 = new Partition(); - _elem227.read(iprot); - this.success.add(_elem227); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter228 : this.success) - { - _iter228.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -42284,6 +48692,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -42302,6 +48711,172 @@ } } + private static class get_partitions_ps_with_auth_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_resultStandardScheme getScheme() { + return new get_partitions_ps_with_auth_resultStandardScheme(); + } + } + + private static class get_partitions_ps_with_auth_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list450 = iprot.readListBegin(); + struct.success = new ArrayList(_list450.size); + for (int _i451 = 0; _i451 < _list450.size; ++_i451) + { + Partition _elem452; // required + _elem452 = new Partition(); + _elem452.read(iprot); + struct.success.add(_elem452); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter453 : struct.success) + { + _iter453.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_with_auth_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_resultTupleScheme getScheme() { + return new get_partitions_ps_with_auth_resultTupleScheme(); + } + } + + private static class get_partitions_ps_with_auth_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter454 : struct.success) + { + _iter454.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list455 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list455.size); + for (int _i456 = 0; _i456 < _list455.size; ++_i456) + { + Partition _elem457; // required + _elem457 = new Partition(); + _elem457.read(iprot); + struct.success.add(_elem457); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_names_ps_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -42312,6 +48887,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_ps_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_ps_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -42386,8 +48967,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -42427,8 +49007,7 @@ * Performs a deep copy on other. */ public get_partition_names_ps_args(get_partition_names_ps_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -42552,16 +49131,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -42773,94 +49352,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list229 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list229.size); - for (int _i230 = 0; _i230 < _list229.size; ++_i230) - { - String _elem231; // required - _elem231 = iprot.readString(); - this.part_vals.add(_elem231); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter232 : this.part_vals) - { - oprot.writeString(_iter232); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -42901,6 +49397,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -42914,13 +49411,194 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partition_names_ps_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_names_ps_argsStandardScheme getScheme() { + return new get_partition_names_ps_argsStandardScheme(); + } + } + + private static class get_partition_names_ps_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list458 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list458.size); + for (int _i459 = 0; _i459 < _list458.size; ++_i459) + { + String _elem460; // required + _elem460 = iprot.readString(); + struct.part_vals.add(_elem460); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter461 : struct.part_vals) + { + oprot.writeString(_iter461); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_ps_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_names_ps_argsTupleScheme getScheme() { + return new get_partition_names_ps_argsTupleScheme(); + } + } + + private static class get_partition_names_ps_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter462 : struct.part_vals) + { + oprot.writeString(_iter462); + } + } + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list463 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list463.size); + for (int _i464 = 0; _i464 < _list463.size; ++_i464) + { + String _elem465; // required + _elem465 = iprot.readString(); + struct.part_vals.add(_elem465); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partition_names_ps_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -42930,6 +49608,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_ps_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_ps_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -42999,7 +49683,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -43314,83 +49997,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list233 = iprot.readListBegin(); - this.success = new ArrayList(_list233.size); - for (int _i234 = 0; _i234 < _list233.size; ++_i234) - { - String _elem235; // required - _elem235 = iprot.readString(); - this.success.add(_elem235); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter236 : this.success) - { - oprot.writeString(_iter236); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -43426,6 +50038,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -43444,6 +50057,170 @@ } } + private static class get_partition_names_ps_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_names_ps_resultStandardScheme getScheme() { + return new get_partition_names_ps_resultStandardScheme(); + } + } + + private static class get_partition_names_ps_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list466 = iprot.readListBegin(); + struct.success = new ArrayList(_list466.size); + for (int _i467 = 0; _i467 < _list466.size; ++_i467) + { + String _elem468; // required + _elem468 = iprot.readString(); + struct.success.add(_elem468); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter469 : struct.success) + { + oprot.writeString(_iter469); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_ps_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_names_ps_resultTupleScheme getScheme() { + return new get_partition_names_ps_resultTupleScheme(); + } + } + + private static class get_partition_names_ps_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter470 : struct.success) + { + oprot.writeString(_iter470); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list471 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list471.size); + for (int _i472 = 0; _i472 < _list471.size; ++_i472) + { + String _elem473; // required + _elem473 = iprot.readString(); + struct.success.add(_elem473); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -43454,6 +50231,12 @@ private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_filter_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_filter_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String filter; // required @@ -43528,8 +50311,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -43568,8 +50350,7 @@ * Performs a deep copy on other. */ public get_partitions_by_filter_args(get_partitions_by_filter_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -43674,16 +50455,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -43895,77 +50676,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // FILTER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.filter = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.filter != null) { - oprot.writeFieldBegin(FILTER_FIELD_DESC); - oprot.writeString(this.filter); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -44006,6 +50721,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -44019,13 +50735,162 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_by_filter_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_argsStandardScheme getScheme() { + return new get_partitions_by_filter_argsStandardScheme(); + } + } + + private static class get_partitions_by_filter_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FILTER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(struct.filter); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_filter_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_argsTupleScheme getScheme() { + return new get_partitions_by_filter_argsTupleScheme(); + } + } + + private static class get_partitions_by_filter_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetFilter()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetFilter()) { + oprot.writeString(struct.filter); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partitions_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -44035,6 +50900,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_filter_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_filter_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -44104,7 +50975,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -44419,84 +51289,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list237 = iprot.readListBegin(); - this.success = new ArrayList(_list237.size); - for (int _i238 = 0; _i238 < _list237.size; ++_i238) - { - Partition _elem239; // required - _elem239 = new Partition(); - _elem239.read(iprot); - this.success.add(_elem239); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter240 : this.success) - { - _iter240.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -44532,6 +51330,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -44550,6 +51349,172 @@ } } + private static class get_partitions_by_filter_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_resultStandardScheme getScheme() { + return new get_partitions_by_filter_resultStandardScheme(); + } + } + + private static class get_partitions_by_filter_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list474 = iprot.readListBegin(); + struct.success = new ArrayList(_list474.size); + for (int _i475 = 0; _i475 < _list474.size; ++_i475) + { + Partition _elem476; // required + _elem476 = new Partition(); + _elem476.read(iprot); + struct.success.add(_elem476); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter477 : struct.success) + { + _iter477.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_filter_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_resultTupleScheme getScheme() { + return new get_partitions_by_filter_resultTupleScheme(); + } + } + + private static class get_partitions_by_filter_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter478 : struct.success) + { + _iter478.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list479 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list479.size); + for (int _i480 = 0; _i480 < _list479.size; ++_i480) + { + Partition _elem481; // required + _elem481 = new Partition(); + _elem481.read(iprot); + struct.success.add(_elem481); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_by_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -44559,6 +51524,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("names", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_names_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List names; // required @@ -44628,7 +51599,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -44943,83 +51913,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list241 = iprot.readListBegin(); - this.names = new ArrayList(_list241.size); - for (int _i242 = 0; _i242 < _list241.size; ++_i242) - { - String _elem243; // required - _elem243 = iprot.readString(); - this.names.add(_elem243); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.names != null) { - oprot.writeFieldBegin(NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.names.size())); - for (String _iter244 : this.names) - { - oprot.writeString(_iter244); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -45056,6 +51954,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -45074,6 +51973,166 @@ } } + private static class get_partitions_by_names_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_names_argsStandardScheme getScheme() { + return new get_partitions_by_names_argsStandardScheme(); + } + } + + private static class get_partitions_by_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list482 = iprot.readListBegin(); + struct.names = new ArrayList(_list482.size); + for (int _i483 = 0; _i483 < _list482.size; ++_i483) + { + String _elem484; // required + _elem484 = iprot.readString(); + struct.names.add(_elem484); + } + iprot.readListEnd(); + } + struct.setNamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.names != null) { + oprot.writeFieldBegin(NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.names.size())); + for (String _iter485 : struct.names) + { + oprot.writeString(_iter485); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_names_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_names_argsTupleScheme getScheme() { + return new get_partitions_by_names_argsTupleScheme(); + } + } + + private static class get_partitions_by_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNames()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNames()) { + { + oprot.writeI32(struct.names.size()); + for (String _iter486 : struct.names) + { + oprot.writeString(_iter486); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list487 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.names = new ArrayList(_list487.size); + for (int _i488 = 0; _i488 < _list487.size; ++_i488) + { + String _elem489; // required + _elem489 = iprot.readString(); + struct.names.add(_elem489); + } + } + struct.setNamesIsSet(true); + } + } + } + } public static class get_partitions_by_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -45083,6 +52142,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -45152,7 +52217,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -45467,84 +52531,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list245 = iprot.readListBegin(); - this.success = new ArrayList(_list245.size); - for (int _i246 = 0; _i246 < _list245.size; ++_i246) - { - Partition _elem247; // required - _elem247 = new Partition(); - _elem247.read(iprot); - this.success.add(_elem247); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter248 : this.success) - { - _iter248.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -45580,6 +52572,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -45598,6 +52591,172 @@ } } + private static class get_partitions_by_names_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_names_resultStandardScheme getScheme() { + return new get_partitions_by_names_resultStandardScheme(); + } + } + + private static class get_partitions_by_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list490 = iprot.readListBegin(); + struct.success = new ArrayList(_list490.size); + for (int _i491 = 0; _i491 < _list490.size; ++_i491) + { + Partition _elem492; // required + _elem492 = new Partition(); + _elem492.read(iprot); + struct.success.add(_elem492); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter493 : struct.success) + { + _iter493.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_names_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_names_resultTupleScheme getScheme() { + return new get_partitions_by_names_resultTupleScheme(); + } + } + + private static class get_partitions_by_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter494 : struct.success) + { + _iter494.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list495 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list495.size); + for (int _i496 = 0; _i496 < _list495.size; ++_i496) + { + Partition _elem497; // required + _elem497 = new Partition(); + _elem497.read(iprot); + struct.success.add(_elem497); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -45607,6 +52766,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Partition new_part; // required @@ -45676,7 +52841,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -45971,67 +53135,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -46068,6 +53176,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -46086,6 +53198,136 @@ } } + private static class alter_partition_argsStandardSchemeFactory implements SchemeFactory { + public alter_partition_argsStandardScheme getScheme() { + return new alter_partition_argsStandardScheme(); + } + } + + private static class alter_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_argsTupleSchemeFactory implements SchemeFactory { + public alter_partition_argsTupleScheme getScheme() { + return new alter_partition_argsTupleScheme(); + } + } + + private static class alter_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_part()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + } + } + } public static class alter_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -46094,6 +53336,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -46159,7 +53407,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -46386,55 +53633,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -46462,6 +53666,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -46480,6 +53685,115 @@ } } + private static class alter_partition_resultStandardSchemeFactory implements SchemeFactory { + public alter_partition_resultStandardScheme getScheme() { + return new alter_partition_resultStandardScheme(); + } + } + + private static class alter_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_resultTupleSchemeFactory implements SchemeFactory { + public alter_partition_resultTupleScheme getScheme() { + return new alter_partition_resultTupleScheme(); + } + } + + private static class alter_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -46489,6 +53803,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partitions_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List new_parts; // required @@ -46558,7 +53878,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -46873,84 +54192,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_PARTS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list249 = iprot.readListBegin(); - this.new_parts = new ArrayList(_list249.size); - for (int _i250 = 0; _i250 < _list249.size; ++_i250) - { - Partition _elem251; // required - _elem251 = new Partition(); - _elem251.read(iprot); - this.new_parts.add(_elem251); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_parts != null) { - oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.new_parts.size())); - for (Partition _iter252 : this.new_parts) - { - _iter252.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -46987,6 +54233,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -47005,6 +54252,168 @@ } } + private static class alter_partitions_argsStandardSchemeFactory implements SchemeFactory { + public alter_partitions_argsStandardScheme getScheme() { + return new alter_partitions_argsStandardScheme(); + } + } + + private static class alter_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list498 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list498.size); + for (int _i499 = 0; _i499 < _list498.size; ++_i499) + { + Partition _elem500; // required + _elem500 = new Partition(); + _elem500.read(iprot); + struct.new_parts.add(_elem500); + } + iprot.readListEnd(); + } + struct.setNew_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_parts != null) { + oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.new_parts.size())); + for (Partition _iter501 : struct.new_parts) + { + _iter501.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partitions_argsTupleSchemeFactory implements SchemeFactory { + public alter_partitions_argsTupleScheme getScheme() { + return new alter_partitions_argsTupleScheme(); + } + } + + private static class alter_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_parts()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_parts()) { + { + oprot.writeI32(struct.new_parts.size()); + for (Partition _iter502 : struct.new_parts) + { + _iter502.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list503 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list503.size); + for (int _i504 = 0; _i504 < _list503.size; ++_i504) + { + Partition _elem505; // required + _elem505 = new Partition(); + _elem505.read(iprot); + struct.new_parts.add(_elem505); + } + } + struct.setNew_partsIsSet(true); + } + } + } + } public static class alter_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -47013,6 +54422,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partitions_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -47078,7 +54493,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -47305,55 +54719,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -47381,6 +54752,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -47399,6 +54771,115 @@ } } + private static class alter_partitions_resultStandardSchemeFactory implements SchemeFactory { + public alter_partitions_resultStandardScheme getScheme() { + return new alter_partitions_resultStandardScheme(); + } + } + + private static class alter_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partitions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partitions_resultTupleSchemeFactory implements SchemeFactory { + public alter_partitions_resultTupleScheme getScheme() { + return new alter_partitions_resultTupleScheme(); + } + } + + private static class alter_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -47409,6 +54890,12 @@ private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_with_environment_context_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Partition new_part; // required @@ -47482,7 +54969,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -47845,80 +55331,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -47963,6 +55380,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -47981,6 +55405,161 @@ } } + private static class alter_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_argsStandardScheme getScheme() { + return new alter_partition_with_environment_context_argsStandardScheme(); + } + } + + private static class alter_partition_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_argsTupleScheme getScheme() { + return new alter_partition_with_environment_context_argsTupleScheme(); + } + } + + private static class alter_partition_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_part()) { + optionals.set(2); + } + if (struct.isSetEnvironment_context()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class alter_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -47989,6 +55568,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_with_environment_context_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -48054,7 +55639,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -48281,55 +55865,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -48357,6 +55898,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -48375,6 +55917,115 @@ } } + private static class alter_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_resultStandardScheme getScheme() { + return new alter_partition_with_environment_context_resultStandardScheme(); + } + } + + private static class alter_partition_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_resultTupleScheme getScheme() { + return new alter_partition_with_environment_context_resultTupleScheme(); + } + } + + private static class alter_partition_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class rename_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -48385,6 +56036,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new rename_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new rename_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -48458,7 +56115,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -48841,96 +56497,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list253 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list253.size); - for (int _i254 = 0; _i254 < _list253.size; ++_i254) - { - String _elem255; // required - _elem255 = iprot.readString(); - this.part_vals.add(_elem255); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter256 : this.part_vals) - { - oprot.writeString(_iter256); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -48975,6 +56546,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -48993,6 +56568,191 @@ } } + private static class rename_partition_argsStandardSchemeFactory implements SchemeFactory { + public rename_partition_argsStandardScheme getScheme() { + return new rename_partition_argsStandardScheme(); + } + } + + private static class rename_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list506 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list506.size); + for (int _i507 = 0; _i507 < _list506.size; ++_i507) + { + String _elem508; // required + _elem508 = iprot.readString(); + struct.part_vals.add(_elem508); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, rename_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter509 : struct.part_vals) + { + oprot.writeString(_iter509); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class rename_partition_argsTupleSchemeFactory implements SchemeFactory { + public rename_partition_argsTupleScheme getScheme() { + return new rename_partition_argsTupleScheme(); + } + } + + private static class rename_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, rename_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetNew_part()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter510 : struct.part_vals) + { + oprot.writeString(_iter510); + } + } + } + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list511 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list511.size); + for (int _i512 = 0; _i512 < _list511.size; ++_i512) + { + String _elem513; // required + _elem513 = iprot.readString(); + struct.part_vals.add(_elem513); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + } + } + } public static class rename_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -49001,6 +56761,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new rename_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new rename_partition_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -49066,7 +56832,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -49293,55 +57058,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -49369,6 +57091,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -49387,6 +57110,115 @@ } } + private static class rename_partition_resultStandardSchemeFactory implements SchemeFactory { + public rename_partition_resultStandardScheme getScheme() { + return new rename_partition_resultStandardScheme(); + } + } + + private static class rename_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, rename_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class rename_partition_resultTupleSchemeFactory implements SchemeFactory { + public rename_partition_resultTupleScheme getScheme() { + return new rename_partition_resultTupleScheme(); + } + } + + private static class rename_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, rename_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_config_value_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -49395,6 +57227,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultValue", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_config_value_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_config_value_argsTupleSchemeFactory()); + } + private String name; // required private String defaultValue; // required @@ -49460,7 +57298,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -49687,54 +57524,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DEFAULT_VALUE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.defaultValue = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.defaultValue != null) { - oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); - oprot.writeString(this.defaultValue); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -49763,6 +57557,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -49781,6 +57576,111 @@ } } + private static class get_config_value_argsStandardSchemeFactory implements SchemeFactory { + public get_config_value_argsStandardScheme getScheme() { + return new get_config_value_argsStandardScheme(); + } + } + + private static class get_config_value_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_config_value_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DEFAULT_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.defaultValue = iprot.readString(); + struct.setDefaultValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_config_value_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.defaultValue != null) { + oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); + oprot.writeString(struct.defaultValue); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_config_value_argsTupleSchemeFactory implements SchemeFactory { + public get_config_value_argsTupleScheme getScheme() { + return new get_config_value_argsTupleScheme(); + } + } + + private static class get_config_value_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_config_value_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetDefaultValue()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDefaultValue()) { + oprot.writeString(struct.defaultValue); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_config_value_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.defaultValue = iprot.readString(); + struct.setDefaultValueIsSet(true); + } + } + } + } public static class get_config_value_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -49789,6 +57689,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_config_value_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_config_value_resultTupleSchemeFactory()); + } + private String success; // required private ConfigValSecurityException o1; // required @@ -49854,7 +57760,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -50081,54 +57986,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.success = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new ConfigValSecurityException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -50156,6 +58019,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -50174,6 +58038,113 @@ } } + private static class get_config_value_resultStandardSchemeFactory implements SchemeFactory { + public get_config_value_resultStandardScheme getScheme() { + return new get_config_value_resultStandardScheme(); + } + } + + private static class get_config_value_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_config_value_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new ConfigValSecurityException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_config_value_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_config_value_resultTupleSchemeFactory implements SchemeFactory { + public get_config_value_resultTupleScheme getScheme() { + return new get_config_value_resultTupleScheme(); + } + } + + private static class get_config_value_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_config_value_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_config_value_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new ConfigValSecurityException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class partition_name_to_vals_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -50181,6 +58152,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_vals_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_vals_argsTupleSchemeFactory()); + } + private String part_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -50242,7 +58219,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -50401,42 +58377,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -50457,6 +58402,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -50475,6 +58421,88 @@ } } + private static class partition_name_to_vals_argsStandardSchemeFactory implements SchemeFactory { + public partition_name_to_vals_argsStandardScheme getScheme() { + return new partition_name_to_vals_argsStandardScheme(); + } + } + + private static class partition_name_to_vals_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_vals_argsTupleSchemeFactory implements SchemeFactory { + public partition_name_to_vals_argsTupleScheme getScheme() { + return new partition_name_to_vals_argsTupleScheme(); + } + } + + private static class partition_name_to_vals_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPart_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class partition_name_to_vals_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -50483,6 +58511,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_vals_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_vals_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -50548,7 +58582,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -50795,71 +58828,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list257 = iprot.readListBegin(); - this.success = new ArrayList(_list257.size); - for (int _i258 = 0; _i258 < _list257.size; ++_i258) - { - String _elem259; // required - _elem259 = iprot.readString(); - this.success.add(_elem259); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter260 : this.success) - { - oprot.writeString(_iter260); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -50887,6 +58861,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -50905,6 +58880,145 @@ } } + private static class partition_name_to_vals_resultStandardSchemeFactory implements SchemeFactory { + public partition_name_to_vals_resultStandardScheme getScheme() { + return new partition_name_to_vals_resultStandardScheme(); + } + } + + private static class partition_name_to_vals_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list514 = iprot.readListBegin(); + struct.success = new ArrayList(_list514.size); + for (int _i515 = 0; _i515 < _list514.size; ++_i515) + { + String _elem516; // required + _elem516 = iprot.readString(); + struct.success.add(_elem516); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter517 : struct.success) + { + oprot.writeString(_iter517); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_vals_resultTupleSchemeFactory implements SchemeFactory { + public partition_name_to_vals_resultTupleScheme getScheme() { + return new partition_name_to_vals_resultTupleScheme(); + } + } + + private static class partition_name_to_vals_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter518 : struct.success) + { + oprot.writeString(_iter518); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list519 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list519.size); + for (int _i520 = 0; _i520 < _list519.size; ++_i520) + { + String _elem521; // required + _elem521 = iprot.readString(); + struct.success.add(_elem521); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class partition_name_to_spec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -50912,6 +59026,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_spec_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_spec_argsTupleSchemeFactory()); + } + private String part_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -50973,7 +59093,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -51132,42 +59251,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -51188,6 +59276,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -51206,6 +59295,88 @@ } } + private static class partition_name_to_spec_argsStandardSchemeFactory implements SchemeFactory { + public partition_name_to_spec_argsStandardScheme getScheme() { + return new partition_name_to_spec_argsStandardScheme(); + } + } + + private static class partition_name_to_spec_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_spec_argsTupleSchemeFactory implements SchemeFactory { + public partition_name_to_spec_argsTupleScheme getScheme() { + return new partition_name_to_spec_argsTupleScheme(); + } + } + + private static class partition_name_to_spec_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPart_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class partition_name_to_spec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -51214,6 +59385,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_spec_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_spec_resultTupleSchemeFactory()); + } + private Map success; // required private MetaException o1; // required @@ -51279,7 +59456,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -51531,74 +59707,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map261 = iprot.readMapBegin(); - this.success = new HashMap(2*_map261.size); - for (int _i262 = 0; _i262 < _map261.size; ++_i262) - { - String _key263; // required - String _val264; // required - _key263 = iprot.readString(); - _val264 = iprot.readString(); - this.success.put(_key263, _val264); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (Map.Entry _iter265 : this.success.entrySet()) - { - oprot.writeString(_iter265.getKey()); - oprot.writeString(_iter265.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -51626,6 +59740,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -51644,6 +59759,151 @@ } } + private static class partition_name_to_spec_resultStandardSchemeFactory implements SchemeFactory { + public partition_name_to_spec_resultStandardScheme getScheme() { + return new partition_name_to_spec_resultStandardScheme(); + } + } + + private static class partition_name_to_spec_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map522 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map522.size); + for (int _i523 = 0; _i523 < _map522.size; ++_i523) + { + String _key524; // required + String _val525; // required + _key524 = iprot.readString(); + _val525 = iprot.readString(); + struct.success.put(_key524, _val525); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (Map.Entry _iter526 : struct.success.entrySet()) + { + oprot.writeString(_iter526.getKey()); + oprot.writeString(_iter526.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_spec_resultTupleSchemeFactory implements SchemeFactory { + public partition_name_to_spec_resultTupleScheme getScheme() { + return new partition_name_to_spec_resultTupleScheme(); + } + } + + private static class partition_name_to_spec_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter527 : struct.success.entrySet()) + { + oprot.writeString(_iter527.getKey()); + oprot.writeString(_iter527.getValue()); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map528 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new HashMap(2*_map528.size); + for (int _i529 = 0; _i529 < _map528.size; ++_i529) + { + String _key530; // required + String _val531; // required + _key530 = iprot.readString(); + _val531 = iprot.readString(); + struct.success.put(_key530, _val531); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class markPartitionForEvent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -51654,6 +59914,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new markPartitionForEvent_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new markPartitionForEvent_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Map part_vals; // required @@ -51731,7 +59997,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -52127,98 +60392,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map266 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map266.size); - for (int _i267 = 0; _i267 < _map266.size; ++_i267) - { - String _key268; // required - String _val269; // required - _key268 = iprot.readString(); - _val269 = iprot.readString(); - this.part_vals.put(_key268, _val269); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // EVENT_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.eventType = PartitionEventType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (Map.Entry _iter270 : this.part_vals.entrySet()) - { - oprot.writeString(_iter270.getKey()); - oprot.writeString(_iter270.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.eventType != null) { - oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); - oprot.writeI32(this.eventType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -52263,6 +60441,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -52281,6 +60460,195 @@ } } + private static class markPartitionForEvent_argsStandardSchemeFactory implements SchemeFactory { + public markPartitionForEvent_argsStandardScheme getScheme() { + return new markPartitionForEvent_argsStandardScheme(); + } + } + + private static class markPartitionForEvent_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map532 = iprot.readMapBegin(); + struct.part_vals = new HashMap(2*_map532.size); + for (int _i533 = 0; _i533 < _map532.size; ++_i533) + { + String _key534; // required + String _val535; // required + _key534 = iprot.readString(); + _val535 = iprot.readString(); + struct.part_vals.put(_key534, _val535); + } + iprot.readMapEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // EVENT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (Map.Entry _iter536 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter536.getKey()); + oprot.writeString(_iter536.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.eventType != null) { + oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); + oprot.writeI32(struct.eventType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class markPartitionForEvent_argsTupleSchemeFactory implements SchemeFactory { + public markPartitionForEvent_argsTupleScheme getScheme() { + return new markPartitionForEvent_argsTupleScheme(); + } + } + + private static class markPartitionForEvent_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetEventType()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (Map.Entry _iter537 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter537.getKey()); + oprot.writeString(_iter537.getValue()); + } + } + } + if (struct.isSetEventType()) { + oprot.writeI32(struct.eventType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map538 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new HashMap(2*_map538.size); + for (int _i539 = 0; _i539 < _map538.size; ++_i539) + { + String _key540; // required + String _val541; // required + _key540 = iprot.readString(); + _val541 = iprot.readString(); + struct.part_vals.put(_key540, _val541); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } + } + } + } public static class markPartitionForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -52293,6 +60661,12 @@ private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new markPartitionForEvent_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new markPartitionForEvent_resultTupleSchemeFactory()); + } + private MetaException o1; // required private NoSuchObjectException o2; // required private UnknownDBException o3; // required @@ -52374,7 +60748,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -52873,103 +61246,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new UnknownTableException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // O5 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o5 = new UnknownPartitionException(); - this.o5.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // O6 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o6 = new InvalidPartitionException(); - this.o6.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO5()) { - oprot.writeFieldBegin(O5_FIELD_DESC); - this.o5.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO6()) { - oprot.writeFieldBegin(O6_FIELD_DESC); - this.o6.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -53029,6 +61311,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -53047,6 +61330,215 @@ } } + private static class markPartitionForEvent_resultStandardSchemeFactory implements SchemeFactory { + public markPartitionForEvent_resultStandardScheme getScheme() { + return new markPartitionForEvent_resultStandardScheme(); + } + } + + private static class markPartitionForEvent_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // O5 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // O6 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o5 != null) { + oprot.writeFieldBegin(O5_FIELD_DESC); + struct.o5.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o6 != null) { + oprot.writeFieldBegin(O6_FIELD_DESC); + struct.o6.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class markPartitionForEvent_resultTupleSchemeFactory implements SchemeFactory { + public markPartitionForEvent_resultTupleScheme getScheme() { + return new markPartitionForEvent_resultTupleScheme(); + } + } + + private static class markPartitionForEvent_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + if (struct.isSetO4()) { + optionals.set(3); + } + if (struct.isSetO5()) { + optionals.set(4); + } + if (struct.isSetO6()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + if (struct.isSetO5()) { + struct.o5.write(oprot); + } + if (struct.isSetO6()) { + struct.o6.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(3)) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + if (incoming.get(4)) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } + if (incoming.get(5)) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } + } + } + } public static class isPartitionMarkedForEvent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -53057,6 +61549,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isPartitionMarkedForEvent_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isPartitionMarkedForEvent_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Map part_vals; // required @@ -53134,7 +61632,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -53530,98 +62027,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map271 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map271.size); - for (int _i272 = 0; _i272 < _map271.size; ++_i272) - { - String _key273; // required - String _val274; // required - _key273 = iprot.readString(); - _val274 = iprot.readString(); - this.part_vals.put(_key273, _val274); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // EVENT_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.eventType = PartitionEventType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (Map.Entry _iter275 : this.part_vals.entrySet()) - { - oprot.writeString(_iter275.getKey()); - oprot.writeString(_iter275.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.eventType != null) { - oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); - oprot.writeI32(this.eventType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -53666,6 +62076,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -53684,6 +62095,195 @@ } } + private static class isPartitionMarkedForEvent_argsStandardSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_argsStandardScheme getScheme() { + return new isPartitionMarkedForEvent_argsStandardScheme(); + } + } + + private static class isPartitionMarkedForEvent_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map542 = iprot.readMapBegin(); + struct.part_vals = new HashMap(2*_map542.size); + for (int _i543 = 0; _i543 < _map542.size; ++_i543) + { + String _key544; // required + String _val545; // required + _key544 = iprot.readString(); + _val545 = iprot.readString(); + struct.part_vals.put(_key544, _val545); + } + iprot.readMapEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // EVENT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (Map.Entry _iter546 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter546.getKey()); + oprot.writeString(_iter546.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.eventType != null) { + oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); + oprot.writeI32(struct.eventType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isPartitionMarkedForEvent_argsTupleSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_argsTupleScheme getScheme() { + return new isPartitionMarkedForEvent_argsTupleScheme(); + } + } + + private static class isPartitionMarkedForEvent_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetEventType()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (Map.Entry _iter547 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter547.getKey()); + oprot.writeString(_iter547.getValue()); + } + } + } + if (struct.isSetEventType()) { + oprot.writeI32(struct.eventType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map548 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new HashMap(2*_map548.size); + for (int _i549 = 0; _i549 < _map548.size; ++_i549) + { + String _key550; // required + String _val551; // required + _key550 = iprot.readString(); + _val551 = iprot.readString(); + struct.part_vals.put(_key550, _val551); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } + } + } + } public static class isPartitionMarkedForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -53697,6 +62297,12 @@ private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isPartitionMarkedForEvent_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isPartitionMarkedForEvent_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -53783,8 +62389,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -53833,8 +62438,7 @@ * Performs a deep copy on other. */ public isPartitionMarkedForEvent_result(isPartitionMarkedForEvent_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -53882,16 +62486,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -54352,115 +62956,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new UnknownTableException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // O5 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o5 = new UnknownPartitionException(); - this.o5.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // O6 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o6 = new InvalidPartitionException(); - this.o6.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO5()) { - oprot.writeFieldBegin(O5_FIELD_DESC); - this.o5.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO6()) { - oprot.writeFieldBegin(O6_FIELD_DESC); - this.o6.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -54524,6 +63025,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -54537,13 +63039,245 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class isPartitionMarkedForEvent_resultStandardSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_resultStandardScheme getScheme() { + return new isPartitionMarkedForEvent_resultStandardScheme(); + } + } + + private static class isPartitionMarkedForEvent_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // O5 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // O6 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o5 != null) { + oprot.writeFieldBegin(O5_FIELD_DESC); + struct.o5.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o6 != null) { + oprot.writeFieldBegin(O6_FIELD_DESC); + struct.o6.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isPartitionMarkedForEvent_resultTupleSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_resultTupleScheme getScheme() { + return new isPartitionMarkedForEvent_resultTupleScheme(); + } + } + + private static class isPartitionMarkedForEvent_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + if (struct.isSetO5()) { + optionals.set(5); + } + if (struct.isSetO6()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + if (struct.isSetO5()) { + struct.o5.write(oprot); + } + if (struct.isSetO6()) { + struct.o6.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + if (incoming.get(5)) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } + if (incoming.get(6)) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } + } + } + } public static class add_index_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -54552,6 +63286,12 @@ private static final org.apache.thrift.protocol.TField NEW_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_index", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField INDEX_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("index_table", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_index_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_index_argsTupleSchemeFactory()); + } + private Index new_index; // required private Table index_table; // required @@ -54617,7 +63357,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -54844,56 +63583,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_INDEX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_index = new Index(); - this.new_index.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // INDEX_TABLE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.index_table = new Table(); - this.index_table.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_index != null) { - oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); - this.new_index.write(oprot); - oprot.writeFieldEnd(); - } - if (this.index_table != null) { - oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); - this.index_table.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -54922,6 +63616,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_index != null) { + new_index.validate(); + } + if (index_table != null) { + index_table.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -54940,6 +63641,115 @@ } } + private static class add_index_argsStandardSchemeFactory implements SchemeFactory { + public add_index_argsStandardScheme getScheme() { + return new add_index_argsStandardScheme(); + } + } + + private static class add_index_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_INDEX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_index = new Index(); + struct.new_index.read(iprot); + struct.setNew_indexIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // INDEX_TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.index_table = new Table(); + struct.index_table.read(iprot); + struct.setIndex_tableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_index_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_index != null) { + oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); + struct.new_index.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.index_table != null) { + oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); + struct.index_table.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_index_argsTupleSchemeFactory implements SchemeFactory { + public add_index_argsTupleScheme getScheme() { + return new add_index_argsTupleScheme(); + } + } + + private static class add_index_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_index()) { + optionals.set(0); + } + if (struct.isSetIndex_table()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNew_index()) { + struct.new_index.write(oprot); + } + if (struct.isSetIndex_table()) { + struct.index_table.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.new_index = new Index(); + struct.new_index.read(iprot); + struct.setNew_indexIsSet(true); + } + if (incoming.get(1)) { + struct.index_table = new Table(); + struct.index_table.read(iprot); + struct.setIndex_tableIsSet(true); + } + } + } + } public static class add_index_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -54950,6 +63760,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_index_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_index_resultTupleSchemeFactory()); + } + private Index success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -55023,7 +63839,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -55386,79 +64201,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -55502,6 +64250,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -55520,6 +64272,165 @@ } } + private static class add_index_resultStandardSchemeFactory implements SchemeFactory { + public add_index_resultStandardScheme getScheme() { + return new add_index_resultStandardScheme(); + } + } + + private static class add_index_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_index_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_index_resultTupleSchemeFactory implements SchemeFactory { + public add_index_resultTupleScheme getScheme() { + return new add_index_resultTupleScheme(); + } + } + + private static class add_index_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class alter_index_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -55530,6 +64441,12 @@ private static final org.apache.thrift.protocol.TField IDX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("idx_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField NEW_IDX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_idx", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_index_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_index_argsTupleSchemeFactory()); + } + private String dbname; // required private String base_tbl_name; // required private String idx_name; // required @@ -55603,7 +64520,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -55966,79 +64882,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // BASE_TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.base_tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // IDX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.idx_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // NEW_IDX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_idx = new Index(); - this.new_idx.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.base_tbl_name != null) { - oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); - oprot.writeString(this.base_tbl_name); - oprot.writeFieldEnd(); - } - if (this.idx_name != null) { - oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); - oprot.writeString(this.idx_name); - oprot.writeFieldEnd(); - } - if (this.new_idx != null) { - oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); - this.new_idx.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -56083,6 +64931,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_idx != null) { + new_idx.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -56101,6 +64953,159 @@ } } + private static class alter_index_argsStandardSchemeFactory implements SchemeFactory { + public alter_index_argsStandardScheme getScheme() { + return new alter_index_argsStandardScheme(); + } + } + + private static class alter_index_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_index_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // BASE_TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.base_tbl_name = iprot.readString(); + struct.setBase_tbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IDX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.idx_name = iprot.readString(); + struct.setIdx_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NEW_IDX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_idx = new Index(); + struct.new_idx.read(iprot); + struct.setNew_idxIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_index_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.base_tbl_name != null) { + oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); + oprot.writeString(struct.base_tbl_name); + oprot.writeFieldEnd(); + } + if (struct.idx_name != null) { + oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); + oprot.writeString(struct.idx_name); + oprot.writeFieldEnd(); + } + if (struct.new_idx != null) { + oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); + struct.new_idx.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_index_argsTupleSchemeFactory implements SchemeFactory { + public alter_index_argsTupleScheme getScheme() { + return new alter_index_argsTupleScheme(); + } + } + + private static class alter_index_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetBase_tbl_name()) { + optionals.set(1); + } + if (struct.isSetIdx_name()) { + optionals.set(2); + } + if (struct.isSetNew_idx()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetBase_tbl_name()) { + oprot.writeString(struct.base_tbl_name); + } + if (struct.isSetIdx_name()) { + oprot.writeString(struct.idx_name); + } + if (struct.isSetNew_idx()) { + struct.new_idx.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.base_tbl_name = iprot.readString(); + struct.setBase_tbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.idx_name = iprot.readString(); + struct.setIdx_nameIsSet(true); + } + if (incoming.get(3)) { + struct.new_idx = new Index(); + struct.new_idx.read(iprot); + struct.setNew_idxIsSet(true); + } + } + } + } public static class alter_index_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -56109,6 +65114,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_index_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_index_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -56174,7 +65185,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -56401,55 +65411,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -56477,6 +65444,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -56495,6 +65463,115 @@ } } + private static class alter_index_resultStandardSchemeFactory implements SchemeFactory { + public alter_index_resultStandardScheme getScheme() { + return new alter_index_resultStandardScheme(); + } + } + + private static class alter_index_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_index_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_index_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_index_resultTupleSchemeFactory implements SchemeFactory { + public alter_index_resultTupleScheme getScheme() { + return new alter_index_resultTupleScheme(); + } + } + + private static class alter_index_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class drop_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -56505,6 +65582,12 @@ private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_index_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_index_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String index_name; // required @@ -56579,8 +65662,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -56617,8 +65699,7 @@ * Performs a deep copy on other. */ public drop_index_by_name_args(drop_index_by_name_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -56723,16 +65804,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -56944,77 +66025,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // INDEX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.index_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -57055,6 +66070,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -57068,13 +66084,162 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_index_by_name_argsStandardSchemeFactory implements SchemeFactory { + public drop_index_by_name_argsStandardScheme getScheme() { + return new drop_index_by_name_argsStandardScheme(); + } + } + + private static class drop_index_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // INDEX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(struct.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_index_by_name_argsTupleSchemeFactory implements SchemeFactory { + public drop_index_by_name_argsTupleScheme getScheme() { + return new drop_index_by_name_argsTupleScheme(); + } + } + + private static class drop_index_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetIndex_name()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetIndex_name()) { + oprot.writeString(struct.index_name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -57084,6 +66249,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_index_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_index_by_name_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -57154,8 +66325,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -57188,8 +66358,7 @@ * Performs a deep copy on other. */ public drop_index_by_name_result(drop_index_by_name_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -57221,16 +66390,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -57451,67 +66620,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -57543,6 +66657,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -57556,13 +66671,145 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_index_by_name_resultStandardSchemeFactory implements SchemeFactory { + public drop_index_by_name_resultStandardScheme getScheme() { + return new drop_index_by_name_resultStandardScheme(); + } + } + + private static class drop_index_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_index_by_name_resultTupleSchemeFactory implements SchemeFactory { + public drop_index_by_name_resultTupleScheme getScheme() { + return new drop_index_by_name_resultTupleScheme(); + } + } + + private static class drop_index_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -57572,6 +66819,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String index_name; // required @@ -57641,7 +66894,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -57936,66 +67188,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // INDEX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.index_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -58032,6 +67229,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -58050,6 +67248,134 @@ } } + private static class get_index_by_name_argsStandardSchemeFactory implements SchemeFactory { + public get_index_by_name_argsStandardScheme getScheme() { + return new get_index_by_name_argsStandardScheme(); + } + } + + private static class get_index_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // INDEX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(struct.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_by_name_argsTupleSchemeFactory implements SchemeFactory { + public get_index_by_name_argsTupleScheme getScheme() { + return new get_index_by_name_argsTupleScheme(); + } + } + + private static class get_index_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetIndex_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetIndex_name()) { + oprot.writeString(struct.index_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } + } + } + } public static class get_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -58059,6 +67385,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_by_name_resultTupleSchemeFactory()); + } + private Index success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -58128,7 +67460,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -58423,67 +67754,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -58519,6 +67795,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -58537,6 +67817,140 @@ } } + private static class get_index_by_name_resultStandardSchemeFactory implements SchemeFactory { + public get_index_by_name_resultStandardScheme getScheme() { + return new get_index_by_name_resultStandardScheme(); + } + } + + private static class get_index_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_by_name_resultTupleSchemeFactory implements SchemeFactory { + public get_index_by_name_resultTupleScheme getScheme() { + return new get_index_by_name_resultTupleScheme(); + } + } + + private static class get_index_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_indexes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -58546,6 +67960,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_indexes_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_indexes_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_indexes; // required @@ -58616,8 +68036,7 @@ // isset id assignments private static final int __MAX_INDEXES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -58652,8 +68071,7 @@ * Performs a deep copy on other. */ public get_indexes_args(get_indexes_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -58731,16 +68149,16 @@ } public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -58915,65 +68333,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_INDEXES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -59006,6 +68370,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -59019,13 +68384,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_indexes_argsStandardSchemeFactory implements SchemeFactory { + public get_indexes_argsStandardScheme getScheme() { + return new get_indexes_argsStandardScheme(); + } + } + + private static class get_indexes_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_INDEXES + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_indexes_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(struct.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_indexes_argsTupleSchemeFactory implements SchemeFactory { + public get_indexes_argsTupleScheme getScheme() { + return new get_indexes_argsTupleScheme(); + } + } + + private static class get_indexes_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_indexes_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_indexes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_indexes()) { + oprot.writeI16(struct.max_indexes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } + } + } + } public static class get_indexes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -59035,6 +68526,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_indexes_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_indexes_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -59104,7 +68601,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -59419,84 +68915,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list276 = iprot.readListBegin(); - this.success = new ArrayList(_list276.size); - for (int _i277 = 0; _i277 < _list276.size; ++_i277) - { - Index _elem278; // required - _elem278 = new Index(); - _elem278.read(iprot); - this.success.add(_elem278); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Index _iter279 : this.success) - { - _iter279.write(oprot); - } - 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(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -59532,6 +68956,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -59550,6 +68975,172 @@ } } + private static class get_indexes_resultStandardSchemeFactory implements SchemeFactory { + public get_indexes_resultStandardScheme getScheme() { + return new get_indexes_resultStandardScheme(); + } + } + + private static class get_indexes_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list552 = iprot.readListBegin(); + struct.success = new ArrayList(_list552.size); + for (int _i553 = 0; _i553 < _list552.size; ++_i553) + { + Index _elem554; // required + _elem554 = new Index(); + _elem554.read(iprot); + struct.success.add(_elem554); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_indexes_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Index _iter555 : struct.success) + { + _iter555.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_indexes_resultTupleSchemeFactory implements SchemeFactory { + public get_indexes_resultTupleScheme getScheme() { + return new get_indexes_resultTupleScheme(); + } + } + + private static class get_indexes_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_indexes_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Index _iter556 : struct.success) + { + _iter556.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list557 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list557.size); + for (int _i558 = 0; _i558 < _list557.size; ++_i558) + { + Index _elem559; // required + _elem559 = new Index(); + _elem559.read(iprot); + struct.success.add(_elem559); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_index_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -59559,6 +69150,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_names_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_indexes; // required @@ -59629,8 +69226,7 @@ // isset id assignments private static final int __MAX_INDEXES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -59665,8 +69261,7 @@ * Performs a deep copy on other. */ public get_index_names_args(get_index_names_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -59744,16 +69339,16 @@ } public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -59928,65 +69523,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_INDEXES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -60019,6 +69560,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -60032,13 +69574,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_index_names_argsStandardSchemeFactory implements SchemeFactory { + public get_index_names_argsStandardScheme getScheme() { + return new get_index_names_argsStandardScheme(); + } + } + + private static class get_index_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_INDEXES + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(struct.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_names_argsTupleSchemeFactory implements SchemeFactory { + public get_index_names_argsTupleScheme getScheme() { + return new get_index_names_argsTupleScheme(); + } + } + + private static class get_index_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_indexes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_indexes()) { + oprot.writeI16(struct.max_indexes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } + } + } + } public static class get_index_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -60047,6 +69715,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o2; // required @@ -60112,7 +69786,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -60359,71 +70032,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list280 = iprot.readListBegin(); - this.success = new ArrayList(_list280.size); - for (int _i281 = 0; _i281 < _list280.size; ++_i281) - { - String _elem282; // required - _elem282 = iprot.readString(); - this.success.add(_elem282); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter283 : this.success) - { - oprot.writeString(_iter283); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -60451,6 +70065,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -60469,6 +70084,145 @@ } } + private static class get_index_names_resultStandardSchemeFactory implements SchemeFactory { + public get_index_names_resultStandardScheme getScheme() { + return new get_index_names_resultStandardScheme(); + } + } + + private static class get_index_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list560 = iprot.readListBegin(); + struct.success = new ArrayList(_list560.size); + for (int _i561 = 0; _i561 < _list560.size; ++_i561) + { + String _elem562; // required + _elem562 = iprot.readString(); + struct.success.add(_elem562); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter563 : struct.success) + { + oprot.writeString(_iter563); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_names_resultTupleSchemeFactory implements SchemeFactory { + public get_index_names_resultTupleScheme getScheme() { + return new get_index_names_resultTupleScheme(); + } + } + + private static class get_index_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter564 : struct.success) + { + oprot.writeString(_iter564); + } + } + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list565 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list565.size); + for (int _i566 = 0; _i566 < _list565.size; ++_i566) + { + String _elem567; // required + _elem567 = iprot.readString(); + struct.success.add(_elem567); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class update_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -60476,6 +70230,12 @@ private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new update_table_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_table_column_statistics_argsTupleSchemeFactory()); + } + private ColumnStatistics stats_obj; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -60537,7 +70297,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -60696,43 +70455,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // STATS_OBJ - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.stats_obj = new ColumnStatistics(); - this.stats_obj.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.stats_obj != null) { - oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); - this.stats_obj.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -60753,6 +70480,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (stats_obj != null) { + stats_obj.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -60771,6 +70502,90 @@ } } + private static class update_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public update_table_column_statistics_argsStandardScheme getScheme() { + return new update_table_column_statistics_argsStandardScheme(); + } + } + + private static class update_table_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATS_OBJ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.stats_obj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + struct.stats_obj.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public update_table_column_statistics_argsTupleScheme getScheme() { + return new update_table_column_statistics_argsTupleScheme(); + } + } + + private static class update_table_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStats_obj()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetStats_obj()) { + struct.stats_obj.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(true); + } + } + } + } public static class update_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -60782,6 +70597,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new update_table_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_table_column_statistics_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private InvalidObjectException o2; // required @@ -60860,8 +70681,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -60902,8 +70722,7 @@ * Performs a deep copy on other. */ public update_table_column_statistics_result(update_table_column_statistics_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -60943,16 +70762,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -61293,91 +71112,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new InvalidInputException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -61425,6 +71165,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -61438,13 +71179,195 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class update_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public update_table_column_statistics_resultStandardScheme getScheme() { + return new update_table_column_statistics_resultStandardScheme(); + } + } + + private static class update_table_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public update_table_column_statistics_resultTupleScheme getScheme() { + return new update_table_column_statistics_resultTupleScheme(); + } + } + + private static class update_table_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class update_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -61452,6 +71375,12 @@ private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new update_partition_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_partition_column_statistics_argsTupleSchemeFactory()); + } + private ColumnStatistics stats_obj; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -61513,7 +71442,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -61672,43 +71600,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // STATS_OBJ - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.stats_obj = new ColumnStatistics(); - this.stats_obj.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.stats_obj != null) { - oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); - this.stats_obj.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -61729,6 +71625,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (stats_obj != null) { + stats_obj.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -61747,6 +71647,90 @@ } } + private static class update_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_argsStandardScheme getScheme() { + return new update_partition_column_statistics_argsStandardScheme(); + } + } + + private static class update_partition_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATS_OBJ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.stats_obj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + struct.stats_obj.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_argsTupleScheme getScheme() { + return new update_partition_column_statistics_argsTupleScheme(); + } + } + + private static class update_partition_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStats_obj()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetStats_obj()) { + struct.stats_obj.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(true); + } + } + } + } public static class update_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -61758,6 +71742,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new update_partition_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_partition_column_statistics_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private InvalidObjectException o2; // required @@ -61836,8 +71826,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -61878,8 +71867,7 @@ * Performs a deep copy on other. */ public update_partition_column_statistics_result(update_partition_column_statistics_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -61919,16 +71907,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -62269,91 +72257,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new InvalidInputException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -62401,6 +72310,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -62414,13 +72324,195 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class update_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_resultStandardScheme getScheme() { + return new update_partition_column_statistics_resultStandardScheme(); + } + } + + private static class update_partition_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_resultTupleScheme getScheme() { + return new update_partition_column_statistics_resultTupleScheme(); + } + } + + private static class update_partition_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class get_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -62430,6 +72522,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_column_statistics_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String col_name; // required @@ -62499,7 +72597,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -62794,66 +72891,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // COL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.col_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(this.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -62890,6 +72932,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -62908,6 +72951,134 @@ } } + private static class get_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public get_table_column_statistics_argsStandardScheme getScheme() { + return new get_table_column_statistics_argsStandardScheme(); + } + } + + private static class get_table_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public get_table_column_statistics_argsTupleScheme getScheme() { + return new get_table_column_statistics_argsTupleScheme(); + } + } + + private static class get_table_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetCol_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + } public static class get_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -62919,6 +73090,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_column_statistics_resultTupleSchemeFactory()); + } + private ColumnStatistics success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -62996,7 +73173,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -63427,91 +73603,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new ColumnStatistics(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new InvalidInputException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new InvalidObjectException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -63563,6 +73660,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -63581,6 +73682,190 @@ } } + private static class get_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public get_table_column_statistics_resultStandardScheme getScheme() { + return new get_table_column_statistics_resultStandardScheme(); + } + } + + private static class get_table_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new ColumnStatistics(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidInputException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new InvalidObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public get_table_column_statistics_resultTupleScheme getScheme() { + return new get_table_column_statistics_resultTupleScheme(); + } + } + + private static class get_table_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = new ColumnStatistics(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new InvalidInputException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class get_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -63591,6 +73876,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_column_statistics_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -63664,7 +73955,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -64027,78 +74317,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // COL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.col_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - if (this.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(this.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -64143,6 +74366,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -64161,6 +74385,157 @@ } } + private static class get_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_argsStandardScheme getScheme() { + return new get_partition_column_statistics_argsStandardScheme(); + } + } + + private static class get_partition_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + if (struct.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_argsTupleScheme getScheme() { + return new get_partition_column_statistics_argsTupleScheme(); + } + } + + private static class get_partition_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + if (struct.isSetCol_name()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + if (struct.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + if (incoming.get(3)) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + } public static class get_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -64172,6 +74547,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_column_statistics_resultTupleSchemeFactory()); + } + private ColumnStatistics success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -64249,7 +74630,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -64680,91 +75060,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new ColumnStatistics(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new InvalidInputException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new InvalidObjectException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -64816,6 +75117,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -64834,6 +75139,190 @@ } } + private static class get_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_resultStandardScheme getScheme() { + return new get_partition_column_statistics_resultStandardScheme(); + } + } + + private static class get_partition_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new ColumnStatistics(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidInputException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new InvalidObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_resultTupleScheme getScheme() { + return new get_partition_column_statistics_resultTupleScheme(); + } + } + + private static class get_partition_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = new ColumnStatistics(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new InvalidInputException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class delete_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -64844,6 +75333,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new delete_partition_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_partition_column_statistics_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -64917,7 +75412,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -65280,78 +75774,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // COL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.col_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - if (this.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(this.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -65396,6 +75823,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -65414,6 +75842,157 @@ } } + private static class delete_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_argsStandardScheme getScheme() { + return new delete_partition_column_statistics_argsStandardScheme(); + } + } + + private static class delete_partition_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + if (struct.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_argsTupleScheme getScheme() { + return new delete_partition_column_statistics_argsTupleScheme(); + } + } + + private static class delete_partition_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + if (struct.isSetCol_name()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + if (struct.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + if (incoming.get(3)) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + } public static class delete_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -65425,6 +76004,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new delete_partition_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_partition_column_statistics_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -65503,8 +76088,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -65545,8 +76129,7 @@ * Performs a deep copy on other. */ public delete_partition_column_statistics_result(delete_partition_column_statistics_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -65586,16 +76169,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -65936,91 +76519,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new InvalidObjectException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new InvalidInputException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -66068,6 +76572,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -66081,13 +76586,195 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class delete_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_resultStandardScheme getScheme() { + return new delete_partition_column_statistics_resultStandardScheme(); + } + } + + private static class delete_partition_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_resultTupleScheme getScheme() { + return new delete_partition_column_statistics_resultTupleScheme(); + } + } + + private static class delete_partition_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class delete_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -66097,6 +76784,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new delete_table_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_table_column_statistics_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String col_name; // required @@ -66166,7 +76859,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -66461,66 +77153,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // COL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.col_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(this.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -66557,6 +77194,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -66575,6 +77213,134 @@ } } + private static class delete_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_argsStandardScheme getScheme() { + return new delete_table_column_statistics_argsStandardScheme(); + } + } + + private static class delete_table_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_argsTupleScheme getScheme() { + return new delete_table_column_statistics_argsTupleScheme(); + } + } + + private static class delete_table_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetCol_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + } public static class delete_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -66586,6 +77352,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new delete_table_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_table_column_statistics_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -66664,8 +77436,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -66706,8 +77477,7 @@ * Performs a deep copy on other. */ public delete_table_column_statistics_result(delete_table_column_statistics_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -66747,16 +77517,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -67097,91 +77867,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new InvalidObjectException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new InvalidInputException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - 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(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -67229,6 +77920,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -67242,13 +77934,195 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class delete_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_resultStandardScheme getScheme() { + return new delete_table_column_statistics_resultStandardScheme(); + } + } + + private static class delete_table_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_resultTupleScheme getScheme() { + return new delete_table_column_statistics_resultTupleScheme(); + } + } + + private static class delete_table_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class create_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -67256,6 +78130,12 @@ private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_role_argsTupleSchemeFactory()); + } + private Role role; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -67317,7 +78197,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -67476,43 +78355,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.role = new Role(); - this.role.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role != null) { - oprot.writeFieldBegin(ROLE_FIELD_DESC); - this.role.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -67533,6 +78380,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (role != null) { + role.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -67551,6 +78402,90 @@ } } + private static class create_role_argsStandardSchemeFactory implements SchemeFactory { + public create_role_argsStandardScheme getScheme() { + return new create_role_argsStandardScheme(); + } + } + + private static class create_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.role = new Role(); + struct.role.read(iprot); + struct.setRoleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role != null) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + struct.role.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_role_argsTupleSchemeFactory implements SchemeFactory { + public create_role_argsTupleScheme getScheme() { + return new create_role_argsTupleScheme(); + } + } + + private static class create_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRole()) { + struct.role.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.role = new Role(); + struct.role.read(iprot); + struct.setRoleIsSet(true); + } + } + } + } public static class create_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -67559,6 +78494,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -67625,8 +78566,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -67655,8 +78595,7 @@ * Performs a deep copy on other. */ public create_role_result(create_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -67684,16 +78623,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -67854,55 +78793,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -67926,6 +78822,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -67939,13 +78836,120 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class create_role_resultStandardSchemeFactory implements SchemeFactory { + public create_role_resultStandardScheme getScheme() { + return new create_role_resultStandardScheme(); + } + } + + private static class create_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_role_resultTupleSchemeFactory implements SchemeFactory { + public create_role_resultTupleScheme getScheme() { + return new create_role_resultTupleScheme(); + } + } + + private static class create_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class drop_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -67953,6 +78957,12 @@ private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_role_argsTupleSchemeFactory()); + } + private String role_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -68014,7 +79024,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -68173,42 +79182,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.role_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role_name != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.role_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -68229,6 +79207,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -68247,6 +79226,88 @@ } } + private static class drop_role_argsStandardSchemeFactory implements SchemeFactory { + public drop_role_argsStandardScheme getScheme() { + return new drop_role_argsStandardScheme(); + } + } + + private static class drop_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.role_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_role_argsTupleSchemeFactory implements SchemeFactory { + public drop_role_argsTupleScheme getScheme() { + return new drop_role_argsTupleScheme(); + } + } + + private static class drop_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRole_name()) { + oprot.writeString(struct.role_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } + } + } + } public static class drop_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -68255,6 +79316,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -68321,8 +79388,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -68351,8 +79417,7 @@ * Performs a deep copy on other. */ public drop_role_result(drop_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -68380,16 +79445,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -68550,55 +79615,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -68622,6 +79644,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -68635,20 +79658,133 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_role_resultStandardSchemeFactory implements SchemeFactory { + public drop_role_resultStandardScheme getScheme() { + return new drop_role_resultStandardScheme(); + } + } + + private static class drop_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_role_resultTupleSchemeFactory implements SchemeFactory { + public drop_role_resultTupleScheme getScheme() { + return new drop_role_resultTupleScheme(); + } + } + + private static class drop_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_role_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_role_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_role_names_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -68789,30 +79925,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -68826,6 +79943,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -68844,6 +79962,62 @@ } } + private static class get_role_names_argsStandardSchemeFactory implements SchemeFactory { + public get_role_names_argsStandardScheme getScheme() { + return new get_role_names_argsStandardScheme(); + } + } + + private static class get_role_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_role_names_argsTupleSchemeFactory implements SchemeFactory { + public get_role_names_argsTupleScheme getScheme() { + return new get_role_names_argsTupleScheme(); + } + } + + private static class get_role_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_role_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class get_role_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -68852,6 +80026,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_role_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_role_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -68917,7 +80097,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -69164,71 +80343,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); - this.success = new ArrayList(_list284.size); - for (int _i285 = 0; _i285 < _list284.size; ++_i285) - { - String _elem286; // required - _elem286 = iprot.readString(); - this.success.add(_elem286); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter287 : this.success) - { - oprot.writeString(_iter287); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -69256,6 +80376,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -69274,6 +80395,145 @@ } } + private static class get_role_names_resultStandardSchemeFactory implements SchemeFactory { + public get_role_names_resultStandardScheme getScheme() { + return new get_role_names_resultStandardScheme(); + } + } + + private static class get_role_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list568 = iprot.readListBegin(); + struct.success = new ArrayList(_list568.size); + for (int _i569 = 0; _i569 < _list568.size; ++_i569) + { + String _elem570; // required + _elem570 = iprot.readString(); + struct.success.add(_elem570); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter571 : struct.success) + { + oprot.writeString(_iter571); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_role_names_resultTupleSchemeFactory implements SchemeFactory { + public get_role_names_resultTupleScheme getScheme() { + return new get_role_names_resultTupleScheme(); + } + } + + private static class get_role_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_role_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter572 : struct.success) + { + oprot.writeString(_iter572); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list573 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list573.size); + for (int _i574 = 0; _i574 < _list573.size; ++_i574) + { + String _elem575; // required + _elem575 = iprot.readString(); + struct.success.add(_elem575); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class grant_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -69286,6 +80546,12 @@ private static final org.apache.thrift.protocol.TField GRANTOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorType", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("grant_option", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_role_argsTupleSchemeFactory()); + } + private String role_name; // required private String principal_name; // required private PrincipalType principal_type; // required @@ -69376,8 +80642,7 @@ // isset id assignments private static final int __GRANT_OPTION_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -69422,8 +80687,7 @@ * Performs a deep copy on other. */ public grant_role_args(grant_role_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetRole_name()) { this.role_name = other.role_name; } @@ -69598,16 +80862,16 @@ } public void unsetGrant_option() { - __isset_bit_vector.clear(__GRANT_OPTION_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); } /** Returns true if field grant_option is set (has been assigned a value) and false otherwise */ public boolean isSetGrant_option() { - return __isset_bit_vector.get(__GRANT_OPTION_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); } public void setGrant_optionIsSet(boolean value) { - __isset_bit_vector.set(__GRANT_OPTION_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -69893,101 +81157,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.role_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // GRANTOR - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.grantor = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GRANTOR_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.grantorType = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // GRANT_OPTION - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.grant_option = iprot.readBool(); - setGrant_optionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role_name != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.role_name); - oprot.writeFieldEnd(); - } - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - if (this.grantor != null) { - oprot.writeFieldBegin(GRANTOR_FIELD_DESC); - oprot.writeString(this.grantor); - oprot.writeFieldEnd(); - } - if (this.grantorType != null) { - oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); - oprot.writeI32(this.grantorType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); - oprot.writeBool(this.grant_option); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -70044,6 +81218,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -70057,13 +81232,208 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class grant_role_argsStandardSchemeFactory implements SchemeFactory { + public grant_role_argsStandardScheme getScheme() { + return new grant_role_argsStandardScheme(); + } + } + + private static class grant_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // GRANTOR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GRANTOR_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // GRANT_OPTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.grant_option = iprot.readBool(); + struct.setGrant_optionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.role_name); + oprot.writeFieldEnd(); + } + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(struct.grantor); + oprot.writeFieldEnd(); + } + if (struct.grantorType != null) { + oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); + oprot.writeI32(struct.grantorType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.grant_option); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_role_argsTupleSchemeFactory implements SchemeFactory { + public grant_role_argsTupleScheme getScheme() { + return new grant_role_argsTupleScheme(); + } + } + + private static class grant_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_name()) { + optionals.set(1); + } + if (struct.isSetPrincipal_type()) { + optionals.set(2); + } + if (struct.isSetGrantor()) { + optionals.set(3); + } + if (struct.isSetGrantorType()) { + optionals.set(4); + } + if (struct.isSetGrant_option()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetRole_name()) { + oprot.writeString(struct.role_name); + } + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + if (struct.isSetGrantor()) { + oprot.writeString(struct.grantor); + } + if (struct.isSetGrantorType()) { + oprot.writeI32(struct.grantorType.getValue()); + } + if (struct.isSetGrant_option()) { + oprot.writeBool(struct.grant_option); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(2)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + if (incoming.get(3)) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } + if (incoming.get(4)) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } + if (incoming.get(5)) { + struct.grant_option = iprot.readBool(); + struct.setGrant_optionIsSet(true); + } + } + } + } public static class grant_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -70072,6 +81442,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -70138,8 +81514,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -70168,8 +81543,7 @@ * Performs a deep copy on other. */ public grant_role_result(grant_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -70197,16 +81571,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -70367,55 +81741,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -70439,6 +81770,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -70452,13 +81784,120 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class grant_role_resultStandardSchemeFactory implements SchemeFactory { + public grant_role_resultStandardScheme getScheme() { + return new grant_role_resultStandardScheme(); + } + } + + private static class grant_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_role_resultTupleSchemeFactory implements SchemeFactory { + public grant_role_resultTupleScheme getScheme() { + return new grant_role_resultTupleScheme(); + } + } + + private static class grant_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class revoke_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -70468,6 +81907,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_role_argsTupleSchemeFactory()); + } + private String role_name; // required private String principal_name; // required private PrincipalType principal_type; // required @@ -70541,7 +81986,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -70844,66 +82288,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.role_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role_name != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.role_name); - oprot.writeFieldEnd(); - } - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -70940,6 +82329,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -70958,6 +82348,134 @@ } } + private static class revoke_role_argsStandardSchemeFactory implements SchemeFactory { + public revoke_role_argsStandardScheme getScheme() { + return new revoke_role_argsStandardScheme(); + } + } + + private static class revoke_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.role_name); + oprot.writeFieldEnd(); + } + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_role_argsTupleSchemeFactory implements SchemeFactory { + public revoke_role_argsTupleScheme getScheme() { + return new revoke_role_argsTupleScheme(); + } + } + + private static class revoke_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_name()) { + optionals.set(1); + } + if (struct.isSetPrincipal_type()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetRole_name()) { + oprot.writeString(struct.role_name); + } + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(2)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + } + } + } public static class revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -70966,6 +82484,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -71032,8 +82556,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -71062,8 +82585,7 @@ * Performs a deep copy on other. */ public revoke_role_result(revoke_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -71091,16 +82613,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -71261,55 +82783,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -71333,6 +82812,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -71346,13 +82826,120 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class revoke_role_resultStandardSchemeFactory implements SchemeFactory { + public revoke_role_resultStandardScheme getScheme() { + return new revoke_role_resultStandardScheme(); + } + } + + private static class revoke_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_role_resultTupleSchemeFactory implements SchemeFactory { + public revoke_role_resultTupleScheme getScheme() { + return new revoke_role_resultTupleScheme(); + } + } + + private static class revoke_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class list_roles_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -71361,6 +82948,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_roles_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_roles_argsTupleSchemeFactory()); + } + private String principal_name; // required private PrincipalType principal_type; // required @@ -71430,7 +83023,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -71665,54 +83257,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -71741,6 +83290,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -71759,6 +83309,111 @@ } } + private static class list_roles_argsStandardSchemeFactory implements SchemeFactory { + public list_roles_argsStandardScheme getScheme() { + return new list_roles_argsStandardScheme(); + } + } + + private static class list_roles_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_roles_argsTupleSchemeFactory implements SchemeFactory { + public list_roles_argsTupleScheme getScheme() { + return new list_roles_argsTupleScheme(); + } + } + + private static class list_roles_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrincipal_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_type()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + } + } + } public static class list_roles_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -71767,6 +83422,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_roles_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_roles_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -71832,7 +83493,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -72079,72 +83739,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(); - this.success = new ArrayList(_list288.size); - for (int _i289 = 0; _i289 < _list288.size; ++_i289) - { - Role _elem290; // required - _elem290 = new Role(); - _elem290.read(iprot); - this.success.add(_elem290); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Role _iter291 : this.success) - { - _iter291.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -72172,6 +83772,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -72190,6 +83791,147 @@ } } + private static class list_roles_resultStandardSchemeFactory implements SchemeFactory { + public list_roles_resultStandardScheme getScheme() { + return new list_roles_resultStandardScheme(); + } + } + + private static class list_roles_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list576 = iprot.readListBegin(); + struct.success = new ArrayList(_list576.size); + for (int _i577 = 0; _i577 < _list576.size; ++_i577) + { + Role _elem578; // required + _elem578 = new Role(); + _elem578.read(iprot); + struct.success.add(_elem578); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Role _iter579 : struct.success) + { + _iter579.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_roles_resultTupleSchemeFactory implements SchemeFactory { + public list_roles_resultTupleScheme getScheme() { + return new list_roles_resultTupleScheme(); + } + } + + private static class list_roles_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Role _iter580 : struct.success) + { + _iter580.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list581 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list581.size); + for (int _i582 = 0; _i582 < _list581.size; ++_i582) + { + Role _elem583; // required + _elem583 = new Role(); + _elem583.read(iprot); + struct.success.add(_elem583); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_privilege_set_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -72199,6 +83941,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_privilege_set_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_privilege_set_argsTupleSchemeFactory()); + } + private HiveObjectRef hiveObject; // required private String user_name; // required private List group_names; // required @@ -72268,7 +84016,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -72583,84 +84330,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // HIVE_OBJECT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.hiveObject = new HiveObjectRef(); - this.hiveObject.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list292 = iprot.readListBegin(); - this.group_names = new ArrayList(_list292.size); - for (int _i293 = 0; _i293 < _list292.size; ++_i293) - { - String _elem294; // required - _elem294 = iprot.readString(); - this.group_names.add(_elem294); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.hiveObject != null) { - oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); - this.hiveObject.write(oprot); - oprot.writeFieldEnd(); - } - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter295 : this.group_names) - { - oprot.writeString(_iter295); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -72697,6 +84371,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (hiveObject != null) { + hiveObject.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -72715,6 +84393,168 @@ } } + private static class get_privilege_set_argsStandardSchemeFactory implements SchemeFactory { + public get_privilege_set_argsStandardScheme getScheme() { + return new get_privilege_set_argsStandardScheme(); + } + } + + private static class get_privilege_set_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // HIVE_OBJECT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list584 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list584.size); + for (int _i585 = 0; _i585 < _list584.size; ++_i585) + { + String _elem586; // required + _elem586 = iprot.readString(); + struct.group_names.add(_elem586); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_privilege_set_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + struct.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter587 : struct.group_names) + { + oprot.writeString(_iter587); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_privilege_set_argsTupleSchemeFactory implements SchemeFactory { + public get_privilege_set_argsTupleScheme getScheme() { + return new get_privilege_set_argsTupleScheme(); + } + } + + private static class get_privilege_set_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetHiveObject()) { + optionals.set(0); + } + if (struct.isSetUser_name()) { + optionals.set(1); + } + if (struct.isSetGroup_names()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetHiveObject()) { + struct.hiveObject.write(oprot); + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter588 : struct.group_names) + { + oprot.writeString(_iter588); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } + if (incoming.get(1)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list589 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list589.size); + for (int _i590 = 0; _i590 < _list589.size; ++_i590) + { + String _elem591; // required + _elem591 = iprot.readString(); + struct.group_names.add(_elem591); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_privilege_set_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -72723,6 +84563,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_privilege_set_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_privilege_set_resultTupleSchemeFactory()); + } + private PrincipalPrivilegeSet success; // required private MetaException o1; // required @@ -72788,7 +84634,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -73015,55 +84860,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new PrincipalPrivilegeSet(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -73091,6 +84893,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -73109,6 +84915,115 @@ } } + private static class get_privilege_set_resultStandardSchemeFactory implements SchemeFactory { + public get_privilege_set_resultStandardScheme getScheme() { + return new get_privilege_set_resultStandardScheme(); + } + } + + private static class get_privilege_set_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new PrincipalPrivilegeSet(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_privilege_set_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_privilege_set_resultTupleSchemeFactory implements SchemeFactory { + public get_privilege_set_resultTupleScheme getScheme() { + return new get_privilege_set_resultTupleScheme(); + } + } + + private static class get_privilege_set_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new PrincipalPrivilegeSet(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class list_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -73118,6 +85033,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField HIVE_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("hiveObject", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_privileges_argsTupleSchemeFactory()); + } + private String principal_name; // required private PrincipalType principal_type; // required private HiveObjectRef hiveObject; // required @@ -73191,7 +85112,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -73494,67 +85414,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // HIVE_OBJECT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.hiveObject = new HiveObjectRef(); - this.hiveObject.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - if (this.hiveObject != null) { - oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); - this.hiveObject.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -73591,6 +85455,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (hiveObject != null) { + hiveObject.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -73609,6 +85477,136 @@ } } + private static class list_privileges_argsStandardSchemeFactory implements SchemeFactory { + public list_privileges_argsStandardScheme getScheme() { + return new list_privileges_argsStandardScheme(); + } + } + + private static class list_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // HIVE_OBJECT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + struct.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_privileges_argsTupleSchemeFactory implements SchemeFactory { + public list_privileges_argsTupleScheme getScheme() { + return new list_privileges_argsTupleScheme(); + } + } + + private static class list_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrincipal_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_type()) { + optionals.set(1); + } + if (struct.isSetHiveObject()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + if (struct.isSetHiveObject()) { + struct.hiveObject.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + if (incoming.get(2)) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } + } + } + } public static class list_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -73617,6 +85615,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_privileges_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -73682,7 +85686,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -73929,72 +85932,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list296 = iprot.readListBegin(); - this.success = new ArrayList(_list296.size); - for (int _i297 = 0; _i297 < _list296.size; ++_i297) - { - HiveObjectPrivilege _elem298; // required - _elem298 = new HiveObjectPrivilege(); - _elem298.read(iprot); - this.success.add(_elem298); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (HiveObjectPrivilege _iter299 : this.success) - { - _iter299.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -74022,6 +85965,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -74040,6 +85984,147 @@ } } + private static class list_privileges_resultStandardSchemeFactory implements SchemeFactory { + public list_privileges_resultStandardScheme getScheme() { + return new list_privileges_resultStandardScheme(); + } + } + + private static class list_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list592 = iprot.readListBegin(); + struct.success = new ArrayList(_list592.size); + for (int _i593 = 0; _i593 < _list592.size; ++_i593) + { + HiveObjectPrivilege _elem594; // required + _elem594 = new HiveObjectPrivilege(); + _elem594.read(iprot); + struct.success.add(_elem594); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (HiveObjectPrivilege _iter595 : struct.success) + { + _iter595.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_privileges_resultTupleSchemeFactory implements SchemeFactory { + public list_privileges_resultTupleScheme getScheme() { + return new list_privileges_resultTupleScheme(); + } + } + + private static class list_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (HiveObjectPrivilege _iter596 : struct.success) + { + _iter596.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list597 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list597.size); + for (int _i598 = 0; _i598 < _list597.size; ++_i598) + { + HiveObjectPrivilege _elem599; // required + _elem599 = new HiveObjectPrivilege(); + _elem599.read(iprot); + struct.success.add(_elem599); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class grant_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -74047,6 +86132,12 @@ private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_privileges_argsTupleSchemeFactory()); + } + private PrivilegeBag privileges; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -74108,7 +86199,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -74267,43 +86357,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrivilegeBag(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -74324,6 +86382,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -74342,6 +86404,90 @@ } } + private static class grant_privileges_argsStandardSchemeFactory implements SchemeFactory { + public grant_privileges_argsStandardScheme getScheme() { + return new grant_privileges_argsStandardScheme(); + } + } + + private static class grant_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_privileges_argsTupleSchemeFactory implements SchemeFactory { + public grant_privileges_argsTupleScheme getScheme() { + return new grant_privileges_argsTupleScheme(); + } + } + + private static class grant_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivileges()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } public static class grant_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -74350,6 +86496,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_privileges_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -74416,8 +86568,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -74446,8 +86597,7 @@ * Performs a deep copy on other. */ public grant_privileges_result(grant_privileges_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -74475,16 +86625,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -74645,55 +86795,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -74717,6 +86824,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -74730,13 +86838,120 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class grant_privileges_resultStandardSchemeFactory implements SchemeFactory { + public grant_privileges_resultStandardScheme getScheme() { + return new grant_privileges_resultStandardScheme(); + } + } + + private static class grant_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_privileges_resultTupleSchemeFactory implements SchemeFactory { + public grant_privileges_resultTupleScheme getScheme() { + return new grant_privileges_resultTupleScheme(); + } + } + + private static class grant_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -74744,6 +86959,12 @@ private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_privileges_argsTupleSchemeFactory()); + } + private PrivilegeBag privileges; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -74805,7 +87026,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -74964,43 +87184,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrivilegeBag(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -75021,6 +87209,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -75039,6 +87231,90 @@ } } + private static class revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { + public revoke_privileges_argsStandardScheme getScheme() { + return new revoke_privileges_argsStandardScheme(); + } + } + + private static class revoke_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { + public revoke_privileges_argsTupleScheme getScheme() { + return new revoke_privileges_argsTupleScheme(); + } + } + + private static class revoke_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivileges()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } public static class revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -75047,6 +87323,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_privileges_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -75113,8 +87395,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -75143,8 +87424,7 @@ * Performs a deep copy on other. */ public revoke_privileges_result(revoke_privileges_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -75172,16 +87452,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -75342,55 +87622,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -75414,6 +87651,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -75427,13 +87665,120 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { + public revoke_privileges_resultStandardScheme getScheme() { + return new revoke_privileges_resultStandardScheme(); + } + } + + private static class revoke_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { + public revoke_privileges_resultTupleScheme getScheme() { + return new revoke_privileges_resultTupleScheme(); + } + } + + private static class revoke_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class set_ugi_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -75442,6 +87787,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_ugi_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_ugi_argsTupleSchemeFactory()); + } + private String user_name; // required private List group_names; // required @@ -75507,7 +87858,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -75754,71 +88104,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list300 = iprot.readListBegin(); - this.group_names = new ArrayList(_list300.size); - for (int _i301 = 0; _i301 < _list300.size; ++_i301) - { - String _elem302; // required - _elem302 = iprot.readString(); - this.group_names.add(_elem302); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter303 : this.group_names) - { - oprot.writeString(_iter303); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -75847,6 +88137,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -75865,6 +88156,143 @@ } } + private static class set_ugi_argsStandardSchemeFactory implements SchemeFactory { + public set_ugi_argsStandardScheme getScheme() { + return new set_ugi_argsStandardScheme(); + } + } + + private static class set_ugi_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list600 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list600.size); + for (int _i601 = 0; _i601 < _list600.size; ++_i601) + { + String _elem602; // required + _elem602 = iprot.readString(); + struct.group_names.add(_elem602); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter603 : struct.group_names) + { + oprot.writeString(_iter603); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_ugi_argsTupleSchemeFactory implements SchemeFactory { + public set_ugi_argsTupleScheme getScheme() { + return new set_ugi_argsTupleScheme(); + } + } + + private static class set_ugi_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUser_name()) { + optionals.set(0); + } + if (struct.isSetGroup_names()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter604 : struct.group_names) + { + oprot.writeString(_iter604); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list605 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list605.size); + for (int _i606 = 0; _i606 < _list605.size; ++_i606) + { + String _elem607; // required + _elem607 = iprot.readString(); + struct.group_names.add(_elem607); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class set_ugi_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -75873,6 +88301,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_ugi_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_ugi_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -75938,7 +88372,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -76185,71 +88618,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list304 = iprot.readListBegin(); - this.success = new ArrayList(_list304.size); - for (int _i305 = 0; _i305 < _list304.size; ++_i305) - { - String _elem306; // required - _elem306 = iprot.readString(); - this.success.add(_elem306); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter307 : this.success) - { - oprot.writeString(_iter307); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -76277,6 +88651,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -76295,6 +88670,145 @@ } } + private static class set_ugi_resultStandardSchemeFactory implements SchemeFactory { + public set_ugi_resultStandardScheme getScheme() { + return new set_ugi_resultStandardScheme(); + } + } + + private static class set_ugi_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list608 = iprot.readListBegin(); + struct.success = new ArrayList(_list608.size); + for (int _i609 = 0; _i609 < _list608.size; ++_i609) + { + String _elem610; // required + _elem610 = iprot.readString(); + struct.success.add(_elem610); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter611 : struct.success) + { + oprot.writeString(_iter611); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_ugi_resultTupleSchemeFactory implements SchemeFactory { + public set_ugi_resultTupleScheme getScheme() { + return new set_ugi_resultTupleScheme(); + } + } + + private static class set_ugi_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter612 : struct.success) + { + oprot.writeString(_iter612); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list613 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list613.size); + for (int _i614 = 0; _i614 < _list613.size; ++_i614) + { + String _elem615; // required + _elem615 = iprot.readString(); + struct.success.add(_elem615); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -76303,6 +88817,12 @@ private static final org.apache.thrift.protocol.TField TOKEN_OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_owner", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("renewer_kerberos_principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_delegation_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_delegation_token_argsTupleSchemeFactory()); + } + private String token_owner; // required private String renewer_kerberos_principal_name; // required @@ -76368,7 +88888,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -76595,54 +89114,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TOKEN_OWNER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.token_owner = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.renewer_kerberos_principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.token_owner != null) { - oprot.writeFieldBegin(TOKEN_OWNER_FIELD_DESC); - oprot.writeString(this.token_owner); - oprot.writeFieldEnd(); - } - if (this.renewer_kerberos_principal_name != null) { - oprot.writeFieldBegin(RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.renewer_kerberos_principal_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -76671,6 +89147,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -76689,6 +89166,111 @@ } } + private static class get_delegation_token_argsStandardSchemeFactory implements SchemeFactory { + public get_delegation_token_argsStandardScheme getScheme() { + return new get_delegation_token_argsStandardScheme(); + } + } + + private static class get_delegation_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_delegation_token_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN_OWNER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_owner = iprot.readString(); + struct.setToken_ownerIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.renewer_kerberos_principal_name = iprot.readString(); + struct.setRenewer_kerberos_principal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_delegation_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_owner != null) { + oprot.writeFieldBegin(TOKEN_OWNER_FIELD_DESC); + oprot.writeString(struct.token_owner); + oprot.writeFieldEnd(); + } + if (struct.renewer_kerberos_principal_name != null) { + oprot.writeFieldBegin(RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.renewer_kerberos_principal_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_delegation_token_argsTupleSchemeFactory implements SchemeFactory { + public get_delegation_token_argsTupleScheme getScheme() { + return new get_delegation_token_argsTupleScheme(); + } + } + + private static class get_delegation_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_owner()) { + optionals.set(0); + } + if (struct.isSetRenewer_kerberos_principal_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetToken_owner()) { + oprot.writeString(struct.token_owner); + } + if (struct.isSetRenewer_kerberos_principal_name()) { + oprot.writeString(struct.renewer_kerberos_principal_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.token_owner = iprot.readString(); + struct.setToken_ownerIsSet(true); + } + if (incoming.get(1)) { + struct.renewer_kerberos_principal_name = iprot.readString(); + struct.setRenewer_kerberos_principal_nameIsSet(true); + } + } + } + } public static class get_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -76697,6 +89279,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_delegation_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_delegation_token_resultTupleSchemeFactory()); + } + private String success; // required private MetaException o1; // required @@ -76762,7 +89350,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -76989,54 +89576,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.success = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -77064,6 +89609,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -77082,6 +89628,113 @@ } } + private static class get_delegation_token_resultStandardSchemeFactory implements SchemeFactory { + public get_delegation_token_resultStandardScheme getScheme() { + return new get_delegation_token_resultStandardScheme(); + } + } + + private static class get_delegation_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_delegation_token_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_delegation_token_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_delegation_token_resultTupleSchemeFactory implements SchemeFactory { + public get_delegation_token_resultTupleScheme getScheme() { + return new get_delegation_token_resultTupleScheme(); + } + } + + private static class get_delegation_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class renew_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -77089,6 +89742,12 @@ private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new renew_delegation_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new renew_delegation_token_argsTupleSchemeFactory()); + } + private String token_str_form; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -77150,7 +89809,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -77309,42 +89967,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TOKEN_STR_FORM - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.token_str_form = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.token_str_form != null) { - oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); - oprot.writeString(this.token_str_form); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -77365,6 +89992,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -77383,6 +90011,88 @@ } } + private static class renew_delegation_token_argsStandardSchemeFactory implements SchemeFactory { + public renew_delegation_token_argsStandardScheme getScheme() { + return new renew_delegation_token_argsStandardScheme(); + } + } + + private static class renew_delegation_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN_STR_FORM + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_str_form != null) { + oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); + oprot.writeString(struct.token_str_form); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class renew_delegation_token_argsTupleSchemeFactory implements SchemeFactory { + public renew_delegation_token_argsTupleScheme getScheme() { + return new renew_delegation_token_argsTupleScheme(); + } + } + + private static class renew_delegation_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_str_form()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken_str_form()) { + oprot.writeString(struct.token_str_form); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } + } + } + } public static class renew_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -77391,6 +90101,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new renew_delegation_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new renew_delegation_token_resultTupleSchemeFactory()); + } + private long success; // required private MetaException o1; // required @@ -77457,8 +90173,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -77487,8 +90202,7 @@ * Performs a deep copy on other. */ public renew_delegation_token_result(renew_delegation_token_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -77516,16 +90230,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -77686,55 +90400,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.success = iprot.readI64(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -77758,6 +90429,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -77771,13 +90443,120 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class renew_delegation_token_resultStandardSchemeFactory implements SchemeFactory { + public renew_delegation_token_resultStandardScheme getScheme() { + return new renew_delegation_token_resultStandardScheme(); + } + } + + private static class renew_delegation_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class renew_delegation_token_resultTupleSchemeFactory implements SchemeFactory { + public renew_delegation_token_resultTupleScheme getScheme() { + return new renew_delegation_token_resultTupleScheme(); + } + } + + private static class renew_delegation_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class cancel_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -77785,6 +90564,12 @@ private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancel_delegation_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancel_delegation_token_argsTupleSchemeFactory()); + } + private String token_str_form; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -77846,7 +90631,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -78005,42 +90789,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TOKEN_STR_FORM - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.token_str_form = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.token_str_form != null) { - oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); - oprot.writeString(this.token_str_form); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -78061,6 +90814,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -78079,6 +90833,88 @@ } } + private static class cancel_delegation_token_argsStandardSchemeFactory implements SchemeFactory { + public cancel_delegation_token_argsStandardScheme getScheme() { + return new cancel_delegation_token_argsStandardScheme(); + } + } + + private static class cancel_delegation_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN_STR_FORM + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_str_form != null) { + oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); + oprot.writeString(struct.token_str_form); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancel_delegation_token_argsTupleSchemeFactory implements SchemeFactory { + public cancel_delegation_token_argsTupleScheme getScheme() { + return new cancel_delegation_token_argsTupleScheme(); + } + } + + private static class cancel_delegation_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_str_form()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken_str_form()) { + oprot.writeString(struct.token_str_form); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } + } + } + } public static class cancel_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -78086,6 +90922,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancel_delegation_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancel_delegation_token_resultTupleSchemeFactory()); + } + private MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -78147,7 +90989,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -78306,43 +91147,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -78362,6 +91172,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -78380,6 +91191,90 @@ } } + private static class cancel_delegation_token_resultStandardSchemeFactory implements SchemeFactory { + public cancel_delegation_token_resultStandardScheme getScheme() { + return new cancel_delegation_token_resultStandardScheme(); + } + } + + private static class cancel_delegation_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancel_delegation_token_resultTupleSchemeFactory implements SchemeFactory { + public cancel_delegation_token_resultTupleScheme getScheme() { + return new cancel_delegation_token_resultTupleScheme(); + } + } + + private static class cancel_delegation_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField FIELD_SCHEMAS_FIELD_DESC = new org.apache.thrift.protocol.TField("fieldSchemas", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SchemaStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SchemaTupleSchemeFactory()); + } + private List fieldSchemas; // required private Map properties; // required @@ -92,7 +108,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -364,92 +379,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // FIELD_SCHEMAS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list114 = iprot.readListBegin(); - this.fieldSchemas = new ArrayList(_list114.size); - for (int _i115 = 0; _i115 < _list114.size; ++_i115) - { - FieldSchema _elem116; // required - _elem116 = new FieldSchema(); - _elem116.read(iprot); - this.fieldSchemas.add(_elem116); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PROPERTIES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map117 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map117.size); - for (int _i118 = 0; _i118 < _map117.size; ++_i118) - { - String _key119; // required - String _val120; // required - _key119 = iprot.readString(); - _val120 = iprot.readString(); - this.properties.put(_key119, _val120); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.fieldSchemas != null) { - oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.fieldSchemas.size())); - for (FieldSchema _iter121 : this.fieldSchemas) - { - _iter121.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.properties != null) { - oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.properties.size())); - for (Map.Entry _iter122 : this.properties.entrySet()) - { - oprot.writeString(_iter122.getKey()); - oprot.writeString(_iter122.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -478,6 +412,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -496,5 +431,182 @@ } } + private static class SchemaStandardSchemeFactory implements SchemeFactory { + public SchemaStandardScheme getScheme() { + return new SchemaStandardScheme(); + } + } + + private static class SchemaStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Schema struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FIELD_SCHEMAS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list228 = iprot.readListBegin(); + struct.fieldSchemas = new ArrayList(_list228.size); + for (int _i229 = 0; _i229 < _list228.size; ++_i229) + { + FieldSchema _elem230; // required + _elem230 = new FieldSchema(); + _elem230.read(iprot); + struct.fieldSchemas.add(_elem230); + } + iprot.readListEnd(); + } + struct.setFieldSchemasIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PROPERTIES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map231 = iprot.readMapBegin(); + struct.properties = new HashMap(2*_map231.size); + for (int _i232 = 0; _i232 < _map231.size; ++_i232) + { + String _key233; // required + String _val234; // required + _key233 = iprot.readString(); + _val234 = iprot.readString(); + struct.properties.put(_key233, _val234); + } + iprot.readMapEnd(); + } + struct.setPropertiesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Schema struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.fieldSchemas != null) { + oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fieldSchemas.size())); + for (FieldSchema _iter235 : struct.fieldSchemas) + { + _iter235.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.properties != null) { + oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size())); + for (Map.Entry _iter236 : struct.properties.entrySet()) + { + oprot.writeString(_iter236.getKey()); + oprot.writeString(_iter236.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SchemaTupleSchemeFactory implements SchemeFactory { + public SchemaTupleScheme getScheme() { + return new SchemaTupleScheme(); + } + } + + private static class SchemaTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Schema struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFieldSchemas()) { + optionals.set(0); + } + if (struct.isSetProperties()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetFieldSchemas()) { + { + oprot.writeI32(struct.fieldSchemas.size()); + for (FieldSchema _iter237 : struct.fieldSchemas) + { + _iter237.write(oprot); + } + } + } + if (struct.isSetProperties()) { + { + oprot.writeI32(struct.properties.size()); + for (Map.Entry _iter238 : struct.properties.entrySet()) + { + oprot.writeString(_iter238.getKey()); + oprot.writeString(_iter238.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Schema struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fieldSchemas = new ArrayList(_list239.size); + for (int _i240 = 0; _i240 < _list239.size; ++_i240) + { + FieldSchema _elem241; // required + _elem241 = new FieldSchema(); + _elem241.read(iprot); + struct.fieldSchemas.add(_elem241); + } + } + struct.setFieldSchemasIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map242 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.properties = new HashMap(2*_map242.size); + for (int _i243 = 0; _i243 < _map242.size; ++_i243) + { + String _key244; // required + String _val245; // required + _key244 = iprot.readString(); + _val245 = iprot.readString(); + struct.properties.put(_key244, _val245); + } + } + struct.setPropertiesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -26,6 +36,12 @@ private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PrivilegeBagStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrivilegeBagTupleSchemeFactory()); + } + private List privileges; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -266,60 +281,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); - this.privileges = new ArrayList(_list8.size); - for (int _i9 = 0; _i9 < _list8.size; ++_i9) - { - HiveObjectPrivilege _elem10; // required - _elem10 = new HiveObjectPrivilege(); - _elem10.read(iprot); - this.privileges.add(_elem10); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.privileges.size())); - for (HiveObjectPrivilege _iter11 : this.privileges) - { - _iter11.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -340,6 +306,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -358,5 +325,121 @@ } } + private static class PrivilegeBagStandardSchemeFactory implements SchemeFactory { + public PrivilegeBagStandardScheme getScheme() { + return new PrivilegeBagStandardScheme(); + } + } + + private static class PrivilegeBagStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrivilegeBag struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); + struct.privileges = new ArrayList(_list16.size); + for (int _i17 = 0; _i17 < _list16.size; ++_i17) + { + HiveObjectPrivilege _elem18; // required + _elem18 = new HiveObjectPrivilege(); + _elem18.read(iprot); + struct.privileges.add(_elem18); + } + iprot.readListEnd(); + } + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, PrivilegeBag struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.privileges.size())); + for (HiveObjectPrivilege _iter19 : struct.privileges) + { + _iter19.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PrivilegeBagTupleSchemeFactory implements SchemeFactory { + public PrivilegeBagTupleScheme getScheme() { + return new PrivilegeBagTupleScheme(); + } + } + + private static class PrivilegeBagTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrivilegeBag struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivileges()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPrivileges()) { + { + oprot.writeI32(struct.privileges.size()); + for (HiveObjectPrivilege _iter20 : struct.privileges) + { + _iter20.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrivilegeBag struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.privileges = new ArrayList(_list21.size); + for (int _i22 = 0; _i22 < _list21.size; ++_i22) + { + HiveObjectPrivilege _elem23; // required + _elem23 = new HiveObjectPrivilege(); + _elem23.read(iprot); + struct.privileges.add(_elem23); + } + } + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class AlreadyExistsException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class AlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExistsException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AlreadyExistsExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AlreadyExistsExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class AlreadyExistsExceptionStandardSchemeFactory implements SchemeFactory { + public AlreadyExistsExceptionStandardScheme getScheme() { + return new AlreadyExistsExceptionStandardScheme(); + } + } + + private static class AlreadyExistsExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AlreadyExistsException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, AlreadyExistsException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AlreadyExistsExceptionTupleSchemeFactory implements SchemeFactory { + public AlreadyExistsExceptionTupleScheme getScheme() { + return new AlreadyExistsExceptionTupleScheme(); + } + } + + private static class AlreadyExistsExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -196,7 +206,7 @@ } @Override - protected Object readValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(field.id); if (setField != null) { switch (setField) { @@ -254,13 +264,12 @@ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @Override - protected void writeValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case BOOLEAN_STATS: BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; @@ -288,6 +297,72 @@ } @Override + protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(fieldID); + if (setField != null) { + switch (setField) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats; + booleanStats = new BooleanColumnStatsData(); + booleanStats.read(iprot); + return booleanStats; + case LONG_STATS: + LongColumnStatsData longStats; + longStats = new LongColumnStatsData(); + longStats.read(iprot); + return longStats; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats; + doubleStats = new DoubleColumnStatsData(); + doubleStats.read(iprot); + return doubleStats; + case STRING_STATS: + StringColumnStatsData stringStats; + stringStats = new StringColumnStatsData(); + stringStats.read(iprot); + return stringStats; + case BINARY_STATS: + BinaryColumnStatsData binaryStats; + binaryStats = new BinaryColumnStatsData(); + binaryStats.read(iprot); + return binaryStats; + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + throw new TProtocolException("Couldn't find a field with field id " + fieldID); + } + } + + @Override + protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; + booleanStats.write(oprot); + return; + case LONG_STATS: + LongColumnStatsData longStats = (LongColumnStatsData)value_; + longStats.write(oprot); + return; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; + doubleStats.write(oprot); + return; + case STRING_STATS: + StringColumnStatsData stringStats = (StringColumnStatsData)value_; + stringStats.write(oprot); + return; + case BINARY_STATS: + BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; + binaryStats.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { switch (setField) { case BOOLEAN_STATS: Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField GROUP_PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("groupPrivileges", org.apache.thrift.protocol.TType.MAP, (short)2); private static final org.apache.thrift.protocol.TField ROLE_PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("rolePrivileges", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PrincipalPrivilegeSetStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrincipalPrivilegeSetTupleSchemeFactory()); + } + private Map> userPrivileges; // required private Map> groupPrivileges; // required private Map> rolePrivileges; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -479,231 +494,407 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // USER_PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(); - this.userPrivileges = new HashMap>(2*_map12.size); - for (int _i13 = 0; _i13 < _map12.size; ++_i13) + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrincipalPrivilegeSet("); + boolean first = true; + + sb.append("userPrivileges:"); + if (this.userPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.userPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("groupPrivileges:"); + if (this.groupPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.groupPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("rolePrivileges:"); + if (this.rolePrivileges == null) { + sb.append("null"); + } else { + sb.append(this.rolePrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class PrincipalPrivilegeSetStandardSchemeFactory implements SchemeFactory { + public PrincipalPrivilegeSetStandardScheme getScheme() { + return new PrincipalPrivilegeSetStandardScheme(); + } + } + + private static class PrincipalPrivilegeSetStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - String _key14; // required - List _val15; // required - _key14 = iprot.readString(); + org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin(); + struct.userPrivileges = new HashMap>(2*_map24.size); + for (int _i25 = 0; _i25 < _map24.size; ++_i25) { - org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); - _val15 = new ArrayList(_list16.size); - for (int _i17 = 0; _i17 < _list16.size; ++_i17) + String _key26; // required + List _val27; // required + _key26 = iprot.readString(); { - PrivilegeGrantInfo _elem18; // required - _elem18 = new PrivilegeGrantInfo(); - _elem18.read(iprot); - _val15.add(_elem18); + org.apache.thrift.protocol.TList _list28 = iprot.readListBegin(); + _val27 = new ArrayList(_list28.size); + for (int _i29 = 0; _i29 < _list28.size; ++_i29) + { + PrivilegeGrantInfo _elem30; // required + _elem30 = new PrivilegeGrantInfo(); + _elem30.read(iprot); + _val27.add(_elem30); + } + iprot.readListEnd(); } - iprot.readListEnd(); + struct.userPrivileges.put(_key26, _val27); } - this.userPrivileges.put(_key14, _val15); + iprot.readMapEnd(); } - iprot.readMapEnd(); + struct.setUserPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // GROUP_PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map19 = iprot.readMapBegin(); - this.groupPrivileges = new HashMap>(2*_map19.size); - for (int _i20 = 0; _i20 < _map19.size; ++_i20) + break; + case 2: // GROUP_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - String _key21; // required - List _val22; // required - _key21 = iprot.readString(); + org.apache.thrift.protocol.TMap _map31 = iprot.readMapBegin(); + struct.groupPrivileges = new HashMap>(2*_map31.size); + for (int _i32 = 0; _i32 < _map31.size; ++_i32) { - org.apache.thrift.protocol.TList _list23 = iprot.readListBegin(); - _val22 = new ArrayList(_list23.size); - for (int _i24 = 0; _i24 < _list23.size; ++_i24) + String _key33; // required + List _val34; // required + _key33 = iprot.readString(); { - PrivilegeGrantInfo _elem25; // required - _elem25 = new PrivilegeGrantInfo(); - _elem25.read(iprot); - _val22.add(_elem25); + org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); + _val34 = new ArrayList(_list35.size); + for (int _i36 = 0; _i36 < _list35.size; ++_i36) + { + PrivilegeGrantInfo _elem37; // required + _elem37 = new PrivilegeGrantInfo(); + _elem37.read(iprot); + _val34.add(_elem37); + } + iprot.readListEnd(); } - iprot.readListEnd(); + struct.groupPrivileges.put(_key33, _val34); } - this.groupPrivileges.put(_key21, _val22); + iprot.readMapEnd(); } - iprot.readMapEnd(); + struct.setGroupPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // ROLE_PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin(); - this.rolePrivileges = new HashMap>(2*_map26.size); - for (int _i27 = 0; _i27 < _map26.size; ++_i27) + break; + case 3: // ROLE_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - String _key28; // required - List _val29; // required - _key28 = iprot.readString(); + org.apache.thrift.protocol.TMap _map38 = iprot.readMapBegin(); + struct.rolePrivileges = new HashMap>(2*_map38.size); + for (int _i39 = 0; _i39 < _map38.size; ++_i39) { - org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); - _val29 = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) + String _key40; // required + List _val41; // required + _key40 = iprot.readString(); { - PrivilegeGrantInfo _elem32; // required - _elem32 = new PrivilegeGrantInfo(); - _elem32.read(iprot); - _val29.add(_elem32); + org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); + _val41 = new ArrayList(_list42.size); + for (int _i43 = 0; _i43 < _list42.size; ++_i43) + { + PrivilegeGrantInfo _elem44; // required + _elem44 = new PrivilegeGrantInfo(); + _elem44.read(iprot); + _val41.add(_elem44); + } + iprot.readListEnd(); } - iprot.readListEnd(); + struct.rolePrivileges.put(_key40, _val41); } - this.rolePrivileges.put(_key28, _val29); + iprot.readMapEnd(); } - iprot.readMapEnd(); + struct.setRolePrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); } - iprot.readFieldEnd(); + iprot.readStructEnd(); + struct.validate(); } - iprot.readStructEnd(); - validate(); - } - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); + public void write(org.apache.thrift.protocol.TProtocol oprot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + struct.validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.userPrivileges != null) { - oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.userPrivileges.size())); - for (Map.Entry> _iter33 : this.userPrivileges.entrySet()) + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userPrivileges != null) { + oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); { - oprot.writeString(_iter33.getKey()); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.userPrivileges.size())); + for (Map.Entry> _iter45 : struct.userPrivileges.entrySet()) { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter33.getValue().size())); - for (PrivilegeGrantInfo _iter34 : _iter33.getValue()) + oprot.writeString(_iter45.getKey()); { - _iter34.write(oprot); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter45.getValue().size())); + for (PrivilegeGrantInfo _iter46 : _iter45.getValue()) + { + _iter46.write(oprot); + } + oprot.writeListEnd(); } - oprot.writeListEnd(); } + oprot.writeMapEnd(); } - oprot.writeMapEnd(); + oprot.writeFieldEnd(); } - oprot.writeFieldEnd(); - } - if (this.groupPrivileges != null) { - oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.groupPrivileges.size())); - for (Map.Entry> _iter35 : this.groupPrivileges.entrySet()) + if (struct.groupPrivileges != null) { + oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); { - oprot.writeString(_iter35.getKey()); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.groupPrivileges.size())); + for (Map.Entry> _iter47 : struct.groupPrivileges.entrySet()) { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter35.getValue().size())); - for (PrivilegeGrantInfo _iter36 : _iter35.getValue()) + oprot.writeString(_iter47.getKey()); { - _iter36.write(oprot); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter47.getValue().size())); + for (PrivilegeGrantInfo _iter48 : _iter47.getValue()) + { + _iter48.write(oprot); + } + oprot.writeListEnd(); } - oprot.writeListEnd(); } + oprot.writeMapEnd(); } - oprot.writeMapEnd(); + oprot.writeFieldEnd(); } - oprot.writeFieldEnd(); - } - if (this.rolePrivileges != null) { - oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.rolePrivileges.size())); - for (Map.Entry> _iter37 : this.rolePrivileges.entrySet()) + if (struct.rolePrivileges != null) { + oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); { - oprot.writeString(_iter37.getKey()); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.rolePrivileges.size())); + for (Map.Entry> _iter49 : struct.rolePrivileges.entrySet()) { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter37.getValue().size())); - for (PrivilegeGrantInfo _iter38 : _iter37.getValue()) + oprot.writeString(_iter49.getKey()); { - _iter38.write(oprot); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter49.getValue().size())); + for (PrivilegeGrantInfo _iter50 : _iter49.getValue()) + { + _iter50.write(oprot); + } + oprot.writeListEnd(); } - oprot.writeListEnd(); } + oprot.writeMapEnd(); } - oprot.writeMapEnd(); + oprot.writeFieldEnd(); } - oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("PrincipalPrivilegeSet("); - boolean first = true; - - sb.append("userPrivileges:"); - if (this.userPrivileges == null) { - sb.append("null"); - } else { - sb.append(this.userPrivileges); + private static class PrincipalPrivilegeSetTupleSchemeFactory implements SchemeFactory { + public PrincipalPrivilegeSetTupleScheme getScheme() { + return new PrincipalPrivilegeSetTupleScheme(); } - first = false; - if (!first) sb.append(", "); - sb.append("groupPrivileges:"); - if (this.groupPrivileges == null) { - sb.append("null"); - } else { - sb.append(this.groupPrivileges); - } - first = false; - if (!first) sb.append(", "); - sb.append("rolePrivileges:"); - if (this.rolePrivileges == null) { - sb.append("null"); - } else { - sb.append(this.rolePrivileges); - } - first = false; - sb.append(")"); - return sb.toString(); } - public void validate() throws org.apache.thrift.TException { - // check for required fields - } + private static class PrincipalPrivilegeSetTupleScheme extends TupleScheme { - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserPrivileges()) { + optionals.set(0); + } + if (struct.isSetGroupPrivileges()) { + optionals.set(1); + } + if (struct.isSetRolePrivileges()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserPrivileges()) { + { + oprot.writeI32(struct.userPrivileges.size()); + for (Map.Entry> _iter51 : struct.userPrivileges.entrySet()) + { + oprot.writeString(_iter51.getKey()); + { + oprot.writeI32(_iter51.getValue().size()); + for (PrivilegeGrantInfo _iter52 : _iter51.getValue()) + { + _iter52.write(oprot); + } + } + } + } + } + if (struct.isSetGroupPrivileges()) { + { + oprot.writeI32(struct.groupPrivileges.size()); + for (Map.Entry> _iter53 : struct.groupPrivileges.entrySet()) + { + oprot.writeString(_iter53.getKey()); + { + oprot.writeI32(_iter53.getValue().size()); + for (PrivilegeGrantInfo _iter54 : _iter53.getValue()) + { + _iter54.write(oprot); + } + } + } + } + } + if (struct.isSetRolePrivileges()) { + { + oprot.writeI32(struct.rolePrivileges.size()); + for (Map.Entry> _iter55 : struct.rolePrivileges.entrySet()) + { + oprot.writeString(_iter55.getKey()); + { + oprot.writeI32(_iter55.getValue().size()); + for (PrivilegeGrantInfo _iter56 : _iter55.getValue()) + { + _iter56.write(oprot); + } + } + } + } + } } - } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map57 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.userPrivileges = new HashMap>(2*_map57.size); + for (int _i58 = 0; _i58 < _map57.size; ++_i58) + { + String _key59; // required + List _val60; // required + _key59 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val60 = new ArrayList(_list61.size); + for (int _i62 = 0; _i62 < _list61.size; ++_i62) + { + PrivilegeGrantInfo _elem63; // required + _elem63 = new PrivilegeGrantInfo(); + _elem63.read(iprot); + _val60.add(_elem63); + } + } + struct.userPrivileges.put(_key59, _val60); + } + } + struct.setUserPrivilegesIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map64 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.groupPrivileges = new HashMap>(2*_map64.size); + for (int _i65 = 0; _i65 < _map64.size; ++_i65) + { + String _key66; // required + List _val67; // required + _key66 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list68 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val67 = new ArrayList(_list68.size); + for (int _i69 = 0; _i69 < _list68.size; ++_i69) + { + PrivilegeGrantInfo _elem70; // required + _elem70 = new PrivilegeGrantInfo(); + _elem70.read(iprot); + _val67.add(_elem70); + } + } + struct.groupPrivileges.put(_key66, _val67); + } + } + struct.setGroupPrivilegesIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map71 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.rolePrivileges = new HashMap>(2*_map71.size); + for (int _i72 = 0; _i72 < _map71.size; ++_i72) + { + String _key73; // required + List _val74; // required + _key73 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val74 = new ArrayList(_list75.size); + for (int _i76 = 0; _i76 < _list75.size; ++_i76) + { + PrivilegeGrantInfo _elem77; // required + _elem77 = new PrivilegeGrantInfo(); + _elem77.read(iprot); + _val74.add(_elem77); + } + } + struct.rolePrivileges.put(_key73, _val74); + } + } + struct.setRolePrivilegesIsSet(true); + } } } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new FieldSchemaStandardSchemeFactory()); + schemes.put(TupleScheme.class, new FieldSchemaTupleSchemeFactory()); + } + private String name; // required private String type; // required private String comment; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -392,66 +407,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // COMMENT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.comment = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); - oprot.writeFieldEnd(); - } - if (this.comment != null) { - oprot.writeFieldBegin(COMMENT_FIELD_DESC); - oprot.writeString(this.comment); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -488,6 +448,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -506,5 +467,133 @@ } } + private static class FieldSchemaStandardSchemeFactory implements SchemeFactory { + public FieldSchemaStandardScheme getScheme() { + return new FieldSchemaStandardScheme(); + } + } + + private static class FieldSchemaStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, FieldSchema struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COMMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, FieldSchema struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(struct.type); + oprot.writeFieldEnd(); + } + if (struct.comment != null) { + oprot.writeFieldBegin(COMMENT_FIELD_DESC); + oprot.writeString(struct.comment); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class FieldSchemaTupleSchemeFactory implements SchemeFactory { + public FieldSchemaTupleScheme getScheme() { + return new FieldSchemaTupleScheme(); + } + } + + private static class FieldSchemaTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, FieldSchema struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetType()) { + optionals.set(1); + } + if (struct.isSetComment()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetType()) { + oprot.writeString(struct.type); + } + if (struct.isSetComment()) { + oprot.writeString(struct.comment); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, FieldSchema struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } + if (incoming.get(2)) { + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class MetaException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class MetaException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MetaException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MetaExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MetaExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class MetaExceptionStandardSchemeFactory implements SchemeFactory { + public MetaExceptionStandardScheme getScheme() { + return new MetaExceptionStandardScheme(); + } + } + + private static class MetaExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, MetaException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, MetaException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MetaExceptionTupleSchemeFactory implements SchemeFactory { + public MetaExceptionTupleScheme getScheme() { + return new MetaExceptionTupleScheme(); + } + } + + private static class MetaExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, MetaException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, MetaException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class NoSuchObjectException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class NoSuchObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchObjectException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NoSuchObjectExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NoSuchObjectExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class NoSuchObjectExceptionStandardSchemeFactory implements SchemeFactory { + public NoSuchObjectExceptionStandardScheme getScheme() { + return new NoSuchObjectExceptionStandardScheme(); + } + } + + private static class NoSuchObjectExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchObjectException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, NoSuchObjectException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NoSuchObjectExceptionTupleSchemeFactory implements SchemeFactory { + public NoSuchObjectExceptionTupleScheme getScheme() { + return new NoSuchObjectExceptionTupleScheme(); + } + } + + private static class NoSuchObjectExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NoSuchObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,11 +40,17 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partName", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField LAST_ANALYZED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAnalyzed", org.apache.thrift.protocol.TType.I64, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnStatisticsDescStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnStatisticsDescTupleSchemeFactory()); + } + private boolean isTblLevel; // required private String dbName; // required private String tableName; // required - private String partName; // required - private long lastAnalyzed; // required + private String partName; // optional + private long lastAnalyzed; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -109,8 +125,8 @@ // isset id assignments private static final int __ISTBLLEVEL_ISSET_ID = 0; private static final int __LASTANALYZED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.PART_NAME,_Fields.LAST_ANALYZED}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -147,8 +163,7 @@ * Performs a deep copy on other. */ public ColumnStatisticsDesc(ColumnStatisticsDesc other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.isTblLevel = other.isTblLevel; if (other.isSetDbName()) { this.dbName = other.dbName; @@ -187,16 +202,16 @@ } public void unsetIsTblLevel() { - __isset_bit_vector.clear(__ISTBLLEVEL_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID); } /** Returns true if field isTblLevel is set (has been assigned a value) and false otherwise */ public boolean isSetIsTblLevel() { - return __isset_bit_vector.get(__ISTBLLEVEL_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID); } public void setIsTblLevelIsSet(boolean value) { - __isset_bit_vector.set(__ISTBLLEVEL_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID, value); } public String getDbName() { @@ -278,16 +293,16 @@ } public void unsetLastAnalyzed() { - __isset_bit_vector.clear(__LASTANALYZED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTANALYZED_ISSET_ID); } /** Returns true if field lastAnalyzed is set (has been assigned a value) and false otherwise */ public boolean isSetLastAnalyzed() { - return __isset_bit_vector.get(__LASTANALYZED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LASTANALYZED_ISSET_ID); } public void setLastAnalyzedIsSet(boolean value) { - __isset_bit_vector.set(__LASTANALYZED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTANALYZED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -536,92 +551,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // IS_TBL_LEVEL - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.isTblLevel = iprot.readBool(); - setIsTblLevelIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.partName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // LAST_ANALYZED - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.lastAnalyzed = iprot.readI64(); - setLastAnalyzedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(IS_TBL_LEVEL_FIELD_DESC); - oprot.writeBool(this.isTblLevel); - oprot.writeFieldEnd(); - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.tableName != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.tableName); - oprot.writeFieldEnd(); - } - if (this.partName != null) { - if (isSetPartName()) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.partName); - oprot.writeFieldEnd(); - } - } - if (isSetLastAnalyzed()) { - oprot.writeFieldBegin(LAST_ANALYZED_FIELD_DESC); - oprot.writeI64(this.lastAnalyzed); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -682,6 +616,7 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -695,12 +630,165 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class ColumnStatisticsDescStandardSchemeFactory implements SchemeFactory { + public ColumnStatisticsDescStandardScheme getScheme() { + return new ColumnStatisticsDescStandardScheme(); + } + } + + private static class ColumnStatisticsDescStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IS_TBL_LEVEL + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isTblLevel = iprot.readBool(); + struct.setIsTblLevelIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LAST_ANALYZED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lastAnalyzed = iprot.readI64(); + struct.setLastAnalyzedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(IS_TBL_LEVEL_FIELD_DESC); + oprot.writeBool(struct.isTblLevel); + oprot.writeFieldEnd(); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.partName != null) { + if (struct.isSetPartName()) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.partName); + oprot.writeFieldEnd(); + } + } + if (struct.isSetLastAnalyzed()) { + oprot.writeFieldBegin(LAST_ANALYZED_FIELD_DESC); + oprot.writeI64(struct.lastAnalyzed); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnStatisticsDescTupleSchemeFactory implements SchemeFactory { + public ColumnStatisticsDescTupleScheme getScheme() { + return new ColumnStatisticsDescTupleScheme(); + } + } + + private static class ColumnStatisticsDescTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBool(struct.isTblLevel); + oprot.writeString(struct.dbName); + oprot.writeString(struct.tableName); + BitSet optionals = new BitSet(); + if (struct.isSetPartName()) { + optionals.set(0); + } + if (struct.isSetLastAnalyzed()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPartName()) { + oprot.writeString(struct.partName); + } + if (struct.isSetLastAnalyzed()) { + oprot.writeI64(struct.lastAnalyzed); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.isTblLevel = iprot.readBool(); + struct.setIsTblLevelIsSet(true); + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } + if (incoming.get(1)) { + struct.lastAnalyzed = iprot.readI64(); + struct.setLastAnalyzedIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField STATS_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("statsDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("statsObj", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnStatisticsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnStatisticsTupleSchemeFactory()); + } + private ColumnStatisticsDesc statsDesc; // required private List statsObj; // required @@ -92,7 +108,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -339,73 +354,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // STATS_DESC - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.statsDesc = new ColumnStatisticsDesc(); - this.statsDesc.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // STATS_OBJ - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); - this.statsObj = new ArrayList(_list110.size); - for (int _i111 = 0; _i111 < _list110.size; ++_i111) - { - ColumnStatisticsObj _elem112; // required - _elem112 = new ColumnStatisticsObj(); - _elem112.read(iprot); - this.statsObj.add(_elem112); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.statsDesc != null) { - oprot.writeFieldBegin(STATS_DESC_FIELD_DESC); - this.statsDesc.write(oprot); - oprot.writeFieldEnd(); - } - if (this.statsObj != null) { - oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.statsObj.size())); - for (ColumnStatisticsObj _iter113 : this.statsObj) - { - _iter113.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -442,6 +395,10 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsObj' is unset! Struct:" + toString()); } + // check for sub-struct validity + if (statsDesc != null) { + statsDesc.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -460,5 +417,129 @@ } } + private static class ColumnStatisticsStandardSchemeFactory implements SchemeFactory { + public ColumnStatisticsStandardScheme getScheme() { + return new ColumnStatisticsStandardScheme(); + } + } + + private static class ColumnStatisticsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatistics struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATS_DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.statsDesc = new ColumnStatisticsDesc(); + struct.statsDesc.read(iprot); + struct.setStatsDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATS_OBJ + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list220 = iprot.readListBegin(); + struct.statsObj = new ArrayList(_list220.size); + for (int _i221 = 0; _i221 < _list220.size; ++_i221) + { + ColumnStatisticsObj _elem222; // required + _elem222 = new ColumnStatisticsObj(); + _elem222.read(iprot); + struct.statsObj.add(_elem222); + } + iprot.readListEnd(); + } + struct.setStatsObjIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnStatistics struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.statsDesc != null) { + oprot.writeFieldBegin(STATS_DESC_FIELD_DESC); + struct.statsDesc.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.statsObj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.statsObj.size())); + for (ColumnStatisticsObj _iter223 : struct.statsObj) + { + _iter223.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnStatisticsTupleSchemeFactory implements SchemeFactory { + public ColumnStatisticsTupleScheme getScheme() { + return new ColumnStatisticsTupleScheme(); + } + } + + private static class ColumnStatisticsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.statsDesc.write(oprot); + { + oprot.writeI32(struct.statsObj.size()); + for (ColumnStatisticsObj _iter224 : struct.statsObj) + { + _iter224.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.statsDesc = new ColumnStatisticsDesc(); + struct.statsDesc.read(iprot); + struct.setStatsDescIsSet(true); + { + org.apache.thrift.protocol.TList _list225 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.statsObj = new ArrayList(_list225.size); + for (int _i226 = 0; _i226 < _list225.size; ++_i226) + { + ColumnStatisticsObj _elem227; // required + _elem227 = new ColumnStatisticsObj(); + _elem227.read(iprot); + struct.statsObj.add(_elem227); + } + } + struct.setStatsObjIsSet(true); + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -33,6 +43,12 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)7); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)8); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionTupleSchemeFactory()); + } + private List values; // required private String dbName; // required private String tableName; // required @@ -40,7 +56,7 @@ private int lastAccessTime; // required private StorageDescriptor sd; // required private Map parameters; // required - private PrincipalPrivilegeSet privileges; // required + private PrincipalPrivilegeSet privileges; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -124,8 +140,8 @@ // isset id assignments private static final int __CREATETIME_ISSET_ID = 0; private static final int __LASTACCESSTIME_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.PRIVILEGES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -180,8 +196,7 @@ * Performs a deep copy on other. */ public Partition(Partition other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetValues()) { List __this__values = new ArrayList(); for (String other_element : other.values) { @@ -332,16 +347,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -354,16 +369,16 @@ } public void unsetLastAccessTime() { - __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } /** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } public void setLastAccessTimeIsSet(boolean value) { - __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); } public StorageDescriptor getSd() { @@ -803,165 +818,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // VALUES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list96 = iprot.readListBegin(); - this.values = new ArrayList(_list96.size); - for (int _i97 = 0; _i97 < _list96.size; ++_i97) - { - String _elem98; // required - _elem98 = iprot.readString(); - this.values.add(_elem98); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // LAST_ACCESS_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.lastAccessTime = iprot.readI32(); - setLastAccessTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // SD - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map99 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map99.size); - for (int _i100 = 0; _i100 < _map99.size; ++_i100) - { - String _key101; // required - String _val102; // required - _key101 = iprot.readString(); - _val102 = iprot.readString(); - this.parameters.put(_key101, _val102); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrincipalPrivilegeSet(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.values != null) { - oprot.writeFieldBegin(VALUES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.values.size())); - for (String _iter103 : this.values) - { - oprot.writeString(_iter103); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.tableName != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.tableName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter104 : this.parameters.entrySet()) - { - oprot.writeString(_iter104.getKey()); - oprot.writeString(_iter104.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.privileges != null) { - if (isSetPrivileges()) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1032,6 +893,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (sd != null) { + sd.validate(); + } + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1045,12 +913,327 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class PartitionStandardSchemeFactory implements SchemeFactory { + public PartitionStandardScheme getScheme() { + return new PartitionStandardScheme(); + } + } + + private static class PartitionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Partition struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list192 = iprot.readListBegin(); + struct.values = new ArrayList(_list192.size); + for (int _i193 = 0; _i193 < _list192.size; ++_i193) + { + String _elem194; // required + _elem194 = iprot.readString(); + struct.values.add(_elem194); + } + iprot.readListEnd(); + } + struct.setValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LAST_ACCESS_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SD + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map195 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map195.size); + for (int _i196 = 0; _i196 < _map195.size; ++_i196) + { + String _key197; // required + String _val198; // required + _key197 = iprot.readString(); + _val198 = iprot.readString(); + struct.parameters.put(_key197, _val198); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Partition struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.values != null) { + oprot.writeFieldBegin(VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); + for (String _iter199 : struct.values) + { + oprot.writeString(_iter199); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(struct.lastAccessTime); + oprot.writeFieldEnd(); + if (struct.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + struct.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter200 : struct.parameters.entrySet()) + { + oprot.writeString(_iter200.getKey()); + oprot.writeString(_iter200.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + if (struct.isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionTupleSchemeFactory implements SchemeFactory { + public PartitionTupleScheme getScheme() { + return new PartitionTupleScheme(); + } + } + + private static class PartitionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Partition struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetValues()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetTableName()) { + optionals.set(2); + } + if (struct.isSetCreateTime()) { + optionals.set(3); + } + if (struct.isSetLastAccessTime()) { + optionals.set(4); + } + if (struct.isSetSd()) { + optionals.set(5); + } + if (struct.isSetParameters()) { + optionals.set(6); + } + if (struct.isSetPrivileges()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetValues()) { + { + oprot.writeI32(struct.values.size()); + for (String _iter201 : struct.values) + { + oprot.writeString(_iter201); + } + } + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetLastAccessTime()) { + oprot.writeI32(struct.lastAccessTime); + } + if (struct.isSetSd()) { + struct.sd.write(oprot); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter202 : struct.parameters.entrySet()) + { + oprot.writeString(_iter202.getKey()); + oprot.writeString(_iter202.getValue()); + } + } + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Partition struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.values = new ArrayList(_list203.size); + for (int _i204 = 0; _i204 < _list203.size; ++_i204) + { + String _elem205; // required + _elem205 = iprot.readString(); + struct.values.add(_elem205); + } + } + struct.setValuesIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(3)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(4)) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } + if (incoming.get(5)) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } + if (incoming.get(6)) { + { + org.apache.thrift.protocol.TMap _map206 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map206.size); + for (int _i207 = 0; _i207 < _map206.size; ++_i207) + { + String _key208; // required + String _val209; // required + _key208 = iprot.readString(); + _val209 = iprot.readString(); + struct.parameters.put(_key208, _val209); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(7)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java (revision 0) @@ -0,0 +1,74 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class hive_metastoreConstants { + + 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"; + + public static final String META_TABLE_COLUMNS = "columns"; + + public static final String META_TABLE_COLUMN_TYPES = "columns.types"; + + public static final String BUCKET_FIELD_NAME = "bucket_field_name"; + + public static final String BUCKET_COUNT = "bucket_count"; + + public static final String FIELD_TO_DIMENSION = "field_to_dimension"; + + public static final String META_TABLE_NAME = "name"; + + public static final String META_TABLE_DB = "db"; + + public static final String META_TABLE_LOCATION = "location"; + + public static final String META_TABLE_SERDE = "serde"; + + public static final String META_TABLE_PARTITION_COLUMNS = "partition_columns"; + + public static final String FILE_INPUT_FORMAT = "file.inputformat"; + + public static final String FILE_OUTPUT_FORMAT = "file.outputformat"; + + public static final String META_TABLE_STORAGE = "storage_handler"; + +} Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField AVG_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("avgColLen", org.apache.thrift.protocol.TType.DOUBLE, (short)2); private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new BinaryColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new BinaryColumnStatsDataTupleSchemeFactory()); + } + private long maxColLen; // required private double avgColLen; // required private long numNulls; // required @@ -100,8 +116,7 @@ private static final int __MAXCOLLEN_ISSET_ID = 0; private static final int __AVGCOLLEN_ISSET_ID = 1; private static final int __NUMNULLS_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -136,8 +151,7 @@ * Performs a deep copy on other. */ public BinaryColumnStatsData(BinaryColumnStatsData other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.maxColLen = other.maxColLen; this.avgColLen = other.avgColLen; this.numNulls = other.numNulls; @@ -167,16 +181,16 @@ } public void unsetMaxColLen() { - __isset_bit_vector.clear(__MAXCOLLEN_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); } /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ public boolean isSetMaxColLen() { - return __isset_bit_vector.get(__MAXCOLLEN_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); } public void setMaxColLenIsSet(boolean value) { - __isset_bit_vector.set(__MAXCOLLEN_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID, value); } public double getAvgColLen() { @@ -189,16 +203,16 @@ } public void unsetAvgColLen() { - __isset_bit_vector.clear(__AVGCOLLEN_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); } /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ public boolean isSetAvgColLen() { - return __isset_bit_vector.get(__AVGCOLLEN_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); } public void setAvgColLenIsSet(boolean value) { - __isset_bit_vector.set(__AVGCOLLEN_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID, value); } public long getNumNulls() { @@ -211,16 +225,16 @@ } public void unsetNumNulls() { - __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ public boolean isSetNumNulls() { - return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } public void setNumNullsIsSet(boolean value) { - __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -395,63 +409,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MAX_COL_LEN - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.maxColLen = iprot.readI64(); - setMaxColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // AVG_COL_LEN - if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { - this.avgColLen = iprot.readDouble(); - setAvgColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NUM_NULLS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numNulls = iprot.readI64(); - setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); - oprot.writeI64(this.maxColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); - oprot.writeDouble(this.avgColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(this.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -488,6 +450,7 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -501,12 +464,110 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class BinaryColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public BinaryColumnStatsDataStandardScheme getScheme() { + return new BinaryColumnStatsDataStandardScheme(); + } + } + + private static class BinaryColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MAX_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AVG_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); + oprot.writeI64(struct.maxColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); + oprot.writeDouble(struct.avgColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class BinaryColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public BinaryColumnStatsDataTupleScheme getScheme() { + return new BinaryColumnStatsDataTupleScheme(); + } + } + + private static class BinaryColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.maxColLen); + oprot.writeDouble(struct.avgColLen); + oprot.writeI64(struct.numNulls); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } + } + } 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 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java (working copy) @@ -1,64 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.7.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import org.apache.commons.lang.builder.HashCodeBuilder; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Constants { - - 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"; - - public static final String META_TABLE_COLUMNS = "columns"; - - public static final String META_TABLE_COLUMN_TYPES = "columns.types"; - - public static final String BUCKET_FIELD_NAME = "bucket_field_name"; - - public static final String BUCKET_COUNT = "bucket_count"; - - public static final String FIELD_TO_DIMENSION = "field_to_dimension"; - - public static final String META_TABLE_NAME = "name"; - - public static final String META_TABLE_DB = "db"; - - public static final String META_TABLE_LOCATION = "location"; - - public static final String META_TABLE_SERDE = "serde"; - - public static final String META_TABLE_PARTITION_COLUMNS = "partition_columns"; - - public static final String FILE_INPUT_FORMAT = "file.inputformat"; - - public static final String FILE_OUTPUT_FORMAT = "file.outputformat"; - - public static final String META_TABLE_STORAGE = "storage_handler"; - -} Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField SERIALIZATION_LIB_FIELD_DESC = new org.apache.thrift.protocol.TField("serializationLib", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SerDeInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SerDeInfoTupleSchemeFactory()); + } + private String name; // required private String serializationLib; // required private Map parameters; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -417,86 +432,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // SERIALIZATION_LIB - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.serializationLib = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map44.size); - for (int _i45 = 0; _i45 < _map44.size; ++_i45) - { - String _key46; // required - String _val47; // required - _key46 = iprot.readString(); - _val47 = iprot.readString(); - this.parameters.put(_key46, _val47); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.serializationLib != null) { - oprot.writeFieldBegin(SERIALIZATION_LIB_FIELD_DESC); - oprot.writeString(this.serializationLib); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter48 : this.parameters.entrySet()) - { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -533,6 +473,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -551,5 +492,171 @@ } } + private static class SerDeInfoStandardSchemeFactory implements SchemeFactory { + public SerDeInfoStandardScheme getScheme() { + return new SerDeInfoStandardScheme(); + } + } + + private static class SerDeInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SerDeInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SERIALIZATION_LIB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.serializationLib = iprot.readString(); + struct.setSerializationLibIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map88 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map88.size); + for (int _i89 = 0; _i89 < _map88.size; ++_i89) + { + String _key90; // required + String _val91; // required + _key90 = iprot.readString(); + _val91 = iprot.readString(); + struct.parameters.put(_key90, _val91); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, SerDeInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.serializationLib != null) { + oprot.writeFieldBegin(SERIALIZATION_LIB_FIELD_DESC); + oprot.writeString(struct.serializationLib); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter92 : struct.parameters.entrySet()) + { + oprot.writeString(_iter92.getKey()); + oprot.writeString(_iter92.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SerDeInfoTupleSchemeFactory implements SchemeFactory { + public SerDeInfoTupleScheme getScheme() { + return new SerDeInfoTupleScheme(); + } + } + + private static class SerDeInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SerDeInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetSerializationLib()) { + optionals.set(1); + } + if (struct.isSetParameters()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetSerializationLib()) { + oprot.writeString(struct.serializationLib); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter93 : struct.parameters.entrySet()) + { + oprot.writeString(_iter93.getKey()); + oprot.writeString(_iter93.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SerDeInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.serializationLib = iprot.readString(); + struct.setSerializationLibIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map94 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map94.size); + for (int _i95 = 0; _i95 < _map94.size; ++_i95) + { + String _key96; // required + String _val97; // required + _key96 = iprot.readString(); + _val97 = iprot.readString(); + struct.parameters.put(_key96, _val97); + } + } + struct.setParametersIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,6 +40,12 @@ private static final org.apache.thrift.protocol.TField PART_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("partValues", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveObjectRefStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveObjectRefTupleSchemeFactory()); + } + private HiveObjectType objectType; // required private String dbName; // required private String objectName; // required @@ -111,7 +127,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -570,107 +585,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // OBJECT_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.objectType = HiveObjectType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OBJECT_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.objectName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // PART_VALUES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); - this.partValues = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; // required - _elem6 = iprot.readString(); - this.partValues.add(_elem6); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // COLUMN_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.columnName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.objectType != null) { - oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC); - oprot.writeI32(this.objectType.getValue()); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.objectName != null) { - oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC); - oprot.writeString(this.objectName); - oprot.writeFieldEnd(); - } - if (this.partValues != null) { - oprot.writeFieldBegin(PART_VALUES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.partValues.size())); - for (String _iter7 : this.partValues) - { - oprot.writeString(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.columnName != null) { - oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); - oprot.writeString(this.columnName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -723,6 +642,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -741,5 +661,211 @@ } } + private static class HiveObjectRefStandardSchemeFactory implements SchemeFactory { + public HiveObjectRefStandardScheme getScheme() { + return new HiveObjectRefStandardScheme(); + } + } + + private static class HiveObjectRefStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveObjectRef struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // OBJECT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.objectType = HiveObjectType.findByValue(iprot.readI32()); + struct.setObjectTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OBJECT_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.objectName = iprot.readString(); + struct.setObjectNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PART_VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.partValues = new ArrayList(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + String _elem10; // required + _elem10 = iprot.readString(); + struct.partValues.add(_elem10); + } + iprot.readListEnd(); + } + struct.setPartValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COLUMN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.columnName = iprot.readString(); + struct.setColumnNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveObjectRef struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.objectType != null) { + oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC); + oprot.writeI32(struct.objectType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.objectName != null) { + oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC); + oprot.writeString(struct.objectName); + oprot.writeFieldEnd(); + } + if (struct.partValues != null) { + oprot.writeFieldBegin(PART_VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partValues.size())); + for (String _iter11 : struct.partValues) + { + oprot.writeString(_iter11); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.columnName != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(struct.columnName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveObjectRefTupleSchemeFactory implements SchemeFactory { + public HiveObjectRefTupleScheme getScheme() { + return new HiveObjectRefTupleScheme(); + } + } + + private static class HiveObjectRefTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveObjectRef struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetObjectType()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetObjectName()) { + optionals.set(2); + } + if (struct.isSetPartValues()) { + optionals.set(3); + } + if (struct.isSetColumnName()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetObjectType()) { + oprot.writeI32(struct.objectType.getValue()); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetObjectName()) { + oprot.writeString(struct.objectName); + } + if (struct.isSetPartValues()) { + { + oprot.writeI32(struct.partValues.size()); + for (String _iter12 : struct.partValues) + { + oprot.writeString(_iter12); + } + } + } + if (struct.isSetColumnName()) { + oprot.writeString(struct.columnName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveObjectRef struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.objectType = HiveObjectType.findByValue(iprot.readI32()); + struct.setObjectTypeIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.objectName = iprot.readString(); + struct.setObjectNameIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partValues = new ArrayList(_list13.size); + for (int _i14 = 0; _i14 < _list13.size; ++_i14) + { + String _elem15; // required + _elem15 = iprot.readString(); + struct.partValues.add(_elem15); + } + } + struct.setPartValuesIsSet(true); + } + if (incoming.get(4)) { + struct.columnName = iprot.readString(); + struct.setColumnNameIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ConfigValSecurityException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class ConfigValSecurityException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConfigValSecurityException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ConfigValSecurityExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ConfigValSecurityExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class ConfigValSecurityExceptionStandardSchemeFactory implements SchemeFactory { + public ConfigValSecurityExceptionStandardScheme getScheme() { + return new ConfigValSecurityExceptionStandardScheme(); + } + } + + private static class ConfigValSecurityExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ConfigValSecurityExceptionTupleSchemeFactory implements SchemeFactory { + public ConfigValSecurityExceptionTupleScheme getScheme() { + return new ConfigValSecurityExceptionTupleScheme(); + } + } + + private static class ConfigValSecurityExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("comments", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new VersionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new VersionTupleSchemeFactory()); + } + private String version; // required private String comments; // required @@ -92,7 +108,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -319,54 +334,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // VERSION - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.version = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // COMMENTS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.comments = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeString(this.version); - oprot.writeFieldEnd(); - } - if (this.comments != null) { - oprot.writeFieldBegin(COMMENTS_FIELD_DESC); - oprot.writeString(this.comments); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -395,6 +367,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -413,5 +386,110 @@ } } + private static class VersionStandardSchemeFactory implements SchemeFactory { + public VersionStandardScheme getScheme() { + return new VersionStandardScheme(); + } + } + + private static class VersionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Version struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COMMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.comments = iprot.readString(); + struct.setCommentsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Version struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.comments != null) { + oprot.writeFieldBegin(COMMENTS_FIELD_DESC); + oprot.writeString(struct.comments); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class VersionTupleSchemeFactory implements SchemeFactory { + public VersionTupleScheme getScheme() { + return new VersionTupleScheme(); + } + } + + private static class VersionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Version struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetVersion()) { + optionals.set(0); + } + if (struct.isSetComments()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetVersion()) { + oprot.writeString(struct.version); + } + if (struct.isSetComments()) { + oprot.writeString(struct.comments); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Version struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } + if (incoming.get(1)) { + struct.comments = iprot.readString(); + struct.setCommentsIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidOperationException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class InvalidOperationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperationException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidOperationExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidOperationExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class InvalidOperationExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidOperationExceptionStandardScheme getScheme() { + return new InvalidOperationExceptionStandardScheme(); + } + } + + private static class InvalidOperationExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidOperationException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidOperationException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidOperationExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidOperationExceptionTupleScheme getScheme() { + return new InvalidOperationExceptionTupleScheme(); + } + } + + private static class InvalidOperationExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidOperationException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidOperationException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -38,6 +48,12 @@ private static final org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)12); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)13); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TableStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TableTupleSchemeFactory()); + } + private String tableName; // required private String dbName; // required private String owner; // required @@ -50,7 +66,7 @@ private String viewOriginalText; // required private String viewExpandedText; // required private String tableType; // required - private PrincipalPrivilegeSet privileges; // required + private PrincipalPrivilegeSet privileges; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -150,8 +166,8 @@ private static final int __CREATETIME_ISSET_ID = 0; private static final int __LASTACCESSTIME_ISSET_ID = 1; private static final int __RETENTION_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.PRIVILEGES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -227,8 +243,7 @@ * Performs a deep copy on other. */ public Table(Table other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetTableName()) { this.tableName = other.tableName; } @@ -383,16 +398,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -405,16 +420,16 @@ } public void unsetLastAccessTime() { - __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } /** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } public void setLastAccessTimeIsSet(boolean value) { - __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); } public int getRetention() { @@ -427,16 +442,16 @@ } public void unsetRetention() { - __isset_bit_vector.clear(__RETENTION_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETENTION_ISSET_ID); } /** Returns true if field retention is set (has been assigned a value) and false otherwise */ public boolean isSetRetention() { - return __isset_bit_vector.get(__RETENTION_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __RETENTION_ISSET_ID); } public void setRetentionIsSet(boolean value) { - __isset_bit_vector.set(__RETENTION_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETENTION_ISSET_ID, value); } public StorageDescriptor getSd() { @@ -1168,225 +1183,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OWNER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.owner = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // LAST_ACCESS_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.lastAccessTime = iprot.readI32(); - setLastAccessTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // RETENTION - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.retention = iprot.readI32(); - setRetentionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // SD - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // PARTITION_KEYS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(); - this.partitionKeys = new ArrayList(_list87.size); - for (int _i88 = 0; _i88 < _list87.size; ++_i88) - { - FieldSchema _elem89; // required - _elem89 = new FieldSchema(); - _elem89.read(iprot); - this.partitionKeys.add(_elem89); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 9: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map90.size); - for (int _i91 = 0; _i91 < _map90.size; ++_i91) - { - String _key92; // required - String _val93; // required - _key92 = iprot.readString(); - _val93 = iprot.readString(); - this.parameters.put(_key92, _val93); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 10: // VIEW_ORIGINAL_TEXT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.viewOriginalText = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 11: // VIEW_EXPANDED_TEXT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.viewExpandedText = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 12: // TABLE_TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tableType = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 13: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrincipalPrivilegeSet(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tableName != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.tableName); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.owner != null) { - oprot.writeFieldBegin(OWNER_FIELD_DESC); - oprot.writeString(this.owner); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RETENTION_FIELD_DESC); - oprot.writeI32(this.retention); - oprot.writeFieldEnd(); - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.partitionKeys != null) { - oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.partitionKeys.size())); - for (FieldSchema _iter94 : this.partitionKeys) - { - _iter94.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter95 : this.parameters.entrySet()) - { - oprot.writeString(_iter95.getKey()); - oprot.writeString(_iter95.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.viewOriginalText != null) { - oprot.writeFieldBegin(VIEW_ORIGINAL_TEXT_FIELD_DESC); - oprot.writeString(this.viewOriginalText); - oprot.writeFieldEnd(); - } - if (this.viewExpandedText != null) { - oprot.writeFieldBegin(VIEW_EXPANDED_TEXT_FIELD_DESC); - oprot.writeString(this.viewExpandedText); - oprot.writeFieldEnd(); - } - if (this.tableType != null) { - oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); - oprot.writeString(this.tableType); - oprot.writeFieldEnd(); - } - if (this.privileges != null) { - if (isSetPrivileges()) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1493,6 +1294,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (sd != null) { + sd.validate(); + } + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1506,12 +1314,442 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class TableStandardSchemeFactory implements SchemeFactory { + public TableStandardScheme getScheme() { + return new TableStandardScheme(); + } + } + + private static class TableStandardScheme extends StandardScheme
{ + + public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OWNER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.owner = iprot.readString(); + struct.setOwnerIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LAST_ACCESS_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // RETENTION + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.retention = iprot.readI32(); + struct.setRetentionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SD + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // PARTITION_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list174 = iprot.readListBegin(); + struct.partitionKeys = new ArrayList(_list174.size); + for (int _i175 = 0; _i175 < _list174.size; ++_i175) + { + FieldSchema _elem176; // required + _elem176 = new FieldSchema(); + _elem176.read(iprot); + struct.partitionKeys.add(_elem176); + } + iprot.readListEnd(); + } + struct.setPartitionKeysIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map177 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map177.size); + for (int _i178 = 0; _i178 < _map177.size; ++_i178) + { + String _key179; // required + String _val180; // required + _key179 = iprot.readString(); + _val180 = iprot.readString(); + struct.parameters.put(_key179, _val180); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // VIEW_ORIGINAL_TEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.viewOriginalText = iprot.readString(); + struct.setViewOriginalTextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // VIEW_EXPANDED_TEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.viewExpandedText = iprot.readString(); + struct.setViewExpandedTextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // TABLE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableType = iprot.readString(); + struct.setTableTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Table struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.owner != null) { + oprot.writeFieldBegin(OWNER_FIELD_DESC); + oprot.writeString(struct.owner); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(struct.lastAccessTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RETENTION_FIELD_DESC); + oprot.writeI32(struct.retention); + oprot.writeFieldEnd(); + if (struct.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + struct.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.partitionKeys != null) { + oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitionKeys.size())); + for (FieldSchema _iter181 : struct.partitionKeys) + { + _iter181.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter182 : struct.parameters.entrySet()) + { + oprot.writeString(_iter182.getKey()); + oprot.writeString(_iter182.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.viewOriginalText != null) { + oprot.writeFieldBegin(VIEW_ORIGINAL_TEXT_FIELD_DESC); + oprot.writeString(struct.viewOriginalText); + oprot.writeFieldEnd(); + } + if (struct.viewExpandedText != null) { + oprot.writeFieldBegin(VIEW_EXPANDED_TEXT_FIELD_DESC); + oprot.writeString(struct.viewExpandedText); + oprot.writeFieldEnd(); + } + if (struct.tableType != null) { + oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); + oprot.writeString(struct.tableType); + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + if (struct.isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TableTupleSchemeFactory implements SchemeFactory { + public TableTupleScheme getScheme() { + return new TableTupleScheme(); + } + } + + private static class TableTupleScheme extends TupleScheme
{ + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Table struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetOwner()) { + optionals.set(2); + } + if (struct.isSetCreateTime()) { + optionals.set(3); + } + if (struct.isSetLastAccessTime()) { + optionals.set(4); + } + if (struct.isSetRetention()) { + optionals.set(5); + } + if (struct.isSetSd()) { + optionals.set(6); + } + if (struct.isSetPartitionKeys()) { + optionals.set(7); + } + if (struct.isSetParameters()) { + optionals.set(8); + } + if (struct.isSetViewOriginalText()) { + optionals.set(9); + } + if (struct.isSetViewExpandedText()) { + optionals.set(10); + } + if (struct.isSetTableType()) { + optionals.set(11); + } + if (struct.isSetPrivileges()) { + optionals.set(12); + } + oprot.writeBitSet(optionals, 13); + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetOwner()) { + oprot.writeString(struct.owner); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetLastAccessTime()) { + oprot.writeI32(struct.lastAccessTime); + } + if (struct.isSetRetention()) { + oprot.writeI32(struct.retention); + } + if (struct.isSetSd()) { + struct.sd.write(oprot); + } + if (struct.isSetPartitionKeys()) { + { + oprot.writeI32(struct.partitionKeys.size()); + for (FieldSchema _iter183 : struct.partitionKeys) + { + _iter183.write(oprot); + } + } + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter184 : struct.parameters.entrySet()) + { + oprot.writeString(_iter184.getKey()); + oprot.writeString(_iter184.getValue()); + } + } + } + if (struct.isSetViewOriginalText()) { + oprot.writeString(struct.viewOriginalText); + } + if (struct.isSetViewExpandedText()) { + oprot.writeString(struct.viewExpandedText); + } + if (struct.isSetTableType()) { + oprot.writeString(struct.tableType); + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(13); + if (incoming.get(0)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.owner = iprot.readString(); + struct.setOwnerIsSet(true); + } + if (incoming.get(3)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(4)) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } + if (incoming.get(5)) { + struct.retention = iprot.readI32(); + struct.setRetentionIsSet(true); + } + if (incoming.get(6)) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } + if (incoming.get(7)) { + { + org.apache.thrift.protocol.TList _list185 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitionKeys = new ArrayList(_list185.size); + for (int _i186 = 0; _i186 < _list185.size; ++_i186) + { + FieldSchema _elem187; // required + _elem187 = new FieldSchema(); + _elem187.read(iprot); + struct.partitionKeys.add(_elem187); + } + } + struct.setPartitionKeysIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TMap _map188 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map188.size); + for (int _i189 = 0; _i189 < _map188.size; ++_i189) + { + String _key190; // required + String _val191; // required + _key190 = iprot.readString(); + _val191 = iprot.readString(); + struct.parameters.put(_key190, _val191); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(9)) { + struct.viewOriginalText = iprot.readString(); + struct.setViewOriginalTextIsSet(true); + } + if (incoming.get(10)) { + struct.viewExpandedText = iprot.readString(); + struct.setViewExpandedTextIsSet(true); + } + if (incoming.get(11)) { + struct.tableType = iprot.readString(); + struct.setTableTypeIsSet(true); + } + if (incoming.get(12)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class IndexAlreadyExistsException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class IndexAlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IndexAlreadyExistsException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IndexAlreadyExistsExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IndexAlreadyExistsExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class IndexAlreadyExistsExceptionStandardSchemeFactory implements SchemeFactory { + public IndexAlreadyExistsExceptionStandardScheme getScheme() { + return new IndexAlreadyExistsExceptionStandardScheme(); + } + } + + private static class IndexAlreadyExistsExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IndexAlreadyExistsExceptionTupleSchemeFactory implements SchemeFactory { + public IndexAlreadyExistsExceptionTupleScheme getScheme() { + return new IndexAlreadyExistsExceptionTupleScheme(); + } + } + + private static class IndexAlreadyExistsExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -29,6 +39,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principalType", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField GRANT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("grantInfo", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveObjectPrivilegeStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveObjectPrivilegeTupleSchemeFactory()); + } + private HiveObjectRef hiveObject; // required private String principalName; // required private PrincipalType principalType; // required @@ -106,7 +122,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -477,80 +492,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // HIVE_OBJECT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.hiveObject = new HiveObjectRef(); - this.hiveObject.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principalName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principalType = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // GRANT_INFO - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.grantInfo = new PrivilegeGrantInfo(); - this.grantInfo.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.hiveObject != null) { - oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); - this.hiveObject.write(oprot); - oprot.writeFieldEnd(); - } - if (this.principalName != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principalName); - oprot.writeFieldEnd(); - } - if (this.principalType != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principalType.getValue()); - oprot.writeFieldEnd(); - } - if (this.grantInfo != null) { - oprot.writeFieldBegin(GRANT_INFO_FIELD_DESC); - this.grantInfo.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -595,6 +541,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (hiveObject != null) { + hiveObject.validate(); + } + if (grantInfo != null) { + grantInfo.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -613,5 +566,160 @@ } } + private static class HiveObjectPrivilegeStandardSchemeFactory implements SchemeFactory { + public HiveObjectPrivilegeStandardScheme getScheme() { + return new HiveObjectPrivilegeStandardScheme(); + } + } + + private static class HiveObjectPrivilegeStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // HIVE_OBJECT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principalName = iprot.readString(); + struct.setPrincipalNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principalType = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // GRANT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.grantInfo = new PrivilegeGrantInfo(); + struct.grantInfo.read(iprot); + struct.setGrantInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + struct.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principalName); + oprot.writeFieldEnd(); + } + if (struct.principalType != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principalType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.grantInfo != null) { + oprot.writeFieldBegin(GRANT_INFO_FIELD_DESC); + struct.grantInfo.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveObjectPrivilegeTupleSchemeFactory implements SchemeFactory { + public HiveObjectPrivilegeTupleScheme getScheme() { + return new HiveObjectPrivilegeTupleScheme(); + } + } + + private static class HiveObjectPrivilegeTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetHiveObject()) { + optionals.set(0); + } + if (struct.isSetPrincipalName()) { + optionals.set(1); + } + if (struct.isSetPrincipalType()) { + optionals.set(2); + } + if (struct.isSetGrantInfo()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetHiveObject()) { + struct.hiveObject.write(oprot); + } + if (struct.isSetPrincipalName()) { + oprot.writeString(struct.principalName); + } + if (struct.isSetPrincipalType()) { + oprot.writeI32(struct.principalType.getValue()); + } + if (struct.isSetGrantInfo()) { + struct.grantInfo.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } + if (incoming.get(1)) { + struct.principalName = iprot.readString(); + struct.setPrincipalNameIsSet(true); + } + if (incoming.get(2)) { + struct.principalType = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } + if (incoming.get(3)) { + struct.grantInfo = new PrivilegeGrantInfo(); + struct.grantInfo.read(iprot); + struct.setGrantInfoIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField SKEWED_COL_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColValues", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColValueLocationMaps", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SkewedInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SkewedInfoTupleSchemeFactory()); + } + private List skewedColNames; // required private List> skewedColValues; // required private Map,String> skewedColValueLocationMaps; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -466,154 +481,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // SKEWED_COL_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list49 = iprot.readListBegin(); - this.skewedColNames = new ArrayList(_list49.size); - for (int _i50 = 0; _i50 < _list49.size; ++_i50) - { - String _elem51; // required - _elem51 = iprot.readString(); - this.skewedColNames.add(_elem51); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // SKEWED_COL_VALUES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list52 = iprot.readListBegin(); - this.skewedColValues = new ArrayList>(_list52.size); - for (int _i53 = 0; _i53 < _list52.size; ++_i53) - { - List _elem54; // required - { - org.apache.thrift.protocol.TList _list55 = iprot.readListBegin(); - _elem54 = new ArrayList(_list55.size); - for (int _i56 = 0; _i56 < _list55.size; ++_i56) - { - String _elem57; // required - _elem57 = iprot.readString(); - _elem54.add(_elem57); - } - iprot.readListEnd(); - } - this.skewedColValues.add(_elem54); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // SKEWED_COL_VALUE_LOCATION_MAPS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map58 = iprot.readMapBegin(); - this.skewedColValueLocationMaps = new HashMap,String>(2*_map58.size); - for (int _i59 = 0; _i59 < _map58.size; ++_i59) - { - List _key60; // required - String _val61; // required - { - org.apache.thrift.protocol.TList _list62 = iprot.readListBegin(); - _key60 = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) - { - String _elem64; // required - _elem64 = iprot.readString(); - _key60.add(_elem64); - } - iprot.readListEnd(); - } - _val61 = iprot.readString(); - this.skewedColValueLocationMaps.put(_key60, _val61); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.skewedColNames != null) { - oprot.writeFieldBegin(SKEWED_COL_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.skewedColNames.size())); - for (String _iter65 : this.skewedColNames) - { - oprot.writeString(_iter65); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.skewedColValues != null) { - oprot.writeFieldBegin(SKEWED_COL_VALUES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, this.skewedColValues.size())); - for (List _iter66 : this.skewedColValues) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter66.size())); - for (String _iter67 : _iter66) - { - oprot.writeString(_iter67); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.skewedColValueLocationMaps != null) { - oprot.writeFieldBegin(SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, this.skewedColValueLocationMaps.size())); - for (Map.Entry, String> _iter68 : this.skewedColValueLocationMaps.entrySet()) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter68.getKey().size())); - for (String _iter69 : _iter68.getKey()) - { - oprot.writeString(_iter69); - } - oprot.writeListEnd(); - } - oprot.writeString(_iter68.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -650,6 +522,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -668,5 +541,299 @@ } } + private static class SkewedInfoStandardSchemeFactory implements SchemeFactory { + public SkewedInfoStandardScheme getScheme() { + return new SkewedInfoStandardScheme(); + } + } + + private static class SkewedInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SKEWED_COL_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); + struct.skewedColNames = new ArrayList(_list98.size); + for (int _i99 = 0; _i99 < _list98.size; ++_i99) + { + String _elem100; // required + _elem100 = iprot.readString(); + struct.skewedColNames.add(_elem100); + } + iprot.readListEnd(); + } + struct.setSkewedColNamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SKEWED_COL_VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(); + struct.skewedColValues = new ArrayList>(_list101.size); + for (int _i102 = 0; _i102 < _list101.size; ++_i102) + { + List _elem103; // required + { + org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); + _elem103 = new ArrayList(_list104.size); + for (int _i105 = 0; _i105 < _list104.size; ++_i105) + { + String _elem106; // required + _elem106 = iprot.readString(); + _elem103.add(_elem106); + } + iprot.readListEnd(); + } + struct.skewedColValues.add(_elem103); + } + iprot.readListEnd(); + } + struct.setSkewedColValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SKEWED_COL_VALUE_LOCATION_MAPS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map107 = iprot.readMapBegin(); + struct.skewedColValueLocationMaps = new HashMap,String>(2*_map107.size); + for (int _i108 = 0; _i108 < _map107.size; ++_i108) + { + List _key109; // required + String _val110; // required + { + org.apache.thrift.protocol.TList _list111 = iprot.readListBegin(); + _key109 = new ArrayList(_list111.size); + for (int _i112 = 0; _i112 < _list111.size; ++_i112) + { + String _elem113; // required + _elem113 = iprot.readString(); + _key109.add(_elem113); + } + iprot.readListEnd(); + } + _val110 = iprot.readString(); + struct.skewedColValueLocationMaps.put(_key109, _val110); + } + iprot.readMapEnd(); + } + struct.setSkewedColValueLocationMapsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, SkewedInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.skewedColNames != null) { + oprot.writeFieldBegin(SKEWED_COL_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.skewedColNames.size())); + for (String _iter114 : struct.skewedColNames) + { + oprot.writeString(_iter114); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.skewedColValues != null) { + oprot.writeFieldBegin(SKEWED_COL_VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.skewedColValues.size())); + for (List _iter115 : struct.skewedColValues) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter115.size())); + for (String _iter116 : _iter115) + { + oprot.writeString(_iter116); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.skewedColValueLocationMaps != null) { + oprot.writeFieldBegin(SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, struct.skewedColValueLocationMaps.size())); + for (Map.Entry, String> _iter117 : struct.skewedColValueLocationMaps.entrySet()) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter117.getKey().size())); + for (String _iter118 : _iter117.getKey()) + { + oprot.writeString(_iter118); + } + oprot.writeListEnd(); + } + oprot.writeString(_iter117.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SkewedInfoTupleSchemeFactory implements SchemeFactory { + public SkewedInfoTupleScheme getScheme() { + return new SkewedInfoTupleScheme(); + } + } + + private static class SkewedInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSkewedColNames()) { + optionals.set(0); + } + if (struct.isSetSkewedColValues()) { + optionals.set(1); + } + if (struct.isSetSkewedColValueLocationMaps()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSkewedColNames()) { + { + oprot.writeI32(struct.skewedColNames.size()); + for (String _iter119 : struct.skewedColNames) + { + oprot.writeString(_iter119); + } + } + } + if (struct.isSetSkewedColValues()) { + { + oprot.writeI32(struct.skewedColValues.size()); + for (List _iter120 : struct.skewedColValues) + { + { + oprot.writeI32(_iter120.size()); + for (String _iter121 : _iter120) + { + oprot.writeString(_iter121); + } + } + } + } + } + if (struct.isSetSkewedColValueLocationMaps()) { + { + oprot.writeI32(struct.skewedColValueLocationMaps.size()); + for (Map.Entry, String> _iter122 : struct.skewedColValueLocationMaps.entrySet()) + { + { + oprot.writeI32(_iter122.getKey().size()); + for (String _iter123 : _iter122.getKey()) + { + oprot.writeString(_iter123); + } + } + oprot.writeString(_iter122.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list124 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.skewedColNames = new ArrayList(_list124.size); + for (int _i125 = 0; _i125 < _list124.size; ++_i125) + { + String _elem126; // required + _elem126 = iprot.readString(); + struct.skewedColNames.add(_elem126); + } + } + struct.setSkewedColNamesIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.skewedColValues = new ArrayList>(_list127.size); + for (int _i128 = 0; _i128 < _list127.size; ++_i128) + { + List _elem129; // required + { + org.apache.thrift.protocol.TList _list130 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _elem129 = new ArrayList(_list130.size); + for (int _i131 = 0; _i131 < _list130.size; ++_i131) + { + String _elem132; // required + _elem132 = iprot.readString(); + _elem129.add(_elem132); + } + } + struct.skewedColValues.add(_elem129); + } + } + struct.setSkewedColValuesIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map133 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.skewedColValueLocationMaps = new HashMap,String>(2*_map133.size); + for (int _i134 = 0; _i134 < _map133.size; ++_i134) + { + List _key135; // required + String _val136; // required + { + org.apache.thrift.protocol.TList _list137 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _key135 = new ArrayList(_list137.size); + for (int _i138 = 0; _i138 < _list137.size; ++_i138) + { + String _elem139; // required + _elem139 = iprot.readString(); + _key135.add(_elem139); + } + } + _val136 = iprot.readString(); + struct.skewedColValueLocationMaps.put(_key135, _val136); + } + } + struct.setSkewedColValueLocationMapsIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -29,6 +39,12 @@ private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DoubleColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DoubleColumnStatsDataTupleSchemeFactory()); + } + private double lowValue; // required private double highValue; // required private long numNulls; // required @@ -106,8 +122,7 @@ private static final int __HIGHVALUE_ISSET_ID = 1; private static final int __NUMNULLS_ISSET_ID = 2; private static final int __NUMDVS_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -147,8 +162,7 @@ * Performs a deep copy on other. */ public DoubleColumnStatsData(DoubleColumnStatsData other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.lowValue = other.lowValue; this.highValue = other.highValue; this.numNulls = other.numNulls; @@ -181,16 +195,16 @@ } public void unsetLowValue() { - __isset_bit_vector.clear(__LOWVALUE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOWVALUE_ISSET_ID); } /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ public boolean isSetLowValue() { - return __isset_bit_vector.get(__LOWVALUE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LOWVALUE_ISSET_ID); } public void setLowValueIsSet(boolean value) { - __isset_bit_vector.set(__LOWVALUE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOWVALUE_ISSET_ID, value); } public double getHighValue() { @@ -203,16 +217,16 @@ } public void unsetHighValue() { - __isset_bit_vector.clear(__HIGHVALUE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); } /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ public boolean isSetHighValue() { - return __isset_bit_vector.get(__HIGHVALUE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); } public void setHighValueIsSet(boolean value) { - __isset_bit_vector.set(__HIGHVALUE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHVALUE_ISSET_ID, value); } public long getNumNulls() { @@ -225,16 +239,16 @@ } public void unsetNumNulls() { - __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ public boolean isSetNumNulls() { - return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } public void setNumNullsIsSet(boolean value) { - __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); } public long getNumDVs() { @@ -247,16 +261,16 @@ } public void unsetNumDVs() { - __isset_bit_vector.clear(__NUMDVS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); } /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ public boolean isSetNumDVs() { - return __isset_bit_vector.get(__NUMDVS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); } public void setNumDVsIsSet(boolean value) { - __isset_bit_vector.set(__NUMDVS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -468,74 +482,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // LOW_VALUE - if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { - this.lowValue = iprot.readDouble(); - setLowValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // HIGH_VALUE - if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { - this.highValue = iprot.readDouble(); - setHighValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NUM_NULLS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numNulls = iprot.readI64(); - setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // NUM_DVS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numDVs = iprot.readI64(); - setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); - oprot.writeDouble(this.lowValue); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); - oprot.writeDouble(this.highValue); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(this.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(this.numDVs); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -580,6 +531,7 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -593,12 +545,124 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class DoubleColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public DoubleColumnStatsDataStandardScheme getScheme() { + return new DoubleColumnStatsDataStandardScheme(); + } + } + + private static class DoubleColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // LOW_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.lowValue = iprot.readDouble(); + struct.setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HIGH_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.highValue = iprot.readDouble(); + struct.setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + oprot.writeDouble(struct.lowValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + oprot.writeDouble(struct.highValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DoubleColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public DoubleColumnStatsDataTupleScheme getScheme() { + return new DoubleColumnStatsDataTupleScheme(); + } + } + + private static class DoubleColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeDouble(struct.lowValue); + oprot.writeDouble(struct.highValue); + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.lowValue = iprot.readDouble(); + struct.setLowValueIsSet(true); + struct.highValue = iprot.readDouble(); + struct.setHighValueIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RoleStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RoleTupleSchemeFactory()); + } + private String roleName; // required private int createTime; // required private String ownerName; // required @@ -98,8 +114,7 @@ // isset id assignments private static final int __CREATETIME_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -132,8 +147,7 @@ * Performs a deep copy on other. */ public Role(Role other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetRoleName()) { this.roleName = other.roleName; } @@ -188,16 +202,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public String getOwnerName() { @@ -395,65 +409,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.roleName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OWNER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.ownerName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.roleName != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.roleName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - if (this.ownerName != null) { - oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); - oprot.writeString(this.ownerName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -486,6 +446,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -499,12 +460,138 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class RoleStandardSchemeFactory implements SchemeFactory { + public RoleStandardScheme getScheme() { + return new RoleStandardScheme(); + } + } + + private static class RoleStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Role struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.roleName = iprot.readString(); + struct.setRoleNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OWNER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ownerName = iprot.readString(); + struct.setOwnerNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Role struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.roleName != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.roleName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + if (struct.ownerName != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(struct.ownerName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RoleTupleSchemeFactory implements SchemeFactory { + public RoleTupleScheme getScheme() { + return new RoleTupleScheme(); + } + } + + private static class RoleTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Role struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRoleName()) { + optionals.set(0); + } + if (struct.isSetCreateTime()) { + optionals.set(1); + } + if (struct.isSetOwnerName()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetRoleName()) { + oprot.writeString(struct.roleName); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetOwnerName()) { + oprot.writeString(struct.ownerName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Role struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.roleName = iprot.readString(); + struct.setRoleNameIsSet(true); + } + if (incoming.get(1)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(2)) { + struct.ownerName = iprot.readString(); + struct.setOwnerNameIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField COL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("colType", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField STATS_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("statsData", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnStatisticsObjStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnStatisticsObjTupleSchemeFactory()); + } + private String colName; // required private String colType; // required private ColumnStatisticsData statsData; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -392,67 +407,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // COL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.colName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // COL_TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.colType = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // STATS_DATA - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.statsData = new ColumnStatisticsData(); - this.statsData.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.colName != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(this.colName); - oprot.writeFieldEnd(); - } - if (this.colType != null) { - oprot.writeFieldBegin(COL_TYPE_FIELD_DESC); - oprot.writeString(this.colType); - oprot.writeFieldEnd(); - } - if (this.statsData != null) { - oprot.writeFieldBegin(STATS_DATA_FIELD_DESC); - this.statsData.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -501,6 +460,7 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsData' is unset! Struct:" + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -519,5 +479,111 @@ } } + private static class ColumnStatisticsObjStandardSchemeFactory implements SchemeFactory { + public ColumnStatisticsObjStandardScheme getScheme() { + return new ColumnStatisticsObjStandardScheme(); + } + } + + private static class ColumnStatisticsObjStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.colName = iprot.readString(); + struct.setColNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.colType = iprot.readString(); + struct.setColTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STATS_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.statsData = new ColumnStatisticsData(); + struct.statsData.read(iprot); + struct.setStatsDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.colName != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.colName); + oprot.writeFieldEnd(); + } + if (struct.colType != null) { + oprot.writeFieldBegin(COL_TYPE_FIELD_DESC); + oprot.writeString(struct.colType); + oprot.writeFieldEnd(); + } + if (struct.statsData != null) { + oprot.writeFieldBegin(STATS_DATA_FIELD_DESC); + struct.statsData.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnStatisticsObjTupleSchemeFactory implements SchemeFactory { + public ColumnStatisticsObjTupleScheme getScheme() { + return new ColumnStatisticsObjTupleScheme(); + } + } + + private static class ColumnStatisticsObjTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.colName); + oprot.writeString(struct.colType); + struct.statsData.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.colName = iprot.readString(); + struct.setColNameIsSet(true); + struct.colType = iprot.readString(); + struct.setColTypeIsSet(true); + struct.statsData = new ColumnStatisticsData(); + struct.statsData.read(iprot); + struct.setStatsDataIsSet(true); + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -36,6 +46,12 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)10); private static final org.apache.thrift.protocol.TField SKEWED_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedInfo", org.apache.thrift.protocol.TType.STRUCT, (short)11); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new StorageDescriptorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new StorageDescriptorTupleSchemeFactory()); + } + private List cols; // required private String location; // required private String inputFormat; // required @@ -46,7 +62,7 @@ private List bucketCols; // required private List sortCols; // required private Map parameters; // required - private SkewedInfo skewedInfo; // required + private SkewedInfo skewedInfo; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -139,8 +155,8 @@ // isset id assignments private static final int __COMPRESSED_ISSET_ID = 0; private static final int __NUMBUCKETS_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.SKEWED_INFO}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -209,8 +225,7 @@ * Performs a deep copy on other. */ public StorageDescriptor(StorageDescriptor other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetCols()) { List __this__cols = new ArrayList(); for (FieldSchema other_element : other.cols) { @@ -404,16 +419,16 @@ } public void unsetCompressed() { - __isset_bit_vector.clear(__COMPRESSED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPRESSED_ISSET_ID); } /** Returns true if field compressed is set (has been assigned a value) and false otherwise */ public boolean isSetCompressed() { - return __isset_bit_vector.get(__COMPRESSED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID); } public void setCompressedIsSet(boolean value) { - __isset_bit_vector.set(__COMPRESSED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value); } public int getNumBuckets() { @@ -426,16 +441,16 @@ } public void unsetNumBuckets() { - __isset_bit_vector.clear(__NUMBUCKETS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID); } /** Returns true if field numBuckets is set (has been assigned a value) and false otherwise */ public boolean isSetNumBuckets() { - return __isset_bit_vector.get(__NUMBUCKETS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID); } public void setNumBucketsIsSet(boolean value) { - __isset_bit_vector.set(__NUMBUCKETS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID, value); } public SerDeInfo getSerdeInfo() { @@ -1062,237 +1077,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // COLS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list70 = iprot.readListBegin(); - this.cols = new ArrayList(_list70.size); - for (int _i71 = 0; _i71 < _list70.size; ++_i71) - { - FieldSchema _elem72; // required - _elem72 = new FieldSchema(); - _elem72.read(iprot); - this.cols.add(_elem72); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // LOCATION - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.location = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // INPUT_FORMAT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.inputFormat = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // OUTPUT_FORMAT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.outputFormat = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // COMPRESSED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.compressed = iprot.readBool(); - setCompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // NUM_BUCKETS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.numBuckets = iprot.readI32(); - setNumBucketsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // SERDE_INFO - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.serdeInfo = new SerDeInfo(); - this.serdeInfo.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // BUCKET_COLS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list73 = iprot.readListBegin(); - this.bucketCols = new ArrayList(_list73.size); - for (int _i74 = 0; _i74 < _list73.size; ++_i74) - { - String _elem75; // required - _elem75 = iprot.readString(); - this.bucketCols.add(_elem75); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 9: // SORT_COLS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list76 = iprot.readListBegin(); - this.sortCols = new ArrayList(_list76.size); - for (int _i77 = 0; _i77 < _list76.size; ++_i77) - { - Order _elem78; // required - _elem78 = new Order(); - _elem78.read(iprot); - this.sortCols.add(_elem78); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 10: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map79 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map79.size); - for (int _i80 = 0; _i80 < _map79.size; ++_i80) - { - String _key81; // required - String _val82; // required - _key81 = iprot.readString(); - _val82 = iprot.readString(); - this.parameters.put(_key81, _val82); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 11: // SKEWED_INFO - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.skewedInfo = new SkewedInfo(); - this.skewedInfo.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.cols != null) { - oprot.writeFieldBegin(COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.cols.size())); - for (FieldSchema _iter83 : this.cols) - { - _iter83.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.location != null) { - oprot.writeFieldBegin(LOCATION_FIELD_DESC); - oprot.writeString(this.location); - oprot.writeFieldEnd(); - } - if (this.inputFormat != null) { - oprot.writeFieldBegin(INPUT_FORMAT_FIELD_DESC); - oprot.writeString(this.inputFormat); - oprot.writeFieldEnd(); - } - if (this.outputFormat != null) { - oprot.writeFieldBegin(OUTPUT_FORMAT_FIELD_DESC); - oprot.writeString(this.outputFormat); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); - oprot.writeBool(this.compressed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_BUCKETS_FIELD_DESC); - oprot.writeI32(this.numBuckets); - oprot.writeFieldEnd(); - if (this.serdeInfo != null) { - oprot.writeFieldBegin(SERDE_INFO_FIELD_DESC); - this.serdeInfo.write(oprot); - oprot.writeFieldEnd(); - } - if (this.bucketCols != null) { - oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.bucketCols.size())); - for (String _iter84 : this.bucketCols) - { - oprot.writeString(_iter84); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.sortCols != null) { - oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.sortCols.size())); - for (Order _iter85 : this.sortCols) - { - _iter85.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter86 : this.parameters.entrySet()) - { - oprot.writeString(_iter86.getKey()); - oprot.writeString(_iter86.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.skewedInfo != null) { - if (isSetSkewedInfo()) { - oprot.writeFieldBegin(SKEWED_INFO_FIELD_DESC); - this.skewedInfo.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1387,6 +1176,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (serdeInfo != null) { + serdeInfo.validate(); + } + if (skewedInfo != null) { + skewedInfo.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1400,12 +1196,464 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class StorageDescriptorStandardSchemeFactory implements SchemeFactory { + public StorageDescriptorStandardScheme getScheme() { + return new StorageDescriptorStandardScheme(); + } + } + + private static class StorageDescriptorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, StorageDescriptor struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list140 = iprot.readListBegin(); + struct.cols = new ArrayList(_list140.size); + for (int _i141 = 0; _i141 < _list140.size; ++_i141) + { + FieldSchema _elem142; // required + _elem142 = new FieldSchema(); + _elem142.read(iprot); + struct.cols.add(_elem142); + } + iprot.readListEnd(); + } + struct.setColsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LOCATION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.location = iprot.readString(); + struct.setLocationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // INPUT_FORMAT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.inputFormat = iprot.readString(); + struct.setInputFormatIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // OUTPUT_FORMAT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.outputFormat = iprot.readString(); + struct.setOutputFormatIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COMPRESSED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.compressed = iprot.readBool(); + struct.setCompressedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // NUM_BUCKETS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numBuckets = iprot.readI32(); + struct.setNumBucketsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SERDE_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.serdeInfo = new SerDeInfo(); + struct.serdeInfo.read(iprot); + struct.setSerdeInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // BUCKET_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list143 = iprot.readListBegin(); + struct.bucketCols = new ArrayList(_list143.size); + for (int _i144 = 0; _i144 < _list143.size; ++_i144) + { + String _elem145; // required + _elem145 = iprot.readString(); + struct.bucketCols.add(_elem145); + } + iprot.readListEnd(); + } + struct.setBucketColsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // SORT_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(); + struct.sortCols = new ArrayList(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) + { + Order _elem148; // required + _elem148 = new Order(); + _elem148.read(iprot); + struct.sortCols.add(_elem148); + } + iprot.readListEnd(); + } + struct.setSortColsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map149 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map149.size); + for (int _i150 = 0; _i150 < _map149.size; ++_i150) + { + String _key151; // required + String _val152; // required + _key151 = iprot.readString(); + _val152 = iprot.readString(); + struct.parameters.put(_key151, _val152); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // SKEWED_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.skewedInfo = new SkewedInfo(); + struct.skewedInfo.read(iprot); + struct.setSkewedInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, StorageDescriptor struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.cols != null) { + oprot.writeFieldBegin(COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size())); + for (FieldSchema _iter153 : struct.cols) + { + _iter153.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.location != null) { + oprot.writeFieldBegin(LOCATION_FIELD_DESC); + oprot.writeString(struct.location); + oprot.writeFieldEnd(); + } + if (struct.inputFormat != null) { + oprot.writeFieldBegin(INPUT_FORMAT_FIELD_DESC); + oprot.writeString(struct.inputFormat); + oprot.writeFieldEnd(); + } + if (struct.outputFormat != null) { + oprot.writeFieldBegin(OUTPUT_FORMAT_FIELD_DESC); + oprot.writeString(struct.outputFormat); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); + oprot.writeBool(struct.compressed); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_BUCKETS_FIELD_DESC); + oprot.writeI32(struct.numBuckets); + oprot.writeFieldEnd(); + if (struct.serdeInfo != null) { + oprot.writeFieldBegin(SERDE_INFO_FIELD_DESC); + struct.serdeInfo.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.bucketCols != null) { + oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bucketCols.size())); + for (String _iter154 : struct.bucketCols) + { + oprot.writeString(_iter154); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.sortCols != null) { + oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.sortCols.size())); + for (Order _iter155 : struct.sortCols) + { + _iter155.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter156 : struct.parameters.entrySet()) + { + oprot.writeString(_iter156.getKey()); + oprot.writeString(_iter156.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.skewedInfo != null) { + if (struct.isSetSkewedInfo()) { + oprot.writeFieldBegin(SKEWED_INFO_FIELD_DESC); + struct.skewedInfo.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class StorageDescriptorTupleSchemeFactory implements SchemeFactory { + public StorageDescriptorTupleScheme getScheme() { + return new StorageDescriptorTupleScheme(); + } + } + + private static class StorageDescriptorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetCols()) { + optionals.set(0); + } + if (struct.isSetLocation()) { + optionals.set(1); + } + if (struct.isSetInputFormat()) { + optionals.set(2); + } + if (struct.isSetOutputFormat()) { + optionals.set(3); + } + if (struct.isSetCompressed()) { + optionals.set(4); + } + if (struct.isSetNumBuckets()) { + optionals.set(5); + } + if (struct.isSetSerdeInfo()) { + optionals.set(6); + } + if (struct.isSetBucketCols()) { + optionals.set(7); + } + if (struct.isSetSortCols()) { + optionals.set(8); + } + if (struct.isSetParameters()) { + optionals.set(9); + } + if (struct.isSetSkewedInfo()) { + optionals.set(10); + } + oprot.writeBitSet(optionals, 11); + if (struct.isSetCols()) { + { + oprot.writeI32(struct.cols.size()); + for (FieldSchema _iter157 : struct.cols) + { + _iter157.write(oprot); + } + } + } + if (struct.isSetLocation()) { + oprot.writeString(struct.location); + } + if (struct.isSetInputFormat()) { + oprot.writeString(struct.inputFormat); + } + if (struct.isSetOutputFormat()) { + oprot.writeString(struct.outputFormat); + } + if (struct.isSetCompressed()) { + oprot.writeBool(struct.compressed); + } + if (struct.isSetNumBuckets()) { + oprot.writeI32(struct.numBuckets); + } + if (struct.isSetSerdeInfo()) { + struct.serdeInfo.write(oprot); + } + if (struct.isSetBucketCols()) { + { + oprot.writeI32(struct.bucketCols.size()); + for (String _iter158 : struct.bucketCols) + { + oprot.writeString(_iter158); + } + } + } + if (struct.isSetSortCols()) { + { + oprot.writeI32(struct.sortCols.size()); + for (Order _iter159 : struct.sortCols) + { + _iter159.write(oprot); + } + } + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter160 : struct.parameters.entrySet()) + { + oprot.writeString(_iter160.getKey()); + oprot.writeString(_iter160.getValue()); + } + } + } + if (struct.isSetSkewedInfo()) { + struct.skewedInfo.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(11); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list161 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.cols = new ArrayList(_list161.size); + for (int _i162 = 0; _i162 < _list161.size; ++_i162) + { + FieldSchema _elem163; // required + _elem163 = new FieldSchema(); + _elem163.read(iprot); + struct.cols.add(_elem163); + } + } + struct.setColsIsSet(true); + } + if (incoming.get(1)) { + struct.location = iprot.readString(); + struct.setLocationIsSet(true); + } + if (incoming.get(2)) { + struct.inputFormat = iprot.readString(); + struct.setInputFormatIsSet(true); + } + if (incoming.get(3)) { + struct.outputFormat = iprot.readString(); + struct.setOutputFormatIsSet(true); + } + if (incoming.get(4)) { + struct.compressed = iprot.readBool(); + struct.setCompressedIsSet(true); + } + if (incoming.get(5)) { + struct.numBuckets = iprot.readI32(); + struct.setNumBucketsIsSet(true); + } + if (incoming.get(6)) { + struct.serdeInfo = new SerDeInfo(); + struct.serdeInfo.read(iprot); + struct.setSerdeInfoIsSet(true); + } + if (incoming.get(7)) { + { + org.apache.thrift.protocol.TList _list164 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.bucketCols = new ArrayList(_list164.size); + for (int _i165 = 0; _i165 < _list164.size; ++_i165) + { + String _elem166; // required + _elem166 = iprot.readString(); + struct.bucketCols.add(_elem166); + } + } + struct.setBucketColsIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TList _list167 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.sortCols = new ArrayList(_list167.size); + for (int _i168 = 0; _i168 < _list167.size; ++_i168) + { + Order _elem169; // required + _elem169 = new Order(); + _elem169.read(iprot); + struct.sortCols.add(_elem169); + } + } + struct.setSortColsIsSet(true); + } + if (incoming.get(9)) { + { + org.apache.thrift.protocol.TMap _map170 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map170.size); + for (int _i171 = 0; _i171 < _map170.size; ++_i171) + { + String _key172; // required + String _val173; // required + _key172 = iprot.readString(); + _val173 = iprot.readString(); + struct.parameters.put(_key172, _val173); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(10)) { + struct.skewedInfo = new SkewedInfo(); + struct.skewedInfo.read(iprot); + struct.setSkewedInfoIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,11 +40,17 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)4); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DatabaseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DatabaseTupleSchemeFactory()); + } + private String name; // required private String description; // required private String locationUri; // required private Map parameters; // required - private PrincipalPrivilegeSet privileges; // required + private PrincipalPrivilegeSet privileges; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -107,7 +123,7 @@ } // isset id assignments - + private _Fields optionals[] = {_Fields.PRIVILEGES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -561,113 +577,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DESCRIPTION - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.description = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // LOCATION_URI - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.locationUri = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map39 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map39.size); - for (int _i40 = 0; _i40 < _map39.size; ++_i40) - { - String _key41; // required - String _val42; // required - _key41 = iprot.readString(); - _val42 = iprot.readString(); - this.parameters.put(_key41, _val42); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrincipalPrivilegeSet(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.description != null) { - oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); - oprot.writeString(this.description); - oprot.writeFieldEnd(); - } - if (this.locationUri != null) { - oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC); - oprot.writeString(this.locationUri); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter43 : this.parameters.entrySet()) - { - oprot.writeString(_iter43.getKey()); - oprot.writeString(_iter43.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.privileges != null) { - if (isSetPrivileges()) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -722,6 +636,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -740,5 +658,221 @@ } } + private static class DatabaseStandardSchemeFactory implements SchemeFactory { + public DatabaseStandardScheme getScheme() { + return new DatabaseStandardScheme(); + } + } + + private static class DatabaseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Database struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DESCRIPTION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // LOCATION_URI + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.locationUri = iprot.readString(); + struct.setLocationUriIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map78 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map78.size); + for (int _i79 = 0; _i79 < _map78.size; ++_i79) + { + String _key80; // required + String _val81; // required + _key80 = iprot.readString(); + _val81 = iprot.readString(); + struct.parameters.put(_key80, _val81); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Database struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.description != null) { + oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); + oprot.writeString(struct.description); + oprot.writeFieldEnd(); + } + if (struct.locationUri != null) { + oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC); + oprot.writeString(struct.locationUri); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter82 : struct.parameters.entrySet()) + { + oprot.writeString(_iter82.getKey()); + oprot.writeString(_iter82.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + if (struct.isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DatabaseTupleSchemeFactory implements SchemeFactory { + public DatabaseTupleScheme getScheme() { + return new DatabaseTupleScheme(); + } + } + + private static class DatabaseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Database struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetDescription()) { + optionals.set(1); + } + if (struct.isSetLocationUri()) { + optionals.set(2); + } + if (struct.isSetParameters()) { + optionals.set(3); + } + if (struct.isSetPrivileges()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDescription()) { + oprot.writeString(struct.description); + } + if (struct.isSetLocationUri()) { + oprot.writeString(struct.locationUri); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter83 : struct.parameters.entrySet()) + { + oprot.writeString(_iter83.getKey()); + oprot.writeString(_iter83.getValue()); + } + } + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Database struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } + if (incoming.get(2)) { + struct.locationUri = iprot.readString(); + struct.setLocationUriIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map84.size); + for (int _i85 = 0; _i85 < _map84.size; ++_i85) + { + String _key86; // required + String _val87; // required + _key86 = iprot.readString(); + _val87 = iprot.readString(); + struct.parameters.put(_key86, _val87); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(4)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField NUM_FALSES_FIELD_DESC = new org.apache.thrift.protocol.TField("numFalses", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new BooleanColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new BooleanColumnStatsDataTupleSchemeFactory()); + } + private long numTrues; // required private long numFalses; // required private long numNulls; // required @@ -100,8 +116,7 @@ private static final int __NUMTRUES_ISSET_ID = 0; private static final int __NUMFALSES_ISSET_ID = 1; private static final int __NUMNULLS_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -136,8 +151,7 @@ * Performs a deep copy on other. */ public BooleanColumnStatsData(BooleanColumnStatsData other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.numTrues = other.numTrues; this.numFalses = other.numFalses; this.numNulls = other.numNulls; @@ -167,16 +181,16 @@ } public void unsetNumTrues() { - __isset_bit_vector.clear(__NUMTRUES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMTRUES_ISSET_ID); } /** Returns true if field numTrues is set (has been assigned a value) and false otherwise */ public boolean isSetNumTrues() { - return __isset_bit_vector.get(__NUMTRUES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMTRUES_ISSET_ID); } public void setNumTruesIsSet(boolean value) { - __isset_bit_vector.set(__NUMTRUES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMTRUES_ISSET_ID, value); } public long getNumFalses() { @@ -189,16 +203,16 @@ } public void unsetNumFalses() { - __isset_bit_vector.clear(__NUMFALSES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMFALSES_ISSET_ID); } /** Returns true if field numFalses is set (has been assigned a value) and false otherwise */ public boolean isSetNumFalses() { - return __isset_bit_vector.get(__NUMFALSES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMFALSES_ISSET_ID); } public void setNumFalsesIsSet(boolean value) { - __isset_bit_vector.set(__NUMFALSES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMFALSES_ISSET_ID, value); } public long getNumNulls() { @@ -211,16 +225,16 @@ } public void unsetNumNulls() { - __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ public boolean isSetNumNulls() { - return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } public void setNumNullsIsSet(boolean value) { - __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -395,63 +409,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NUM_TRUES - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numTrues = iprot.readI64(); - setNumTruesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // NUM_FALSES - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numFalses = iprot.readI64(); - setNumFalsesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NUM_NULLS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numNulls = iprot.readI64(); - setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NUM_TRUES_FIELD_DESC); - oprot.writeI64(this.numTrues); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_FALSES_FIELD_DESC); - oprot.writeI64(this.numFalses); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(this.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -488,6 +450,7 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -501,12 +464,110 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class BooleanColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public BooleanColumnStatsDataStandardScheme getScheme() { + return new BooleanColumnStatsDataStandardScheme(); + } + } + + private static class BooleanColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NUM_TRUES + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numTrues = iprot.readI64(); + struct.setNumTruesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NUM_FALSES + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numFalses = iprot.readI64(); + struct.setNumFalsesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NUM_TRUES_FIELD_DESC); + oprot.writeI64(struct.numTrues); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_FALSES_FIELD_DESC); + oprot.writeI64(struct.numFalses); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class BooleanColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public BooleanColumnStatsDataTupleScheme getScheme() { + return new BooleanColumnStatsDataTupleScheme(); + } + } + + private static class BooleanColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.numTrues); + oprot.writeI64(struct.numFalses); + oprot.writeI64(struct.numNulls); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.numTrues = iprot.readI64(); + struct.setNumTruesIsSet(true); + struct.numFalses = iprot.readI64(); + struct.setNumFalsesIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -35,6 +45,12 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)9); private static final org.apache.thrift.protocol.TField DEFERRED_REBUILD_FIELD_DESC = new org.apache.thrift.protocol.TField("deferredRebuild", org.apache.thrift.protocol.TType.BOOL, (short)10); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IndexStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IndexTupleSchemeFactory()); + } + private String indexName; // required private String indexHandlerClass; // required private String dbName; // required @@ -135,8 +151,7 @@ private static final int __CREATETIME_ISSET_ID = 0; private static final int __LASTACCESSTIME_ISSET_ID = 1; private static final int __DEFERREDREBUILD_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -201,8 +216,7 @@ * Performs a deep copy on other. */ public Index(Index other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetIndexName()) { this.indexName = other.indexName; } @@ -364,16 +378,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -386,16 +400,16 @@ } public void unsetLastAccessTime() { - __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } /** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } public void setLastAccessTimeIsSet(boolean value) { - __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); } public String getIndexTableName() { @@ -488,16 +502,16 @@ } public void unsetDeferredRebuild() { - __isset_bit_vector.clear(__DEFERREDREBUILD_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID); } /** Returns true if field deferredRebuild is set (has been assigned a value) and false otherwise */ public boolean isSetDeferredRebuild() { - return __isset_bit_vector.get(__DEFERREDREBUILD_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID); } public void setDeferredRebuildIsSet(boolean value) { - __isset_bit_vector.set(__DEFERREDREBUILD_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -931,168 +945,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // INDEX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.indexName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // INDEX_HANDLER_CLASS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.indexHandlerClass = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // ORIG_TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.origTableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // LAST_ACCESS_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.lastAccessTime = iprot.readI32(); - setLastAccessTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // INDEX_TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.indexTableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // SD - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 9: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map105 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map105.size); - for (int _i106 = 0; _i106 < _map105.size; ++_i106) - { - String _key107; // required - String _val108; // required - _key107 = iprot.readString(); - _val108 = iprot.readString(); - this.parameters.put(_key107, _val108); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 10: // DEFERRED_REBUILD - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deferredRebuild = iprot.readBool(); - setDeferredRebuildIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.indexName != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.indexName); - oprot.writeFieldEnd(); - } - if (this.indexHandlerClass != null) { - oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC); - oprot.writeString(this.indexHandlerClass); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.origTableName != null) { - oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC); - oprot.writeString(this.origTableName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - if (this.indexTableName != null) { - oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC); - oprot.writeString(this.indexTableName); - oprot.writeFieldEnd(); - } - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter109 : this.parameters.entrySet()) - { - oprot.writeString(_iter109.getKey()); - oprot.writeString(_iter109.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC); - oprot.writeBool(this.deferredRebuild); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1173,6 +1030,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (sd != null) { + sd.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1186,12 +1047,335 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class IndexStandardSchemeFactory implements SchemeFactory { + public IndexStandardScheme getScheme() { + return new IndexStandardScheme(); + } + } + + private static class IndexStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Index struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // INDEX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.indexName = iprot.readString(); + struct.setIndexNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // INDEX_HANDLER_CLASS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.indexHandlerClass = iprot.readString(); + struct.setIndexHandlerClassIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ORIG_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.origTableName = iprot.readString(); + struct.setOrigTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // LAST_ACCESS_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // INDEX_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.indexTableName = iprot.readString(); + struct.setIndexTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // SD + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map210 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map210.size); + for (int _i211 = 0; _i211 < _map210.size; ++_i211) + { + String _key212; // required + String _val213; // required + _key212 = iprot.readString(); + _val213 = iprot.readString(); + struct.parameters.put(_key212, _val213); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // DEFERRED_REBUILD + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deferredRebuild = iprot.readBool(); + struct.setDeferredRebuildIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Index struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.indexName != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(struct.indexName); + oprot.writeFieldEnd(); + } + if (struct.indexHandlerClass != null) { + oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC); + oprot.writeString(struct.indexHandlerClass); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.origTableName != null) { + oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.origTableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(struct.lastAccessTime); + oprot.writeFieldEnd(); + if (struct.indexTableName != null) { + oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.indexTableName); + oprot.writeFieldEnd(); + } + if (struct.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + struct.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter214 : struct.parameters.entrySet()) + { + oprot.writeString(_iter214.getKey()); + oprot.writeString(_iter214.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC); + oprot.writeBool(struct.deferredRebuild); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IndexTupleSchemeFactory implements SchemeFactory { + public IndexTupleScheme getScheme() { + return new IndexTupleScheme(); + } + } + + private static class IndexTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Index struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIndexName()) { + optionals.set(0); + } + if (struct.isSetIndexHandlerClass()) { + optionals.set(1); + } + if (struct.isSetDbName()) { + optionals.set(2); + } + if (struct.isSetOrigTableName()) { + optionals.set(3); + } + if (struct.isSetCreateTime()) { + optionals.set(4); + } + if (struct.isSetLastAccessTime()) { + optionals.set(5); + } + if (struct.isSetIndexTableName()) { + optionals.set(6); + } + if (struct.isSetSd()) { + optionals.set(7); + } + if (struct.isSetParameters()) { + optionals.set(8); + } + if (struct.isSetDeferredRebuild()) { + optionals.set(9); + } + oprot.writeBitSet(optionals, 10); + if (struct.isSetIndexName()) { + oprot.writeString(struct.indexName); + } + if (struct.isSetIndexHandlerClass()) { + oprot.writeString(struct.indexHandlerClass); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetOrigTableName()) { + oprot.writeString(struct.origTableName); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetLastAccessTime()) { + oprot.writeI32(struct.lastAccessTime); + } + if (struct.isSetIndexTableName()) { + oprot.writeString(struct.indexTableName); + } + if (struct.isSetSd()) { + struct.sd.write(oprot); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter215 : struct.parameters.entrySet()) + { + oprot.writeString(_iter215.getKey()); + oprot.writeString(_iter215.getValue()); + } + } + } + if (struct.isSetDeferredRebuild()) { + oprot.writeBool(struct.deferredRebuild); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Index struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(10); + if (incoming.get(0)) { + struct.indexName = iprot.readString(); + struct.setIndexNameIsSet(true); + } + if (incoming.get(1)) { + struct.indexHandlerClass = iprot.readString(); + struct.setIndexHandlerClassIsSet(true); + } + if (incoming.get(2)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(3)) { + struct.origTableName = iprot.readString(); + struct.setOrigTableNameIsSet(true); + } + if (incoming.get(4)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(5)) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } + if (incoming.get(6)) { + struct.indexTableName = iprot.readString(); + struct.setIndexTableNameIsSet(true); + } + if (incoming.get(7)) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TMap _map216 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map216.size); + for (int _i217 = 0; _i217 < _map216.size; ++_i217) + { + String _key218; // required + String _val219; // required + _key218 = iprot.readString(); + _val219 = iprot.readString(); + struct.parameters.put(_key218, _val219); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(9)) { + struct.deferredRebuild = iprot.readBool(); + struct.setDeferredRebuildIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UnknownPartitionException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class UnknownPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownPartitionException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UnknownPartitionExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UnknownPartitionExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class UnknownPartitionExceptionStandardSchemeFactory implements SchemeFactory { + public UnknownPartitionExceptionStandardScheme getScheme() { + return new UnknownPartitionExceptionStandardScheme(); + } + } + + private static class UnknownPartitionExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownPartitionException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UnknownPartitionException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UnknownPartitionExceptionTupleSchemeFactory implements SchemeFactory { + public UnknownPartitionExceptionTupleScheme getScheme() { + return new UnknownPartitionExceptionTupleScheme(); + } + } + + private static class UnknownPartitionExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UnknownPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UnknownPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -26,6 +36,12 @@ private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new EnvironmentContextStandardSchemeFactory()); + schemes.put(TupleScheme.class, new EnvironmentContextTupleSchemeFactory()); + } + private Map properties; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -271,62 +286,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PROPERTIES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map123 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map123.size); - for (int _i124 = 0; _i124 < _map123.size; ++_i124) - { - String _key125; // required - String _val126; // required - _key125 = iprot.readString(); - _val126 = iprot.readString(); - this.properties.put(_key125, _val126); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.properties != null) { - oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.properties.size())); - for (Map.Entry _iter127 : this.properties.entrySet()) - { - oprot.writeString(_iter127.getKey()); - oprot.writeString(_iter127.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -347,6 +311,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -365,5 +330,125 @@ } } + private static class EnvironmentContextStandardSchemeFactory implements SchemeFactory { + public EnvironmentContextStandardScheme getScheme() { + return new EnvironmentContextStandardScheme(); + } + } + + private static class EnvironmentContextStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, EnvironmentContext struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PROPERTIES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map246 = iprot.readMapBegin(); + struct.properties = new HashMap(2*_map246.size); + for (int _i247 = 0; _i247 < _map246.size; ++_i247) + { + String _key248; // required + String _val249; // required + _key248 = iprot.readString(); + _val249 = iprot.readString(); + struct.properties.put(_key248, _val249); + } + iprot.readMapEnd(); + } + struct.setPropertiesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, EnvironmentContext struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.properties != null) { + oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size())); + for (Map.Entry _iter250 : struct.properties.entrySet()) + { + oprot.writeString(_iter250.getKey()); + oprot.writeString(_iter250.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class EnvironmentContextTupleSchemeFactory implements SchemeFactory { + public EnvironmentContextTupleScheme getScheme() { + return new EnvironmentContextTupleScheme(); + } + } + + private static class EnvironmentContextTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, EnvironmentContext struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetProperties()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetProperties()) { + { + oprot.writeI32(struct.properties.size()); + for (Map.Entry _iter251 : struct.properties.entrySet()) + { + oprot.writeString(_iter251.getKey()); + oprot.writeString(_iter251.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, EnvironmentContext struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map252 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.properties = new HashMap(2*_map252.size); + for (int _i253 = 0; _i253 < _map252.size; ++_i253) + { + String _key254; // required + String _val255; // required + _key254 = iprot.readString(); + _val255 = iprot.readString(); + struct.properties.put(_key254, _val255); + } + } + struct.setPropertiesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField COL_FIELD_DESC = new org.apache.thrift.protocol.TField("col", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("order", org.apache.thrift.protocol.TType.I32, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new OrderStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OrderTupleSchemeFactory()); + } + private String col; // required private int order; // required @@ -93,8 +109,7 @@ // isset id assignments private static final int __ORDER_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -123,8 +138,7 @@ * Performs a deep copy on other. */ public Order(Order other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetCol()) { this.col = other.col; } @@ -175,16 +189,16 @@ } public void unsetOrder() { - __isset_bit_vector.clear(__ORDER_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDER_ISSET_ID); } /** Returns true if field order is set (has been assigned a value) and false otherwise */ public boolean isSetOrder() { - return __isset_bit_vector.get(__ORDER_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __ORDER_ISSET_ID); } public void setOrderIsSet(boolean value) { - __isset_bit_vector.set(__ORDER_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDER_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -322,53 +336,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // COL - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.col = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ORDER - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.order = iprot.readI32(); - setOrderIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.col != null) { - oprot.writeFieldBegin(COL_FIELD_DESC); - oprot.writeString(this.col); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ORDER_FIELD_DESC); - oprot.writeI32(this.order); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -393,6 +365,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -406,12 +379,115 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class OrderStandardSchemeFactory implements SchemeFactory { + public OrderStandardScheme getScheme() { + return new OrderStandardScheme(); + } + } + + private static class OrderStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Order struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // COL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col = iprot.readString(); + struct.setColIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ORDER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.order = iprot.readI32(); + struct.setOrderIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Order struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.col != null) { + oprot.writeFieldBegin(COL_FIELD_DESC); + oprot.writeString(struct.col); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_FIELD_DESC); + oprot.writeI32(struct.order); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class OrderTupleSchemeFactory implements SchemeFactory { + public OrderTupleScheme getScheme() { + return new OrderTupleScheme(); + } + } + + private static class OrderTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Order struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetCol()) { + optionals.set(0); + } + if (struct.isSetOrder()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetCol()) { + oprot.writeString(struct.col); + } + if (struct.isSetOrder()) { + oprot.writeI32(struct.order); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Order struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.col = iprot.readString(); + struct.setColIsSet(true); + } + if (incoming.get(1)) { + struct.order = iprot.readI32(); + struct.setOrderIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -29,10 +39,16 @@ private static final org.apache.thrift.protocol.TField TYPE2_FIELD_DESC = new org.apache.thrift.protocol.TField("type2", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TypeStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TypeTupleSchemeFactory()); + } + private String name; // required - private String type1; // required - private String type2; // required - private List fields; // required + private String type1; // optional + private String type2; // optional + private List fields; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -102,7 +118,7 @@ } // isset id assignments - + private _Fields optionals[] = {_Fields.TYPE1,_Fields.TYPE2,_Fields.FIELDS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -479,102 +495,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TYPE1 - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type1 = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // TYPE2 - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type2 = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // FIELDS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.fields = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - FieldSchema _elem2; // required - _elem2 = new FieldSchema(); - _elem2.read(iprot); - this.fields.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.type1 != null) { - if (isSetType1()) { - oprot.writeFieldBegin(TYPE1_FIELD_DESC); - oprot.writeString(this.type1); - oprot.writeFieldEnd(); - } - } - if (this.type2 != null) { - if (isSetType2()) { - oprot.writeFieldBegin(TYPE2_FIELD_DESC); - oprot.writeString(this.type2); - oprot.writeFieldEnd(); - } - } - if (this.fields != null) { - if (isSetFields()) { - oprot.writeFieldBegin(FIELDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.fields.size())); - for (FieldSchema _iter3 : this.fields) - { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -625,6 +550,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -643,5 +569,196 @@ } } + private static class TypeStandardSchemeFactory implements SchemeFactory { + public TypeStandardScheme getScheme() { + return new TypeStandardScheme(); + } + } + + private static class TypeStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Type struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type1 = iprot.readString(); + struct.setType1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TYPE2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type2 = iprot.readString(); + struct.setType2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // FIELDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.fields = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + FieldSchema _elem2; // required + _elem2 = new FieldSchema(); + _elem2.read(iprot); + struct.fields.add(_elem2); + } + iprot.readListEnd(); + } + struct.setFieldsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Type struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.type1 != null) { + if (struct.isSetType1()) { + oprot.writeFieldBegin(TYPE1_FIELD_DESC); + oprot.writeString(struct.type1); + oprot.writeFieldEnd(); + } + } + if (struct.type2 != null) { + if (struct.isSetType2()) { + oprot.writeFieldBegin(TYPE2_FIELD_DESC); + oprot.writeString(struct.type2); + oprot.writeFieldEnd(); + } + } + if (struct.fields != null) { + if (struct.isSetFields()) { + oprot.writeFieldBegin(FIELDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fields.size())); + for (FieldSchema _iter3 : struct.fields) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TypeTupleSchemeFactory implements SchemeFactory { + public TypeTupleScheme getScheme() { + return new TypeTupleScheme(); + } + } + + private static class TypeTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Type struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetType1()) { + optionals.set(1); + } + if (struct.isSetType2()) { + optionals.set(2); + } + if (struct.isSetFields()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetType1()) { + oprot.writeString(struct.type1); + } + if (struct.isSetType2()) { + oprot.writeString(struct.type2); + } + if (struct.isSetFields()) { + { + oprot.writeI32(struct.fields.size()); + for (FieldSchema _iter4 : struct.fields) + { + _iter4.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Type struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.type1 = iprot.readString(); + struct.setType1IsSet(true); + } + if (incoming.get(2)) { + struct.type2 = iprot.readString(); + struct.setType2IsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fields = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + FieldSchema _elem7; // required + _elem7 = new FieldSchema(); + _elem7.read(iprot); + struct.fields.add(_elem7); + } + } + struct.setFieldsIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UnknownDBException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class UnknownDBException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownDBException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UnknownDBExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UnknownDBExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class UnknownDBExceptionStandardSchemeFactory implements SchemeFactory { + public UnknownDBExceptionStandardScheme getScheme() { + return new UnknownDBExceptionStandardScheme(); + } + } + + private static class UnknownDBExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownDBException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UnknownDBException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UnknownDBExceptionTupleSchemeFactory implements SchemeFactory { + public UnknownDBExceptionTupleScheme getScheme() { + return new UnknownDBExceptionTupleScheme(); + } + } + + private static class UnknownDBExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UnknownDBException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UnknownDBException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidInputException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class InvalidInputException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidInputException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidInputExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidInputExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class InvalidInputExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidInputExceptionStandardScheme getScheme() { + return new InvalidInputExceptionStandardScheme(); + } + } + + private static class InvalidInputExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidInputException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidInputException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidInputExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidInputExceptionTupleScheme getScheme() { + return new InvalidInputExceptionTupleScheme(); + } + } + + private static class InvalidInputExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidInputException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidInputException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UnknownTableException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class UnknownTableException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownTableException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UnknownTableExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UnknownTableExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class UnknownTableExceptionStandardSchemeFactory implements SchemeFactory { + public UnknownTableExceptionStandardScheme getScheme() { + return new UnknownTableExceptionStandardScheme(); + } + } + + private static class UnknownTableExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownTableException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UnknownTableException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UnknownTableExceptionTupleSchemeFactory implements SchemeFactory { + public UnknownTableExceptionTupleScheme getScheme() { + return new UnknownTableExceptionTupleScheme(); + } + } + + private static class UnknownTableExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UnknownTableException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UnknownTableException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -29,6 +39,12 @@ private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new LongColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new LongColumnStatsDataTupleSchemeFactory()); + } + private long lowValue; // required private long highValue; // required private long numNulls; // required @@ -106,8 +122,7 @@ private static final int __HIGHVALUE_ISSET_ID = 1; private static final int __NUMNULLS_ISSET_ID = 2; private static final int __NUMDVS_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -147,8 +162,7 @@ * Performs a deep copy on other. */ public LongColumnStatsData(LongColumnStatsData other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.lowValue = other.lowValue; this.highValue = other.highValue; this.numNulls = other.numNulls; @@ -181,16 +195,16 @@ } public void unsetLowValue() { - __isset_bit_vector.clear(__LOWVALUE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOWVALUE_ISSET_ID); } /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ public boolean isSetLowValue() { - return __isset_bit_vector.get(__LOWVALUE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LOWVALUE_ISSET_ID); } public void setLowValueIsSet(boolean value) { - __isset_bit_vector.set(__LOWVALUE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOWVALUE_ISSET_ID, value); } public long getHighValue() { @@ -203,16 +217,16 @@ } public void unsetHighValue() { - __isset_bit_vector.clear(__HIGHVALUE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); } /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ public boolean isSetHighValue() { - return __isset_bit_vector.get(__HIGHVALUE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); } public void setHighValueIsSet(boolean value) { - __isset_bit_vector.set(__HIGHVALUE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHVALUE_ISSET_ID, value); } public long getNumNulls() { @@ -225,16 +239,16 @@ } public void unsetNumNulls() { - __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ public boolean isSetNumNulls() { - return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } public void setNumNullsIsSet(boolean value) { - __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); } public long getNumDVs() { @@ -247,16 +261,16 @@ } public void unsetNumDVs() { - __isset_bit_vector.clear(__NUMDVS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); } /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ public boolean isSetNumDVs() { - return __isset_bit_vector.get(__NUMDVS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); } public void setNumDVsIsSet(boolean value) { - __isset_bit_vector.set(__NUMDVS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -468,74 +482,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // LOW_VALUE - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.lowValue = iprot.readI64(); - setLowValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // HIGH_VALUE - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.highValue = iprot.readI64(); - setHighValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NUM_NULLS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numNulls = iprot.readI64(); - setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // NUM_DVS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numDVs = iprot.readI64(); - setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); - oprot.writeI64(this.lowValue); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); - oprot.writeI64(this.highValue); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(this.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(this.numDVs); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -580,6 +531,7 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -593,12 +545,124 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class LongColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public LongColumnStatsDataStandardScheme getScheme() { + return new LongColumnStatsDataStandardScheme(); + } + } + + private static class LongColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, LongColumnStatsData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // LOW_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lowValue = iprot.readI64(); + struct.setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HIGH_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.highValue = iprot.readI64(); + struct.setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, LongColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + oprot.writeI64(struct.lowValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + oprot.writeI64(struct.highValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class LongColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public LongColumnStatsDataTupleScheme getScheme() { + return new LongColumnStatsDataTupleScheme(); + } + } + + private static class LongColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.lowValue); + oprot.writeI64(struct.highValue); + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.lowValue = iprot.readI64(); + struct.setLowValueIsSet(true); + struct.highValue = iprot.readI64(); + struct.setHighValueIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidObjectException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class InvalidObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidObjectException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidObjectExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidObjectExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class InvalidObjectExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidObjectExceptionStandardScheme getScheme() { + return new InvalidObjectExceptionStandardScheme(); + } + } + + private static class InvalidObjectExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidObjectException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidObjectException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidObjectExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidObjectExceptionTupleScheme getScheme() { + return new InvalidObjectExceptionTupleScheme(); + } + } + + private static class InvalidObjectExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -29,6 +39,12 @@ private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new StringColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new StringColumnStatsDataTupleSchemeFactory()); + } + private long maxColLen; // required private double avgColLen; // required private long numNulls; // required @@ -106,8 +122,7 @@ private static final int __AVGCOLLEN_ISSET_ID = 1; private static final int __NUMNULLS_ISSET_ID = 2; private static final int __NUMDVS_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -147,8 +162,7 @@ * Performs a deep copy on other. */ public StringColumnStatsData(StringColumnStatsData other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.maxColLen = other.maxColLen; this.avgColLen = other.avgColLen; this.numNulls = other.numNulls; @@ -181,16 +195,16 @@ } public void unsetMaxColLen() { - __isset_bit_vector.clear(__MAXCOLLEN_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); } /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ public boolean isSetMaxColLen() { - return __isset_bit_vector.get(__MAXCOLLEN_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); } public void setMaxColLenIsSet(boolean value) { - __isset_bit_vector.set(__MAXCOLLEN_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID, value); } public double getAvgColLen() { @@ -203,16 +217,16 @@ } public void unsetAvgColLen() { - __isset_bit_vector.clear(__AVGCOLLEN_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); } /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ public boolean isSetAvgColLen() { - return __isset_bit_vector.get(__AVGCOLLEN_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); } public void setAvgColLenIsSet(boolean value) { - __isset_bit_vector.set(__AVGCOLLEN_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID, value); } public long getNumNulls() { @@ -225,16 +239,16 @@ } public void unsetNumNulls() { - __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ public boolean isSetNumNulls() { - return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); } public void setNumNullsIsSet(boolean value) { - __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); } public long getNumDVs() { @@ -247,16 +261,16 @@ } public void unsetNumDVs() { - __isset_bit_vector.clear(__NUMDVS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); } /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ public boolean isSetNumDVs() { - return __isset_bit_vector.get(__NUMDVS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); } public void setNumDVsIsSet(boolean value) { - __isset_bit_vector.set(__NUMDVS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -468,74 +482,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MAX_COL_LEN - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.maxColLen = iprot.readI64(); - setMaxColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // AVG_COL_LEN - if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { - this.avgColLen = iprot.readDouble(); - setAvgColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NUM_NULLS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numNulls = iprot.readI64(); - setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // NUM_DVS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.numDVs = iprot.readI64(); - setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); - oprot.writeI64(this.maxColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); - oprot.writeDouble(this.avgColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(this.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(this.numDVs); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -580,6 +531,7 @@ throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -593,12 +545,124 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class StringColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public StringColumnStatsDataStandardScheme getScheme() { + return new StringColumnStatsDataStandardScheme(); + } + } + + private static class StringColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, StringColumnStatsData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MAX_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AVG_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, StringColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); + oprot.writeI64(struct.maxColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); + oprot.writeDouble(struct.avgColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class StringColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public StringColumnStatsDataTupleScheme getScheme() { + return new StringColumnStatsDataTupleScheme(); + } + } + + private static class StringColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, StringColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.maxColLen); + oprot.writeDouble(struct.avgColLen); + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, StringColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java (revision 1406838) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,6 +40,12 @@ private static final org.apache.thrift.protocol.TField GRANTOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorType", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("grantOption", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PrivilegeGrantInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrivilegeGrantInfoTupleSchemeFactory()); + } + private String privilege; // required private int createTime; // required private String grantor; // required @@ -113,8 +129,7 @@ // isset id assignments private static final int __CREATETIME_ISSET_ID = 0; private static final int __GRANTOPTION_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -156,8 +171,7 @@ * Performs a deep copy on other. */ public PrivilegeGrantInfo(PrivilegeGrantInfo other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetPrivilege()) { this.privilege = other.privilege; } @@ -219,16 +233,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public String getGrantor() { @@ -295,16 +309,16 @@ } public void unsetGrantOption() { - __isset_bit_vector.clear(__GRANTOPTION_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); } /** Returns true if field grantOption is set (has been assigned a value) and false otherwise */ public boolean isSetGrantOption() { - return __isset_bit_vector.get(__GRANTOPTION_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); } public void setGrantOptionIsSet(boolean value) { - __isset_bit_vector.set(__GRANTOPTION_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -553,88 +567,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.privilege = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // GRANTOR - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.grantor = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // GRANTOR_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.grantorType = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GRANT_OPTION - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.grantOption = iprot.readBool(); - setGrantOptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privilege != null) { - oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC); - oprot.writeString(this.privilege); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - if (this.grantor != null) { - oprot.writeFieldBegin(GRANTOR_FIELD_DESC); - oprot.writeString(this.grantor); - oprot.writeFieldEnd(); - } - if (this.grantorType != null) { - oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); - oprot.writeI32(this.grantorType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); - oprot.writeBool(this.grantOption); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -679,6 +616,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -692,12 +630,182 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class PrivilegeGrantInfoStandardSchemeFactory implements SchemeFactory { + public PrivilegeGrantInfoStandardScheme getScheme() { + return new PrivilegeGrantInfoStandardScheme(); + } + } + + private static class PrivilegeGrantInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.privilege = iprot.readString(); + struct.setPrivilegeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // GRANTOR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // GRANTOR_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GRANT_OPTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.grantOption = iprot.readBool(); + struct.setGrantOptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privilege != null) { + oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC); + oprot.writeString(struct.privilege); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + if (struct.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(struct.grantor); + oprot.writeFieldEnd(); + } + if (struct.grantorType != null) { + oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); + oprot.writeI32(struct.grantorType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.grantOption); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PrivilegeGrantInfoTupleSchemeFactory implements SchemeFactory { + public PrivilegeGrantInfoTupleScheme getScheme() { + return new PrivilegeGrantInfoTupleScheme(); + } + } + + private static class PrivilegeGrantInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivilege()) { + optionals.set(0); + } + if (struct.isSetCreateTime()) { + optionals.set(1); + } + if (struct.isSetGrantor()) { + optionals.set(2); + } + if (struct.isSetGrantorType()) { + optionals.set(3); + } + if (struct.isSetGrantOption()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetPrivilege()) { + oprot.writeString(struct.privilege); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetGrantor()) { + oprot.writeString(struct.grantor); + } + if (struct.isSetGrantorType()) { + oprot.writeI32(struct.grantorType.getValue()); + } + if (struct.isSetGrantOption()) { + oprot.writeBool(struct.grantOption); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.privilege = iprot.readString(); + struct.setPrivilegeIsSet(true); + } + if (incoming.get(1)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(2)) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } + if (incoming.get(3)) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } + if (incoming.get(4)) { + struct.grantOption = iprot.readBool(); + struct.setGrantOptionIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php =================================================================== --- metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php (revision 0) +++ metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php (revision 0) @@ -0,0 +1,22240 @@ +send_create_database($database); + $this->recv_create_database(); + } + + public function send_create_database(\metastore\Database $database) + { + $args = new \metastore\ThriftHiveMetastore_create_database_args(); + $args->database = $database; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_database() + { + $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_create_database_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_create_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_database($name) + { + $this->send_get_database($name); + return $this->recv_get_database(); + } + + public function send_get_database($name) + { + $args = new \metastore\ThriftHiveMetastore_get_database_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_database() + { + $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_database_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_database_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; + } + throw new \Exception("get_database failed: unknown result"); + } + + public function drop_database($name, $deleteData, $cascade) + { + $this->send_drop_database($name, $deleteData, $cascade); + $this->recv_drop_database(); + } + + public function send_drop_database($name, $deleteData, $cascade) + { + $args = new \metastore\ThriftHiveMetastore_drop_database_args(); + $args->name = $name; + $args->deleteData = $deleteData; + $args->cascade = $cascade; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_database() + { + $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_drop_database_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_drop_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_databases($pattern) + { + $this->send_get_databases($pattern); + return $this->recv_get_databases(); + } + + public function send_get_databases($pattern) + { + $args = new \metastore\ThriftHiveMetastore_get_databases_args(); + $args->pattern = $pattern; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_databases', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_databases() + { + $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_databases_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_databases_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_databases failed: unknown result"); + } + + public function get_all_databases() + { + $this->send_get_all_databases(); + return $this->recv_get_all_databases(); + } + + public function send_get_all_databases() + { + $args = new \metastore\ThriftHiveMetastore_get_all_databases_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_databases', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_databases() + { + $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_all_databases_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_all_databases_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_all_databases failed: unknown result"); + } + + public function alter_database($dbname, \metastore\Database $db) + { + $this->send_alter_database($dbname, $db); + $this->recv_alter_database(); + } + + public function send_alter_database($dbname, \metastore\Database $db) + { + $args = new \metastore\ThriftHiveMetastore_alter_database_args(); + $args->dbname = $dbname; + $args->db = $db; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_database() + { + $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_alter_database_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_alter_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function get_type($name) + { + $this->send_get_type($name); + return $this->recv_get_type(); + } + + public function send_get_type($name) + { + $args = new \metastore\ThriftHiveMetastore_get_type_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_type() + { + $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_type_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_type_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; + } + throw new \Exception("get_type failed: unknown result"); + } + + public function create_type(\metastore\Type $type) + { + $this->send_create_type($type); + return $this->recv_create_type(); + } + + public function send_create_type(\metastore\Type $type) + { + $args = new \metastore\ThriftHiveMetastore_create_type_args(); + $args->type = $type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_type() + { + $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_create_type_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_create_type_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("create_type failed: unknown result"); + } + + public function drop_type($type) + { + $this->send_drop_type($type); + return $this->recv_drop_type(); + } + + public function send_drop_type($type) + { + $args = new \metastore\ThriftHiveMetastore_drop_type_args(); + $args->type = $type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_type() + { + $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_drop_type_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_drop_type_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; + } + throw new \Exception("drop_type failed: unknown result"); + } + + public function get_type_all($name) + { + $this->send_get_type_all($name); + return $this->recv_get_type_all(); + } + + public function send_get_type_all($name) + { + $args = new \metastore\ThriftHiveMetastore_get_type_all_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_type_all', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_type_all', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_type_all() + { + $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_type_all_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_type_all_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_type_all failed: unknown result"); + } + + public function get_fields($db_name, $table_name) + { + $this->send_get_fields($db_name, $table_name); + return $this->recv_get_fields(); + } + + public function send_get_fields($db_name, $table_name) + { + $args = new \metastore\ThriftHiveMetastore_get_fields_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_fields', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_fields', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_fields() + { + $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_fields_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_fields_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_fields failed: unknown result"); + } + + public function get_schema($db_name, $table_name) + { + $this->send_get_schema($db_name, $table_name); + return $this->recv_get_schema(); + } + + public function send_get_schema($db_name, $table_name) + { + $args = new \metastore\ThriftHiveMetastore_get_schema_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_schema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_schema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_schema() + { + $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_schema_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_schema_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_schema failed: unknown result"); + } + + public function create_table(\metastore\Table $tbl) + { + $this->send_create_table($tbl); + $this->recv_create_table(); + } + + public function send_create_table(\metastore\Table $tbl) + { + $args = new \metastore\ThriftHiveMetastore_create_table_args(); + $args->tbl = $tbl; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_table() + { + $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_create_table_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_create_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + return; + } + + public function create_table_with_environment_context(\metastore\Table $tbl, \metastore\EnvironmentContext $environment_context) + { + $this->send_create_table_with_environment_context($tbl, $environment_context); + $this->recv_create_table_with_environment_context(); + } + + public function send_create_table_with_environment_context(\metastore\Table $tbl, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_create_table_with_environment_context_args(); + $args->tbl = $tbl; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_table_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_table_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_table_with_environment_context() + { + $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_create_table_with_environment_context_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_create_table_with_environment_context_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + return; + } + + public function drop_table($dbname, $name, $deleteData) + { + $this->send_drop_table($dbname, $name, $deleteData); + $this->recv_drop_table(); + } + + public function send_drop_table($dbname, $name, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_table_args(); + $args->dbname = $dbname; + $args->name = $name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_table() + { + $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_drop_table_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_drop_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_tables($db_name, $pattern) + { + $this->send_get_tables($db_name, $pattern); + return $this->recv_get_tables(); + } + + public function send_get_tables($db_name, $pattern) + { + $args = new \metastore\ThriftHiveMetastore_get_tables_args(); + $args->db_name = $db_name; + $args->pattern = $pattern; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_tables', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_tables() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_tables_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_tables_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_tables failed: unknown result"); + } + + public function get_all_tables($db_name) + { + $this->send_get_all_tables($db_name); + return $this->recv_get_all_tables(); + } + + public function send_get_all_tables($db_name) + { + $args = new \metastore\ThriftHiveMetastore_get_all_tables_args(); + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_tables', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_tables() + { + $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_all_tables_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_all_tables_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_all_tables failed: unknown result"); + } + + public function get_table($dbname, $tbl_name) + { + $this->send_get_table($dbname, $tbl_name); + return $this->recv_get_table(); + } + + public function send_get_table($dbname, $tbl_name) + { + $args = new \metastore\ThriftHiveMetastore_get_table_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table() + { + $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_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_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; + } + throw new \Exception("get_table failed: unknown result"); + } + + public function get_table_objects_by_name($dbname, $tbl_names) + { + $this->send_get_table_objects_by_name($dbname, $tbl_names); + return $this->recv_get_table_objects_by_name(); + } + + public function send_get_table_objects_by_name($dbname, $tbl_names) + { + $args = new \metastore\ThriftHiveMetastore_get_table_objects_by_name_args(); + $args->dbname = $dbname; + $args->tbl_names = $tbl_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_objects_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_objects_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_objects_by_name() + { + $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_objects_by_name_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_objects_by_name_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_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, \metastore\Table $new_tbl) + { + $this->send_alter_table($dbname, $tbl_name, $new_tbl); + $this->recv_alter_table(); + } + + public function send_alter_table($dbname, $tbl_name, \metastore\Table $new_tbl) + { + $args = new \metastore\ThriftHiveMetastore_alter_table_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $args->new_tbl = $new_tbl; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_table() + { + $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_alter_table_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_alter_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function alter_table_with_environment_context($dbname, $tbl_name, \metastore\Table $new_tbl, \metastore\EnvironmentContext $environment_context) + { + $this->send_alter_table_with_environment_context($dbname, $tbl_name, $new_tbl, $environment_context); + $this->recv_alter_table_with_environment_context(); + } + + public function send_alter_table_with_environment_context($dbname, $tbl_name, \metastore\Table $new_tbl, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_alter_table_with_environment_context_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $args->new_tbl = $new_tbl; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_table_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_table_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_table_with_environment_context() + { + $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_alter_table_with_environment_context_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_alter_table_with_environment_context_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function add_partition(\metastore\Partition $new_part) + { + $this->send_add_partition($new_part); + return $this->recv_add_partition(); + } + + public function send_add_partition(\metastore\Partition $new_part) + { + $args = new \metastore\ThriftHiveMetastore_add_partition_args(); + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partition() + { + $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_add_partition_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_add_partition_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("add_partition failed: unknown result"); + } + + public function add_partition_with_environment_context(\metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $this->send_add_partition_with_environment_context($new_part, $environment_context); + return $this->recv_add_partition_with_environment_context(); + } + + public function send_add_partition_with_environment_context(\metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_add_partition_with_environment_context_args(); + $args->new_part = $new_part; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partition_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partition_with_environment_context() + { + $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_add_partition_with_environment_context_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_add_partition_with_environment_context_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("add_partition_with_environment_context failed: unknown result"); + } + + public function add_partitions($new_parts) + { + $this->send_add_partitions($new_parts); + return $this->recv_add_partitions(); + } + + public function send_add_partitions($new_parts) + { + $args = new \metastore\ThriftHiveMetastore_add_partitions_args(); + $args->new_parts = $new_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partitions() + { + $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_add_partitions_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_add_partitions_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("add_partitions failed: unknown result"); + } + + public function append_partition($db_name, $tbl_name, $part_vals) + { + $this->send_append_partition($db_name, $tbl_name, $part_vals); + return $this->recv_append_partition(); + } + + public function send_append_partition($db_name, $tbl_name, $part_vals) + { + $args = new \metastore\ThriftHiveMetastore_append_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition() + { + $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_append_partition_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_append_partition_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("append_partition failed: unknown result"); + } + + public function append_partition_by_name($db_name, $tbl_name, $part_name) + { + $this->send_append_partition_by_name($db_name, $tbl_name, $part_name); + return $this->recv_append_partition_by_name(); + } + + public function send_append_partition_by_name($db_name, $tbl_name, $part_name) + { + $args = new \metastore\ThriftHiveMetastore_append_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition_by_name() + { + $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_append_partition_by_name_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_append_partition_by_name_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("append_partition_by_name failed: unknown result"); + } + + public function drop_partition($db_name, $tbl_name, $part_vals, $deleteData) + { + $this->send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData); + return $this->recv_drop_partition(); + } + + public function send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition() + { + $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_drop_partition_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_drop_partition_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; + } + throw new \Exception("drop_partition failed: unknown result"); + } + + public function drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) + { + $this->send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData); + return $this->recv_drop_partition_by_name(); + } + + public function send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition_by_name() + { + $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_drop_partition_by_name_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_drop_partition_by_name_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; + } + throw new \Exception("drop_partition_by_name failed: unknown result"); + } + + public function get_partition($db_name, $tbl_name, $part_vals) + { + $this->send_get_partition($db_name, $tbl_name, $part_vals); + return $this->recv_get_partition(); + } + + public function send_get_partition($db_name, $tbl_name, $part_vals) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition() + { + $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_partition_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_partition_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; + } + throw new \Exception("get_partition failed: unknown result"); + } + + public function get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $this->send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names); + return $this->recv_get_partition_with_auth(); + } + + public function send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_with_auth() + { + $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_partition_with_auth_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_partition_with_auth_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; + } + throw new \Exception("get_partition_with_auth failed: unknown result"); + } + + public function get_partition_by_name($db_name, $tbl_name, $part_name) + { + $this->send_get_partition_by_name($db_name, $tbl_name, $part_name); + return $this->recv_get_partition_by_name(); + } + + public function send_get_partition_by_name($db_name, $tbl_name, $part_name) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_by_name() + { + $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_partition_by_name_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_partition_by_name_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; + } + throw new \Exception("get_partition_by_name failed: unknown result"); + } + + public function get_partitions($db_name, $tbl_name, $max_parts) + { + $this->send_get_partitions($db_name, $tbl_name, $max_parts); + return $this->recv_get_partitions(); + } + + public function send_get_partitions($db_name, $tbl_name, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions() + { + $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_partitions_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_partitions_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; + } + throw new \Exception("get_partitions failed: unknown result"); + } + + public function get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_with_auth(); + } + + public function send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_with_auth() + { + $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_partitions_with_auth_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_partitions_with_auth_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; + } + throw new \Exception("get_partitions_with_auth failed: unknown result"); + } + + public function get_partition_names($db_name, $tbl_name, $max_parts) + { + $this->send_get_partition_names($db_name, $tbl_name, $max_parts); + return $this->recv_get_partition_names(); + } + + public function send_get_partition_names($db_name, $tbl_name, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partition_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partition_names failed: unknown result"); + } + + public function get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $this->send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts); + return $this->recv_get_partitions_ps(); + } + + public function send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_ps_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_ps', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_ps() + { + $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_partitions_ps_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_partitions_ps_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; + } + throw new \Exception("get_partitions_ps failed: unknown result"); + } + + public function get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_ps_with_auth(); + } + + public function send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_ps_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_ps_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_ps_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_ps_with_auth() + { + $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_partitions_ps_with_auth_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_partitions_ps_with_auth_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; + } + throw new \Exception("get_partitions_ps_with_auth failed: unknown result"); + } + + public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $this->send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); + return $this->recv_get_partition_names_ps(); + } + + public function send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_names_ps_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_names_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_names_ps', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_names_ps() + { + $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_partition_names_ps_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_partition_names_ps_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; + } + throw new \Exception("get_partition_names_ps failed: unknown result"); + } + + public function get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $this->send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts); + return $this->recv_get_partitions_by_filter(); + } + + public function send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_by_filter_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->filter = $filter; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_by_filter', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_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_partitions_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_partitions_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; + } + throw new \Exception("get_partitions_by_filter failed: unknown result"); + } + + public function get_partitions_by_names($db_name, $tbl_name, $names) + { + $this->send_get_partitions_by_names($db_name, $tbl_name, $names); + return $this->recv_get_partitions_by_names(); + } + + public function send_get_partitions_by_names($db_name, $tbl_name, $names) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_by_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->names = $names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_by_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_by_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_by_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_by_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partitions_by_names_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; + } + throw new \Exception("get_partitions_by_names failed: unknown result"); + } + + public function alter_partition($db_name, $tbl_name, \metastore\Partition $new_part) + { + $this->send_alter_partition($db_name, $tbl_name, $new_part); + $this->recv_alter_partition(); + } + + public function send_alter_partition($db_name, $tbl_name, \metastore\Partition $new_part) + { + $args = new \metastore\ThriftHiveMetastore_alter_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partition() + { + $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_alter_partition_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_alter_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function alter_partitions($db_name, $tbl_name, $new_parts) + { + $this->send_alter_partitions($db_name, $tbl_name, $new_parts); + $this->recv_alter_partitions(); + } + + public function send_alter_partitions($db_name, $tbl_name, $new_parts) + { + $args = new \metastore\ThriftHiveMetastore_alter_partitions_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_parts = $new_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partitions() + { + $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_alter_partitions_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_alter_partitions_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function alter_partition_with_environment_context($db_name, $tbl_name, \metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $this->send_alter_partition_with_environment_context($db_name, $tbl_name, $new_part, $environment_context); + $this->recv_alter_partition_with_environment_context(); + } + + public function send_alter_partition_with_environment_context($db_name, $tbl_name, \metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_alter_partition_with_environment_context_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_part = $new_part; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partition_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partition_with_environment_context() + { + $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_alter_partition_with_environment_context_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_alter_partition_with_environment_context_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function rename_partition($db_name, $tbl_name, $part_vals, \metastore\Partition $new_part) + { + $this->send_rename_partition($db_name, $tbl_name, $part_vals, $new_part); + $this->recv_rename_partition(); + } + + public function send_rename_partition($db_name, $tbl_name, $part_vals, \metastore\Partition $new_part) + { + $args = new \metastore\ThriftHiveMetastore_rename_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'rename_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('rename_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_rename_partition() + { + $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_rename_partition_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_rename_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function get_config_value($name, $defaultValue) + { + $this->send_get_config_value($name, $defaultValue); + return $this->recv_get_config_value(); + } + + public function send_get_config_value($name, $defaultValue) + { + $args = new \metastore\ThriftHiveMetastore_get_config_value_args(); + $args->name = $name; + $args->defaultValue = $defaultValue; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_config_value', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_config_value', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_config_value() + { + $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_config_value_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_config_value_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_config_value failed: unknown result"); + } + + public function partition_name_to_vals($part_name) + { + $this->send_partition_name_to_vals($part_name); + return $this->recv_partition_name_to_vals(); + } + + public function send_partition_name_to_vals($part_name) + { + $args = new \metastore\ThriftHiveMetastore_partition_name_to_vals_args(); + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'partition_name_to_vals', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('partition_name_to_vals', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_partition_name_to_vals() + { + $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_partition_name_to_vals_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_partition_name_to_vals_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("partition_name_to_vals failed: unknown result"); + } + + public function partition_name_to_spec($part_name) + { + $this->send_partition_name_to_spec($part_name); + return $this->recv_partition_name_to_spec(); + } + + public function send_partition_name_to_spec($part_name) + { + $args = new \metastore\ThriftHiveMetastore_partition_name_to_spec_args(); + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'partition_name_to_spec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('partition_name_to_spec', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_partition_name_to_spec() + { + $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_partition_name_to_spec_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_partition_name_to_spec_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("partition_name_to_spec failed: unknown result"); + } + + public function markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $this->send_markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType); + $this->recv_markPartitionForEvent(); + } + + public function send_markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $args = new \metastore\ThriftHiveMetastore_markPartitionForEvent_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->eventType = $eventType; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'markPartitionForEvent', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('markPartitionForEvent', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_markPartitionForEvent() + { + $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_markPartitionForEvent_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_markPartitionForEvent_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + if ($result->o5 !== null) { + throw $result->o5; + } + if ($result->o6 !== null) { + throw $result->o6; + } + return; + } + + public function isPartitionMarkedForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $this->send_isPartitionMarkedForEvent($db_name, $tbl_name, $part_vals, $eventType); + return $this->recv_isPartitionMarkedForEvent(); + } + + public function send_isPartitionMarkedForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $args = new \metastore\ThriftHiveMetastore_isPartitionMarkedForEvent_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->eventType = $eventType; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'isPartitionMarkedForEvent', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('isPartitionMarkedForEvent', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_isPartitionMarkedForEvent() + { + $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_isPartitionMarkedForEvent_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_isPartitionMarkedForEvent_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + if ($result->o5 !== null) { + throw $result->o5; + } + if ($result->o6 !== null) { + throw $result->o6; + } + throw new \Exception("isPartitionMarkedForEvent failed: unknown result"); + } + + public function add_index(\metastore\Index $new_index, \metastore\Table $index_table) + { + $this->send_add_index($new_index, $index_table); + return $this->recv_add_index(); + } + + public function send_add_index(\metastore\Index $new_index, \metastore\Table $index_table) + { + $args = new \metastore\ThriftHiveMetastore_add_index_args(); + $args->new_index = $new_index; + $args->index_table = $index_table; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_index', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_index() + { + $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_add_index_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_add_index_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("add_index failed: unknown result"); + } + + public function alter_index($dbname, $base_tbl_name, $idx_name, \metastore\Index $new_idx) + { + $this->send_alter_index($dbname, $base_tbl_name, $idx_name, $new_idx); + $this->recv_alter_index(); + } + + public function send_alter_index($dbname, $base_tbl_name, $idx_name, \metastore\Index $new_idx) + { + $args = new \metastore\ThriftHiveMetastore_alter_index_args(); + $args->dbname = $dbname; + $args->base_tbl_name = $base_tbl_name; + $args->idx_name = $idx_name; + $args->new_idx = $new_idx; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_index', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_index() + { + $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_alter_index_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_alter_index_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) + { + $this->send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData); + return $this->recv_drop_index_by_name(); + } + + public function send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_index_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->index_name = $index_name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_index_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_index_by_name() + { + $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_drop_index_by_name_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_drop_index_by_name_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; + } + throw new \Exception("drop_index_by_name failed: unknown result"); + } + + public function get_index_by_name($db_name, $tbl_name, $index_name) + { + $this->send_get_index_by_name($db_name, $tbl_name, $index_name); + return $this->recv_get_index_by_name(); + } + + public function send_get_index_by_name($db_name, $tbl_name, $index_name) + { + $args = new \metastore\ThriftHiveMetastore_get_index_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->index_name = $index_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_index_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_index_by_name() + { + $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_index_by_name_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_index_by_name_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; + } + throw new \Exception("get_index_by_name failed: unknown result"); + } + + public function get_indexes($db_name, $tbl_name, $max_indexes) + { + $this->send_get_indexes($db_name, $tbl_name, $max_indexes); + return $this->recv_get_indexes(); + } + + public function send_get_indexes($db_name, $tbl_name, $max_indexes) + { + $args = new \metastore\ThriftHiveMetastore_get_indexes_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_indexes = $max_indexes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_indexes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_indexes', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_indexes() + { + $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_indexes_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_indexes_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; + } + throw new \Exception("get_indexes failed: unknown result"); + } + + public function get_index_names($db_name, $tbl_name, $max_indexes) + { + $this->send_get_index_names($db_name, $tbl_name, $max_indexes); + return $this->recv_get_index_names(); + } + + public function send_get_index_names($db_name, $tbl_name, $max_indexes) + { + $args = new \metastore\ThriftHiveMetastore_get_index_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_indexes = $max_indexes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_index_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_index_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_index_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_index_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_index_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_index_names failed: unknown result"); + } + + public function update_table_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $this->send_update_table_column_statistics($stats_obj); + return $this->recv_update_table_column_statistics(); + } + + public function send_update_table_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $args = new \metastore\ThriftHiveMetastore_update_table_column_statistics_args(); + $args->stats_obj = $stats_obj; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'update_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('update_table_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_update_table_column_statistics() + { + $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_update_table_column_statistics_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_update_table_column_statistics_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("update_table_column_statistics failed: unknown result"); + } + + public function update_partition_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $this->send_update_partition_column_statistics($stats_obj); + return $this->recv_update_partition_column_statistics(); + } + + public function send_update_partition_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $args = new \metastore\ThriftHiveMetastore_update_partition_column_statistics_args(); + $args->stats_obj = $stats_obj; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'update_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('update_partition_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_update_partition_column_statistics() + { + $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_update_partition_column_statistics_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_update_partition_column_statistics_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("update_partition_column_statistics failed: unknown result"); + } + + public function get_table_column_statistics($db_name, $tbl_name, $col_name) + { + $this->send_get_table_column_statistics($db_name, $tbl_name, $col_name); + return $this->recv_get_table_column_statistics(); + } + + public function send_get_table_column_statistics($db_name, $tbl_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_get_table_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_column_statistics() + { + $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_column_statistics_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_column_statistics_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("get_table_column_statistics failed: unknown result"); + } + + public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $this->send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_get_partition_column_statistics(); + } + + public function send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_column_statistics() + { + $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_partition_column_statistics_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_partition_column_statistics_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("get_partition_column_statistics failed: unknown result"); + } + + public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $this->send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_delete_partition_column_statistics(); + } + + public function send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_delete_partition_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'delete_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('delete_partition_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_delete_partition_column_statistics() + { + $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_delete_partition_column_statistics_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_delete_partition_column_statistics_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("delete_partition_column_statistics failed: unknown result"); + } + + public function delete_table_column_statistics($db_name, $tbl_name, $col_name) + { + $this->send_delete_table_column_statistics($db_name, $tbl_name, $col_name); + return $this->recv_delete_table_column_statistics(); + } + + public function send_delete_table_column_statistics($db_name, $tbl_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_delete_table_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'delete_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('delete_table_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_delete_table_column_statistics() + { + $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_delete_table_column_statistics_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_delete_table_column_statistics_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("delete_table_column_statistics failed: unknown result"); + } + + public function create_role(\metastore\Role $role) + { + $this->send_create_role($role); + return $this->recv_create_role(); + } + + public function send_create_role(\metastore\Role $role) + { + $args = new \metastore\ThriftHiveMetastore_create_role_args(); + $args->role = $role; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_role() + { + $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_create_role_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_create_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("create_role failed: unknown result"); + } + + public function drop_role($role_name) + { + $this->send_drop_role($role_name); + return $this->recv_drop_role(); + } + + public function send_drop_role($role_name) + { + $args = new \metastore\ThriftHiveMetastore_drop_role_args(); + $args->role_name = $role_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_role() + { + $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_drop_role_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_drop_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("drop_role failed: unknown result"); + } + + public function get_role_names() + { + $this->send_get_role_names(); + return $this->recv_get_role_names(); + } + + public function send_get_role_names() + { + $args = new \metastore\ThriftHiveMetastore_get_role_names_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_role_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_role_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_role_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_role_names failed: unknown result"); + } + + public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + { + $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); + return $this->recv_grant_role(); + } + + public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + { + $args = new \metastore\ThriftHiveMetastore_grant_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->grantor = $grantor; + $args->grantorType = $grantorType; + $args->grant_option = $grant_option; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_role() + { + $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_grant_role_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_grant_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("grant_role failed: unknown result"); + } + + public function revoke_role($role_name, $principal_name, $principal_type) + { + $this->send_revoke_role($role_name, $principal_name, $principal_type); + return $this->recv_revoke_role(); + } + + public function send_revoke_role($role_name, $principal_name, $principal_type) + { + $args = new \metastore\ThriftHiveMetastore_revoke_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_role() + { + $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_revoke_role_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_revoke_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("revoke_role failed: unknown result"); + } + + public function list_roles($principal_name, $principal_type) + { + $this->send_list_roles($principal_name, $principal_type); + return $this->recv_list_roles(); + } + + public function send_list_roles($principal_name, $principal_type) + { + $args = new \metastore\ThriftHiveMetastore_list_roles_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_roles() + { + $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_list_roles_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_list_roles_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("list_roles failed: unknown result"); + } + + public function get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) + { + $this->send_get_privilege_set($hiveObject, $user_name, $group_names); + return $this->recv_get_privilege_set(); + } + + public function send_get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_privilege_set_args(); + $args->hiveObject = $hiveObject; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_privilege_set() + { + $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_privilege_set_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_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_privilege_set failed: unknown result"); + } + + public function list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) + { + $this->send_list_privileges($principal_name, $principal_type, $hiveObject); + return $this->recv_list_privileges(); + } + + public function send_list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) + { + $args = new \metastore\ThriftHiveMetastore_list_privileges_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->hiveObject = $hiveObject; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_privileges() + { + $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_list_privileges_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_list_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("list_privileges failed: unknown result"); + } + + public function grant_privileges(\metastore\PrivilegeBag $privileges) + { + $this->send_grant_privileges($privileges); + return $this->recv_grant_privileges(); + } + + public function send_grant_privileges(\metastore\PrivilegeBag $privileges) + { + $args = new \metastore\ThriftHiveMetastore_grant_privileges_args(); + $args->privileges = $privileges; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_privileges() + { + $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_grant_privileges_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_grant_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("grant_privileges failed: unknown result"); + } + + public function revoke_privileges(\metastore\PrivilegeBag $privileges) + { + $this->send_revoke_privileges($privileges); + return $this->recv_revoke_privileges(); + } + + public function send_revoke_privileges(\metastore\PrivilegeBag $privileges) + { + $args = new \metastore\ThriftHiveMetastore_revoke_privileges_args(); + $args->privileges = $privileges; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_privileges() + { + $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_revoke_privileges_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_revoke_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("revoke_privileges failed: unknown result"); + } + + public function set_ugi($user_name, $group_names) + { + $this->send_set_ugi($user_name, $group_names); + return $this->recv_set_ugi(); + } + + public function send_set_ugi($user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_set_ugi_args(); + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_set_ugi() + { + $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_set_ugi_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_set_ugi_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("set_ugi failed: unknown result"); + } + + public function get_delegation_token($token_owner, $renewer_kerberos_principal_name) + { + $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name); + return $this->recv_get_delegation_token(); + } + + public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name) + { + $args = new \metastore\ThriftHiveMetastore_get_delegation_token_args(); + $args->token_owner = $token_owner; + $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_delegation_token() + { + $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_delegation_token_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_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_delegation_token failed: unknown result"); + } + + public function renew_delegation_token($token_str_form) + { + $this->send_renew_delegation_token($token_str_form); + return $this->recv_renew_delegation_token(); + } + + public function send_renew_delegation_token($token_str_form) + { + $args = new \metastore\ThriftHiveMetastore_renew_delegation_token_args(); + $args->token_str_form = $token_str_form; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'renew_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('renew_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_renew_delegation_token() + { + $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_renew_delegation_token_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_renew_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("renew_delegation_token failed: unknown result"); + } + + public function cancel_delegation_token($token_str_form) + { + $this->send_cancel_delegation_token($token_str_form); + $this->recv_cancel_delegation_token(); + } + + public function send_cancel_delegation_token($token_str_form) + { + $args = new \metastore\ThriftHiveMetastore_cancel_delegation_token_args(); + $args->token_str_form = $token_str_form; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'cancel_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('cancel_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_cancel_delegation_token() + { + $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_cancel_delegation_token_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_cancel_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class ThriftHiveMetastore_create_database_args { + static $_TSPEC; + + public $database = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'database', + 'type' => TType::STRUCT, + 'class' => '\metastore\Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['database'])) { + $this->database = $vals['database']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_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::STRUCT) { + $this->database = new \metastore\Database(); + $xfer += $this->database->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_create_database_args'); + if ($this->database !== null) { + if (!is_object($this->database)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); + $xfer += $this->database->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + 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_create_database_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_create_database_result'); + 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 ThriftHiveMetastore_get_database_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_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->name); + } 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_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_database_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Database', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_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::STRUCT) { + $this->success = new \metastore\Database(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_database_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_database_args { + static $_TSPEC; + + public $name = null; + public $deleteData = null; + public $cascade = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'cascade', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['cascade'])) { + $this->cascade = $vals['cascade']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->cascade); + } 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_drop_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + if ($this->cascade !== null) { + $xfer += $output->writeFieldBegin('cascade', TType::BOOL, 3); + $xfer += $output->writeBool($this->cascade); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + 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_drop_database_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $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\MetaException(); + $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_drop_database_result'); + 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 ThriftHiveMetastore_get_databases_args { + static $_TSPEC; + + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_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->pattern); + } 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_databases_args'); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_databases_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_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(); + $_size227 = 0; + $_etype230 = 0; + $xfer += $input->readListBegin($_etype230, $_size227); + for ($_i231 = 0; $_i231 < $_size227; ++$_i231) + { + $elem232 = null; + $xfer += $input->readString($elem232); + $this->success []= $elem232; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_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 $iter233) + { + $xfer += $output->writeString($iter233); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_databases_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_databases_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) + { + 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_all_databases_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_databases_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_databases_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(); + $_size234 = 0; + $_etype237 = 0; + $xfer += $input->readListBegin($_etype237, $_size234); + for ($_i238 = 0; $_i238 < $_size234; ++$_i238) + { + $elem239 = null; + $xfer += $input->readString($elem239); + $this->success []= $elem239; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_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 $iter240) + { + $xfer += $output->writeString($iter240); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_database_args { + static $_TSPEC; + + public $dbname = null; + public $db = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'db', + 'type' => TType::STRUCT, + 'class' => '\metastore\Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['db'])) { + $this->db = $vals['db']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_database_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::STRUCT) { + $this->db = new \metastore\Database(); + $xfer += $this->db->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_alter_database_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->db !== null) { + if (!is_object($this->db)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('db', TType::STRUCT, 2); + $xfer += $this->db->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_database_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 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\NoSuchObjectException(); + $xfer += $this->o2->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_alter_database_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_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->name); + } 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_type_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_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::STRUCT) { + $this->success = new \metastore\Type(); + $xfer += $this->success->read($input); + } 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\NoSuchObjectException(); + $xfer += $this->o2->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_type_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_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::STRUCT) { + $this->type = new \metastore\Type(); + $xfer += $this->type->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_create_type_args'); + if ($this->type !== null) { + if (!is_object($this->type)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); + $xfer += $this->type->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_type_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::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_create_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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 ThriftHiveMetastore_drop_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_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->type); + } 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_drop_type_args'); + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 1); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_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::BOOL) { + $xfer += $input->readBool($this->success); + } 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\NoSuchObjectException(); + $xfer += $this->o2->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_drop_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_all_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_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->name); + } 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_type_all_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_all_result { + static $_TSPEC; + + public $success = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', + ), + ), + 1 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_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::MAP) { + $this->success = array(); + $_size241 = 0; + $_ktype242 = 0; + $_vtype243 = 0; + $xfer += $input->readMapBegin($_ktype242, $_vtype243, $_size241); + for ($_i245 = 0; $_i245 < $_size241; ++$_i245) + { + $key246 = ''; + $val247 = new \metastore\Type(); + $xfer += $input->readString($key246); + $val247 = new \metastore\Type(); + $xfer += $val247->read($input); + $this->success[$key246] = $val247; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_type_all_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::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + { + foreach ($this->success as $kiter248 => $viter249) + { + $xfer += $output->writeString($kiter248); + $xfer += $viter249->write($output); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_fields_args { + static $_TSPEC; + + public $db_name = null; + public $table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_fields_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } 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_fields_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_fields_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::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 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_fields_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(); + $_size250 = 0; + $_etype253 = 0; + $xfer += $input->readListBegin($_etype253, $_size250); + for ($_i254 = 0; $_i254 < $_size250; ++$_i254) + { + $elem255 = null; + $elem255 = new \metastore\FieldSchema(); + $xfer += $elem255->read($input); + $this->success []= $elem255; + } + $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\UnknownTableException(); + $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_fields_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter256) + { + $xfer += $iter256->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + 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 ThriftHiveMetastore_get_schema_args { + static $_TSPEC; + + public $db_name = null; + public $table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } 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_schema_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_schema_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::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 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_schema_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(); + $_size257 = 0; + $_etype260 = 0; + $xfer += $input->readListBegin($_etype260, $_size257); + for ($_i261 = 0; $_i261 < $_size257; ++$_i261) + { + $elem262 = null; + $elem262 = new \metastore\FieldSchema(); + $xfer += $elem262->read($input); + $this->success []= $elem262; + } + $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\UnknownTableException(); + $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_schema_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter263) + { + $xfer += $iter263->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + 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 ThriftHiveMetastore_create_table_args { + static $_TSPEC; + + public $tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_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::STRUCT) { + $this->tbl = new \metastore\Table(); + $xfer += $this->tbl->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_create_table_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\NoSuchObjectException(); + $xfer += $this->o4->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_create_table_result'); + 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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_with_environment_context_args { + static $_TSPEC; + + public $tbl = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + 2 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_with_environment_context_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::STRUCT) { + $this->tbl = new \metastore\Table(); + $xfer += $this->tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->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_create_table_with_environment_context_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_with_environment_context_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_with_environment_context_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\NoSuchObjectException(); + $xfer += $this->o4->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_create_table_with_environment_context_result'); + 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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_table_args { + static $_TSPEC; + + public $dbname = null; + public $name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_table_result { + static $_TSPEC; + + public $o1 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_drop_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_tables_args { + static $_TSPEC; + + public $db_name = null; + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_tables_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_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(); + $_size264 = 0; + $_etype267 = 0; + $xfer += $input->readListBegin($_etype267, $_size264); + for ($_i268 = 0; $_i268 < $_size264; ++$_i268) + { + $elem269 = null; + $xfer += $input->readString($elem269); + $this->success []= $elem269; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_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 $iter270) + { + $xfer += $output->writeString($iter270); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_tables_args { + static $_TSPEC; + + public $db_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_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->db_name); + } 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_all_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_tables_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_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(); + $_size271 = 0; + $_etype274 = 0; + $xfer += $input->readListBegin($_etype274, $_size271); + for ($_i275 = 0; $_i275 < $_size271; ++$_i275) + { + $elem276 = null; + $xfer += $input->readString($elem276); + $this->success []= $elem276; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_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 $iter277) + { + $xfer += $output->writeString($iter277); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_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->tbl_name); + } 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_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_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::STRUCT) { + $this->success = new \metastore\Table(); + $xfer += $this->success->read($input); + } 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\NoSuchObjectException(); + $xfer += $this->o2->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_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_objects_by_name_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_names'])) { + $this->tbl_names = $vals['tbl_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_objects_by_name_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::LST) { + $this->tbl_names = array(); + $_size278 = 0; + $_etype281 = 0; + $xfer += $input->readListBegin($_etype281, $_size278); + for ($_i282 = 0; $_i282 < $_size278; ++$_i282) + { + $elem283 = null; + $xfer += $input->readString($elem283); + $this->tbl_names []= $elem283; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_names !== null) { + if (!is_array($this->tbl_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->tbl_names)); + { + foreach ($this->tbl_names as $iter284) + { + $xfer += $output->writeString($iter284); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_objects_by_name_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::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ), + 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_objects_by_name_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(); + $_size285 = 0; + $_etype288 = 0; + $xfer += $input->readListBegin($_etype288, $_size285); + for ($_i289 = 0; $_i289 < $_size285; ++$_i289) + { + $elem290 = null; + $elem290 = new \metastore\Table(); + $xfer += $elem290->read($input); + $this->success []= $elem290; + } + $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_objects_by_name_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter291) + { + $xfer += $iter291->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + 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 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 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(); + $_size292 = 0; + $_etype295 = 0; + $xfer += $input->readListBegin($_etype295, $_size292); + for ($_i296 = 0; $_i296 < $_size292; ++$_i296) + { + $elem297 = null; + $xfer += $input->readString($elem297); + $this->success []= $elem297; + } + $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 $iter298) + { + $xfer += $output->writeString($iter298); + } + } + $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 ThriftHiveMetastore_alter_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + public $new_tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_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->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new \metastore\Table(); + $xfer += $this->new_tbl->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_alter_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_alter_table_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_with_environment_context_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + public $new_tbl = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + 4 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_with_environment_context_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->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new \metastore\Table(); + $xfer += $this->new_tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->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_alter_table_with_environment_context_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_with_environment_context_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_with_environment_context_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_alter_table_with_environment_context_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partition_args { + static $_TSPEC; + + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_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::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->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_add_partition_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partition_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::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_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::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_add_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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 ThriftHiveMetastore_add_partition_with_environment_context_args { + static $_TSPEC; + + public $new_part = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 2 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_with_environment_context_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::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->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_add_partition_with_environment_context_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partition_with_environment_context_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::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_with_environment_context_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::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_add_partition_with_environment_context_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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 ThriftHiveMetastore_add_partitions_args { + static $_TSPEC; + + public $new_parts = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partitions_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->new_parts = array(); + $_size299 = 0; + $_etype302 = 0; + $xfer += $input->readListBegin($_etype302, $_size299); + for ($_i303 = 0; $_i303 < $_size299; ++$_i303) + { + $elem304 = null; + $elem304 = new \metastore\Partition(); + $xfer += $elem304->read($input); + $this->new_parts []= $elem304; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_args'); + if ($this->new_parts !== null) { + if (!is_array($this->new_parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + { + foreach ($this->new_parts as $iter305) + { + $xfer += $iter305->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partitions_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::I32, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partitions_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::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_add_partitions_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $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 ThriftHiveMetastore_append_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size306 = 0; + $_etype309 = 0; + $xfer += $input->readListBegin($_etype309, $_size306); + for ($_i310 = 0; $_i310 < $_size306; ++$_i310) + { + $elem311 = null; + $xfer += $input->readString($elem311); + $this->part_vals []= $elem311; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter312) + { + $xfer += $output->writeString($iter312); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_append_partition_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::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_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::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_append_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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 ThriftHiveMetastore_append_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } 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_append_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_append_partition_by_name_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::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_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::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_append_partition_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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 ThriftHiveMetastore_drop_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size313 = 0; + $_etype316 = 0; + $xfer += $input->readListBegin($_etype316, $_size313); + for ($_i317 = 0; $_i317 < $_size313; ++$_i317) + { + $elem318 = null; + $xfer += $input->readString($elem318); + $this->part_vals []= $elem318; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter319) + { + $xfer += $output->writeString($iter319); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_drop_partition_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_drop_partition_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size320 = 0; + $_etype323 = 0; + $xfer += $input->readListBegin($_etype323, $_size320); + for ($_i324 = 0; $_i324 < $_size320; ++$_i324) + { + $elem325 = null; + $xfer += $input->readString($elem325); + $this->part_vals []= $elem325; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter326) + { + $xfer += $output->writeString($iter326); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_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::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } 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\NoSuchObjectException(); + $xfer += $this->o2->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_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_with_auth_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_with_auth_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size327 = 0; + $_etype330 = 0; + $xfer += $input->readListBegin($_etype330, $_size327); + for ($_i331 = 0; $_i331 < $_size327; ++$_i331) + { + $elem332 = null; + $xfer += $input->readString($elem332); + $this->part_vals []= $elem332; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size333 = 0; + $_etype336 = 0; + $xfer += $input->readListBegin($_etype336, $_size333); + for ($_i337 = 0; $_i337 < $_size333; ++$_i337) + { + $elem338 = null; + $xfer += $input->readString($elem338); + $this->group_names []= $elem338; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter339) + { + $xfer += $output->writeString($iter339); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter340) + { + $xfer += $output->writeString($iter340); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_with_auth_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_with_auth_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::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } 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\NoSuchObjectException(); + $xfer += $this->o2->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_partition_with_auth_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } 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_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_by_name_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::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } 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\NoSuchObjectException(); + $xfer += $this->o2->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_partition_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } 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_partitions_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_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(); + $_size341 = 0; + $_etype344 = 0; + $xfer += $input->readListBegin($_etype344, $_size341); + for ($_i345 = 0; $_i345 < $_size341; ++$_i345) + { + $elem346 = null; + $elem346 = new \metastore\Partition(); + $xfer += $elem346->read($input); + $this->success []= $elem346; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_partitions_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter347) + { + $xfer += $iter347->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_with_auth_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_with_auth_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size348 = 0; + $_etype351 = 0; + $xfer += $input->readListBegin($_etype351, $_size348); + for ($_i352 = 0; $_i352 < $_size348; ++$_i352) + { + $elem353 = null; + $xfer += $input->readString($elem353); + $this->group_names []= $elem353; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter354) + { + $xfer += $output->writeString($iter354); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_with_auth_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_with_auth_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(); + $_size355 = 0; + $_etype358 = 0; + $xfer += $input->readListBegin($_etype358, $_size355); + for ($_i359 = 0; $_i359 < $_size355; ++$_i359) + { + $elem360 = null; + $elem360 = new \metastore\Partition(); + $xfer += $elem360->read($input); + $this->success []= $elem360; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_partitions_with_auth_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter361) + { + $xfer += $iter361->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } 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_partition_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_result { + static $_TSPEC; + + public $success = null; + public $o2 = 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' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size362 = 0; + $_etype365 = 0; + $xfer += $input->readListBegin($_etype365, $_size362); + for ($_i366 = 0; $_i366 < $_size362; ++$_i366) + { + $elem367 = null; + $xfer += $input->readString($elem367); + $this->success []= $elem367; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_partition_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter368) + { + $xfer += $output->writeString($iter368); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size369 = 0; + $_etype372 = 0; + $xfer += $input->readListBegin($_etype372, $_size369); + for ($_i373 = 0; $_i373 < $_size369; ++$_i373) + { + $elem374 = null; + $xfer += $input->readString($elem374); + $this->part_vals []= $elem374; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } 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_partitions_ps_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter375) + { + $xfer += $output->writeString($iter375); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_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(); + $_size376 = 0; + $_etype379 = 0; + $xfer += $input->readListBegin($_etype379, $_size376); + for ($_i380 = 0; $_i380 < $_size376; ++$_i380) + { + $elem381 = null; + $elem381 = new \metastore\Partition(); + $xfer += $elem381->read($input); + $this->success []= $elem381; + } + $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\NoSuchObjectException(); + $xfer += $this->o2->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_partitions_ps_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter382) + { + $xfer += $iter382->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_with_auth_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 5 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size383 = 0; + $_etype386 = 0; + $xfer += $input->readListBegin($_etype386, $_size383); + for ($_i387 = 0; $_i387 < $_size383; ++$_i387) + { + $elem388 = null; + $xfer += $input->readString($elem388); + $this->part_vals []= $elem388; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size389 = 0; + $_etype392 = 0; + $xfer += $input->readListBegin($_etype392, $_size389); + for ($_i393 = 0; $_i393 < $_size389; ++$_i393) + { + $elem394 = null; + $xfer += $input->readString($elem394); + $this->group_names []= $elem394; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter395) + { + $xfer += $output->writeString($iter395); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter396) + { + $xfer += $output->writeString($iter396); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_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(); + $_size397 = 0; + $_etype400 = 0; + $xfer += $input->readListBegin($_etype400, $_size397); + for ($_i401 = 0; $_i401 < $_size397; ++$_i401) + { + $elem402 = null; + $elem402 = new \metastore\Partition(); + $xfer += $elem402->read($input); + $this->success []= $elem402; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_partitions_ps_with_auth_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter403) + { + $xfer += $iter403->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_ps_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_ps_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size404 = 0; + $_etype407 = 0; + $xfer += $input->readListBegin($_etype407, $_size404); + for ($_i408 = 0; $_i408 < $_size404; ++$_i408) + { + $elem409 = null; + $xfer += $input->readString($elem409); + $this->part_vals []= $elem409; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } 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_partition_names_ps_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter410) + { + $xfer += $output->writeString($iter410); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_ps_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = 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\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_ps_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(); + $_size411 = 0; + $_etype414 = 0; + $xfer += $input->readListBegin($_etype414, $_size411); + for ($_i415 = 0; $_i415 < $_size411; ++$_i415) + { + $elem416 = null; + $xfer += $input->readString($elem416); + $this->success []= $elem416; + } + $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\NoSuchObjectException(); + $xfer += $this->o2->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_partition_names_ps_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 $iter417) + { + $xfer += $output->writeString($iter417); + } + } + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_filter_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $filter = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'filter', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } 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_partitions_by_filter_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_filter_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_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(); + $_size418 = 0; + $_etype421 = 0; + $xfer += $input->readListBegin($_etype421, $_size418); + for ($_i422 = 0; $_i422 < $_size418; ++$_i422) + { + $elem423 = null; + $elem423 = new \metastore\Partition(); + $xfer += $elem423->read($input); + $this->success []= $elem423; + } + $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\NoSuchObjectException(); + $xfer += $this->o2->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_partitions_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::STRUCT, count($this->success)); + { + foreach ($this->success as $iter424) + { + $xfer += $iter424->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_names_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['names'])) { + $this->names = $vals['names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->names = array(); + $_size425 = 0; + $_etype428 = 0; + $xfer += $input->readListBegin($_etype428, $_size425); + for ($_i429 = 0; $_i429 < $_size425; ++$_i429) + { + $elem430 = null; + $xfer += $input->readString($elem430); + $this->names []= $elem430; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->names !== null) { + if (!is_array($this->names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('names', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->names)); + { + foreach ($this->names as $iter431) + { + $xfer += $output->writeString($iter431); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_names_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size432 = 0; + $_etype435 = 0; + $xfer += $input->readListBegin($_etype435, $_size432); + for ($_i436 = 0; $_i436 < $_size432; ++$_i436) + { + $elem437 = null; + $elem437 = new \metastore\Partition(); + $xfer += $elem437->read($input); + $this->success []= $elem437; + } + $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\NoSuchObjectException(); + $xfer += $this->o2->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_partitions_by_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter438) + { + $xfer += $iter438->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->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_alter_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_alter_partition_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partitions_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $new_parts = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partitions_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->new_parts = array(); + $_size439 = 0; + $_etype442 = 0; + $xfer += $input->readListBegin($_etype442, $_size439); + for ($_i443 = 0; $_i443 < $_size439; ++$_i443) + { + $elem444 = null; + $elem444 = new \metastore\Partition(); + $xfer += $elem444->read($input); + $this->new_parts []= $elem444; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_parts !== null) { + if (!is_array($this->new_parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + { + foreach ($this->new_parts as $iter445) + { + $xfer += $iter445->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partitions_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partitions_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_alter_partitions_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_with_environment_context_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $new_part = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 4 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_with_environment_context_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->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_alter_partition_with_environment_context_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_with_environment_context_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_with_environment_context_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_alter_partition_with_environment_context_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_rename_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_rename_partition_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size446 = 0; + $_etype449 = 0; + $xfer += $input->readListBegin($_etype449, $_size446); + for ($_i450 = 0; $_i450 < $_size446; ++$_i450) + { + $elem451 = null; + $xfer += $input->readString($elem451); + $this->part_vals []= $elem451; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->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_rename_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter452) + { + $xfer += $output->writeString($iter452); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 4); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_rename_partition_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_rename_partition_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_rename_partition_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_config_value_args { + static $_TSPEC; + + public $name = null; + public $defaultValue = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'defaultValue', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_config_value_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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->defaultValue); + } 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_config_value_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_config_value_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\ConfigValSecurityException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_config_value_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::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\ConfigValSecurityException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_vals_args { + static $_TSPEC; + + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_vals_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->part_name); + } 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_partition_name_to_vals_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_vals_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_vals_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(); + $_size453 = 0; + $_etype456 = 0; + $xfer += $input->readListBegin($_etype456, $_size453); + for ($_i457 = 0; $_i457 < $_size453; ++$_i457) + { + $elem458 = null; + $xfer += $input->readString($elem458); + $this->success []= $elem458; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_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 $iter459) + { + $xfer += $output->writeString($iter459); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_spec_args { + static $_TSPEC; + + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_spec_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->part_name); + } 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_partition_name_to_spec_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_spec_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_spec_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::MAP) { + $this->success = array(); + $_size460 = 0; + $_ktype461 = 0; + $_vtype462 = 0; + $xfer += $input->readMapBegin($_ktype461, $_vtype462, $_size460); + for ($_i464 = 0; $_i464 < $_size460; ++$_i464) + { + $key465 = ''; + $val466 = ''; + $xfer += $input->readString($key465); + $xfer += $input->readString($val466); + $this->success[$key465] = $val466; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_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::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); + { + foreach ($this->success as $kiter467 => $viter468) + { + $xfer += $output->writeString($kiter467); + $xfer += $output->writeString($viter468); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_markPartitionForEvent_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $eventType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'eventType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_markPartitionForEvent_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->part_vals = array(); + $_size469 = 0; + $_ktype470 = 0; + $_vtype471 = 0; + $xfer += $input->readMapBegin($_ktype470, $_vtype471, $_size469); + for ($_i473 = 0; $_i473 < $_size469; ++$_i473) + { + $key474 = ''; + $val475 = ''; + $xfer += $input->readString($key474); + $xfer += $input->readString($val475); + $this->part_vals[$key474] = $val475; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); + } 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_markPartitionForEvent_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $kiter476 => $viter477) + { + $xfer += $output->writeString($kiter476); + $xfer += $output->writeString($viter477); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_markPartitionForEvent_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + public $o5 = null; + public $o6 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 5 => array( + 'var' => 'o5', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownPartitionException', + ), + 6 => array( + 'var' => 'o6', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidPartitionException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + if (isset($vals['o5'])) { + $this->o5 = $vals['o5']; + } + if (isset($vals['o6'])) { + $this->o6 = $vals['o6']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_markPartitionForEvent_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 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\NoSuchObjectException(); + $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; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\UnknownTableException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->o5 = new \metastore\UnknownPartitionException(); + $xfer += $this->o5->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->o6 = new \metastore\InvalidPartitionException(); + $xfer += $this->o6->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_markPartitionForEvent_result'); + 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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o5 !== null) { + $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); + $xfer += $this->o5->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o6 !== null) { + $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); + $xfer += $this->o6->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_isPartitionMarkedForEvent_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $eventType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'eventType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->part_vals = array(); + $_size478 = 0; + $_ktype479 = 0; + $_vtype480 = 0; + $xfer += $input->readMapBegin($_ktype479, $_vtype480, $_size478); + for ($_i482 = 0; $_i482 < $_size478; ++$_i482) + { + $key483 = ''; + $val484 = ''; + $xfer += $input->readString($key483); + $xfer += $input->readString($val484); + $this->part_vals[$key483] = $val484; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); + } 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_isPartitionMarkedForEvent_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $kiter485 => $viter486) + { + $xfer += $output->writeString($kiter485); + $xfer += $output->writeString($viter486); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_isPartitionMarkedForEvent_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + public $o5 = null; + public $o6 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 5 => array( + 'var' => 'o5', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownPartitionException', + ), + 6 => array( + 'var' => 'o6', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidPartitionException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + if (isset($vals['o5'])) { + $this->o5 = $vals['o5']; + } + if (isset($vals['o6'])) { + $this->o6 = $vals['o6']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_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::BOOL) { + $xfer += $input->readBool($this->success); + } 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\NoSuchObjectException(); + $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; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\UnknownTableException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->o5 = new \metastore\UnknownPartitionException(); + $xfer += $this->o5->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->o6 = new \metastore\InvalidPartitionException(); + $xfer += $this->o6->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_isPartitionMarkedForEvent_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o5 !== null) { + $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); + $xfer += $this->o5->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o6 !== null) { + $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); + $xfer += $this->o6->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_index_args { + static $_TSPEC; + + public $new_index = null; + public $index_table = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + 2 => array( + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_index'])) { + $this->new_index = $vals['new_index']; + } + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_index_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::STRUCT) { + $this->new_index = new \metastore\Index(); + $xfer += $this->new_index->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->index_table = new \metastore\Table(); + $xfer += $this->index_table->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_add_index_args'); + if ($this->new_index !== null) { + if (!is_object($this->new_index)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); + $xfer += $this->new_index->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); + $xfer += $this->index_table->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_index_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::STRUCT, + 'class' => '\metastore\Index', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_index_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::STRUCT) { + $this->success = new \metastore\Index(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $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_add_index_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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 ThriftHiveMetastore_alter_index_args { + static $_TSPEC; + + public $dbname = null; + public $base_tbl_name = null; + public $idx_name = null; + public $new_idx = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'base_tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'idx_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'new_idx', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['base_tbl_name'])) { + $this->base_tbl_name = $vals['base_tbl_name']; + } + if (isset($vals['idx_name'])) { + $this->idx_name = $vals['idx_name']; + } + if (isset($vals['new_idx'])) { + $this->new_idx = $vals['new_idx']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_index_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->base_tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->idx_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->new_idx = new \metastore\Index(); + $xfer += $this->new_idx->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_alter_index_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->base_tbl_name !== null) { + $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->base_tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->idx_name !== null) { + $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); + $xfer += $output->writeString($this->idx_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_idx !== null) { + if (!is_object($this->new_idx)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); + $xfer += $this->new_idx->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_index_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_index_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_alter_index_result'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_index_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_index_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_index_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_index_by_name_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_drop_index_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); + } 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_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_by_name_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::STRUCT) { + $this->success = new \metastore\Index(); + $xfer += $this->success->read($input); + } 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\NoSuchObjectException(); + $xfer += $this->o2->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_index_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_indexes_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_indexes = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_indexes', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_indexes_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); + } 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_indexes_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_indexes_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_indexes_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(); + $_size487 = 0; + $_etype490 = 0; + $xfer += $input->readListBegin($_etype490, $_size487); + for ($_i491 = 0; $_i491 < $_size487; ++$_i491) + { + $elem492 = null; + $elem492 = new \metastore\Index(); + $xfer += $elem492->read($input); + $this->success []= $elem492; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_indexes_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter493) + { + $xfer += $iter493->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_names_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_indexes = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_indexes', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); + } 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_index_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_names_result { + static $_TSPEC; + + public $success = null; + public $o2 = 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' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size494 = 0; + $_etype497 = 0; + $xfer += $input->readListBegin($_etype497, $_size494); + for ($_i498 = 0; $_i498 < $_size494; ++$_i498) + { + $elem499 = null; + $xfer += $input->readString($elem499); + $this->success []= $elem499; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->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_index_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter500) + { + $xfer += $output->writeString($iter500); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_table_column_statistics_args { + static $_TSPEC; + + public $stats_obj = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stats_obj', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_table_column_statistics_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::STRUCT) { + $this->stats_obj = new \metastore\ColumnStatistics(); + $xfer += $this->stats_obj->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_update_table_column_statistics_args'); + if ($this->stats_obj !== null) { + if (!is_object($this->stats_obj)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_table_column_statistics_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_table_column_statistics_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $xfer += $this->o4->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_update_table_column_statistics_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_partition_column_statistics_args { + static $_TSPEC; + + public $stats_obj = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stats_obj', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_partition_column_statistics_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::STRUCT) { + $this->stats_obj = new \metastore\ColumnStatistics(); + $xfer += $this->stats_obj->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_update_partition_column_statistics_args'); + if ($this->stats_obj !== null) { + if (!is_object($this->stats_obj)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_partition_column_statistics_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_partition_column_statistics_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $xfer += $this->o4->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_update_partition_column_statistics_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_column_statistics_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $col_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'col_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_column_statistics_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); + } 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_column_statistics_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_column_statistics_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_column_statistics_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::STRUCT) { + $this->success = new \metastore\ColumnStatistics(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidInputException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidObjectException(); + $xfer += $this->o4->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_column_statistics_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_column_statistics_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + public $col_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'col_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_column_statistics_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); + } 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_partition_column_statistics_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_column_statistics_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_column_statistics_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::STRUCT) { + $this->success = new \metastore\ColumnStatistics(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidInputException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidObjectException(); + $xfer += $this->o4->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_partition_column_statistics_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_partition_column_statistics_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + public $col_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'col_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_partition_column_statistics_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); + } 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_delete_partition_column_statistics_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_partition_column_statistics_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_partition_column_statistics_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $xfer += $this->o4->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_delete_partition_column_statistics_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_table_column_statistics_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $col_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'col_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_table_column_statistics_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); + } 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_delete_table_column_statistics_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_table_column_statistics_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_table_column_statistics_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $xfer += $this->o4->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_delete_table_column_statistics_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $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(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_role_args { + static $_TSPEC; + + public $role = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role', + 'type' => TType::STRUCT, + 'class' => '\metastore\Role', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role'])) { + $this->role = $vals['role']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_role_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::STRUCT) { + $this->role = new \metastore\Role(); + $xfer += $this->role->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_create_role_args'); + if ($this->role !== null) { + if (!is_object($this->role)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('role', TType::STRUCT, 1); + $xfer += $this->role->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_role_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_role_args { + static $_TSPEC; + + public $role_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_role_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->role_name); + } 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_drop_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_role_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_role_names_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_role_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + 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_role_names_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_role_names_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_role_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size501 = 0; + $_etype504 = 0; + $xfer += $input->readListBegin($_etype504, $_size501); + for ($_i505 = 0; $_i505 < $_size501; ++$_i505) + { + $elem506 = null; + $xfer += $input->readString($elem506); + $this->success []= $elem506; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_role_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter507) + { + $xfer += $output->writeString($iter507); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_role_args { + static $_TSPEC; + + public $role_name = null; + public $principal_name = null; + public $principal_type = null; + public $grantor = null; + public $grantorType = null; + public $grant_option = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'grantorType', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grant_option', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['grantorType'])) { + $this->grantorType = $vals['grantorType']; + } + if (isset($vals['grant_option'])) { + $this->grant_option = $vals['grant_option']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_role_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->role_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->grant_option); + } 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_grant_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 3); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 4); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorType !== null) { + $xfer += $output->writeFieldBegin('grantorType', TType::I32, 5); + $xfer += $output->writeI32($this->grantorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grant_option !== null) { + $xfer += $output->writeFieldBegin('grant_option', TType::BOOL, 6); + $xfer += $output->writeBool($this->grant_option); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_role_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_role_args { + static $_TSPEC; + + public $role_name = null; + public $principal_name = null; + public $principal_type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_role_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->role_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } 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_revoke_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 3); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_role_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_roles_args { + static $_TSPEC; + + public $principal_name = null; + public $principal_type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_roles_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->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } 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_list_roles_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 2); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_roles_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Role', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_roles_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(); + $_size508 = 0; + $_etype511 = 0; + $xfer += $input->readListBegin($_etype511, $_size508); + for ($_i512 = 0; $_i512 < $_size508; ++$_i512) + { + $elem513 = null; + $elem513 = new \metastore\Role(); + $xfer += $elem513->read($input); + $this->success []= $elem513; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter514) + { + $xfer += $iter514->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_privilege_set_args { + static $_TSPEC; + + public $hiveObject = null; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectRef', + ), + 2 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_privilege_set_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::STRUCT) { + $this->hiveObject = new \metastore\HiveObjectRef(); + $xfer += $this->hiveObject->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size515 = 0; + $_etype518 = 0; + $xfer += $input->readListBegin($_etype518, $_size515); + for ($_i519 = 0; $_i519 < $_size515; ++$_i519) + { + $elem520 = null; + $xfer += $input->readString($elem520); + $this->group_names []= $elem520; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_privilege_set_args'); + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1); + $xfer += $this->hiveObject->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter521) + { + $xfer += $output->writeString($iter521); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_privilege_set_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_privilege_set_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::STRUCT) { + $this->success = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_privilege_set_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_privileges_args { + static $_TSPEC; + + public $principal_name = null; + public $principal_type = null; + public $hiveObject = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectRef', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_privileges_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->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->hiveObject = new \metastore\HiveObjectRef(); + $xfer += $this->hiveObject->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_list_privileges_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 2); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 3); + $xfer += $this->hiveObject->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_privileges_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectPrivilege', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_privileges_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(); + $_size522 = 0; + $_etype525 = 0; + $xfer += $input->readListBegin($_etype525, $_size522); + for ($_i526 = 0; $_i526 < $_size522; ++$_i526) + { + $elem527 = null; + $elem527 = new \metastore\HiveObjectPrivilege(); + $xfer += $elem527->read($input); + $this->success []= $elem527; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_privileges_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter528) + { + $xfer += $iter528->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_privileges_args { + static $_TSPEC; + + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeBag', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_privileges_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::STRUCT) { + $this->privileges = new \metastore\PrivilegeBag(); + $xfer += $this->privileges->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_grant_privileges_args'); + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 1); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_privileges_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_privileges_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_privileges_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_privileges_args { + static $_TSPEC; + + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeBag', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_privileges_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::STRUCT) { + $this->privileges = new \metastore\PrivilegeBag(); + $xfer += $this->privileges->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_revoke_privileges_args'); + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 1); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_privileges_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_privileges_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_ugi_args { + static $_TSPEC; + + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_ugi_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->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size529 = 0; + $_etype532 = 0; + $xfer += $input->readListBegin($_etype532, $_size529); + for ($_i533 = 0; $_i533 < $_size529; ++$_i533) + { + $elem534 = null; + $xfer += $input->readString($elem534); + $this->group_names []= $elem534; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_ugi_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter535) + { + $xfer += $output->writeString($iter535); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_ugi_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_ugi_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(); + $_size536 = 0; + $_etype539 = 0; + $xfer += $input->readListBegin($_etype539, $_size536); + for ($_i540 = 0; $_i540 < $_size536; ++$_i540) + { + $elem541 = null; + $xfer += $input->readString($elem541); + $this->success []= $elem541; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_ugi_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 $iter542) + { + $xfer += $output->writeString($iter542); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_delegation_token_args { + static $_TSPEC; + + public $token_owner = null; + public $renewer_kerberos_principal_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_owner', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'renewer_kerberos_principal_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_owner'])) { + $this->token_owner = $vals['token_owner']; + } + if (isset($vals['renewer_kerberos_principal_name'])) { + $this->renewer_kerberos_principal_name = $vals['renewer_kerberos_principal_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_delegation_token_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->token_owner); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->renewer_kerberos_principal_name); + } 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_delegation_token_args'); + if ($this->token_owner !== null) { + $xfer += $output->writeFieldBegin('token_owner', TType::STRING, 1); + $xfer += $output->writeString($this->token_owner); + $xfer += $output->writeFieldEnd(); + } + if ($this->renewer_kerberos_principal_name !== null) { + $xfer += $output->writeFieldBegin('renewer_kerberos_principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->renewer_kerberos_principal_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_delegation_token_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_delegation_token_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::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_delegation_token_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_renew_delegation_token_args { + static $_TSPEC; + + public $token_str_form = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_str_form', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_str_form'])) { + $this->token_str_form = $vals['token_str_form']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_renew_delegation_token_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->token_str_form); + } 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_renew_delegation_token_args'); + if ($this->token_str_form !== null) { + $xfer += $output->writeFieldBegin('token_str_form', TType::STRING, 1); + $xfer += $output->writeString($this->token_str_form); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_renew_delegation_token_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I64, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_renew_delegation_token_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::I64) { + $xfer += $input->readI64($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_renew_delegation_token_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I64, 0); + $xfer += $output->writeI64($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cancel_delegation_token_args { + static $_TSPEC; + + public $token_str_form = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_str_form', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_str_form'])) { + $this->token_str_form = $vals['token_str_form']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_cancel_delegation_token_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->token_str_form); + } 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_cancel_delegation_token_args'); + if ($this->token_str_form !== null) { + $xfer += $output->writeFieldBegin('token_str_form', TType::STRING, 1); + $xfer += $output->writeString($this->token_str_form); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cancel_delegation_token_result { + static $_TSPEC; + + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_cancel_delegation_token_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_cancel_delegation_token_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + + Index: metastore/src/gen/thrift/gen-php/metastore/Types.php =================================================================== --- metastore/src/gen/thrift/gen-php/metastore/Types.php (revision 0) +++ metastore/src/gen/thrift/gen-php/metastore/Types.php (revision 0) @@ -0,0 +1,5770 @@ + 'GLOBAL', + 2 => 'DATABASE', + 3 => 'TABLE', + 4 => 'PARTITION', + 5 => 'COLUMN', + ); +} + +final class PrincipalType { + const USER = 1; + const ROLE = 2; + const GROUP = 3; + static public $__names = array( + 1 => 'USER', + 2 => 'ROLE', + 3 => 'GROUP', + ); +} + +final class PartitionEventType { + const LOAD_DONE = 1; + static public $__names = array( + 1 => 'LOAD_DONE', + ); +} + +class Version { + static $_TSPEC; + + public $version = null; + public $comments = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'version', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'comments', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['version'])) { + $this->version = $vals['version']; + } + if (isset($vals['comments'])) { + $this->comments = $vals['comments']; + } + } + } + + public function getName() { + return 'Version'; + } + + 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->version); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->comments); + } 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('Version'); + if ($this->version !== null) { + $xfer += $output->writeFieldBegin('version', TType::STRING, 1); + $xfer += $output->writeString($this->version); + $xfer += $output->writeFieldEnd(); + } + if ($this->comments !== null) { + $xfer += $output->writeFieldBegin('comments', TType::STRING, 2); + $xfer += $output->writeString($this->comments); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class FieldSchema { + static $_TSPEC; + + public $name = null; + public $type = null; + public $comment = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'comment', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['comment'])) { + $this->comment = $vals['comment']; + } + } + } + + public function getName() { + return 'FieldSchema'; + } + + 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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->comment); + } 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('FieldSchema'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 2); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->comment !== null) { + $xfer += $output->writeFieldBegin('comment', TType::STRING, 3); + $xfer += $output->writeString($this->comment); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Type { + static $_TSPEC; + + public $name = null; + public $type1 = null; + public $type2 = null; + public $fields = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type1', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'type2', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'fields', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type1'])) { + $this->type1 = $vals['type1']; + } + if (isset($vals['type2'])) { + $this->type2 = $vals['type2']; + } + if (isset($vals['fields'])) { + $this->fields = $vals['fields']; + } + } + } + + public function getName() { + return 'Type'; + } + + 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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type1); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type2); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->fields = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $elem5 = new \metastore\FieldSchema(); + $xfer += $elem5->read($input); + $this->fields []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Type'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type1 !== null) { + $xfer += $output->writeFieldBegin('type1', TType::STRING, 2); + $xfer += $output->writeString($this->type1); + $xfer += $output->writeFieldEnd(); + } + if ($this->type2 !== null) { + $xfer += $output->writeFieldBegin('type2', TType::STRING, 3); + $xfer += $output->writeString($this->type2); + $xfer += $output->writeFieldEnd(); + } + if ($this->fields !== null) { + if (!is_array($this->fields)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fields', TType::LST, 4); + { + $output->writeListBegin(TType::STRUCT, count($this->fields)); + { + foreach ($this->fields as $iter6) + { + $xfer += $iter6->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HiveObjectRef { + static $_TSPEC; + + public $objectType = null; + public $dbName = null; + public $objectName = null; + public $partValues = null; + public $columnName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'objectType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'objectName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partValues', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'columnName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['objectType'])) { + $this->objectType = $vals['objectType']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['objectName'])) { + $this->objectName = $vals['objectName']; + } + if (isset($vals['partValues'])) { + $this->partValues = $vals['partValues']; + } + if (isset($vals['columnName'])) { + $this->columnName = $vals['columnName']; + } + } + } + + public function getName() { + return 'HiveObjectRef'; + } + + 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::I32) { + $xfer += $input->readI32($this->objectType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->objectName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->partValues = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->partValues []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->columnName); + } 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('HiveObjectRef'); + if ($this->objectType !== null) { + $xfer += $output->writeFieldBegin('objectType', TType::I32, 1); + $xfer += $output->writeI32($this->objectType); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->objectName !== null) { + $xfer += $output->writeFieldBegin('objectName', TType::STRING, 3); + $xfer += $output->writeString($this->objectName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partValues !== null) { + if (!is_array($this->partValues)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partValues', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->partValues)); + { + foreach ($this->partValues as $iter13) + { + $xfer += $output->writeString($iter13); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columnName !== null) { + $xfer += $output->writeFieldBegin('columnName', TType::STRING, 5); + $xfer += $output->writeString($this->columnName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrivilegeGrantInfo { + static $_TSPEC; + + public $privilege = null; + public $createTime = null; + public $grantor = null; + public $grantorType = null; + public $grantOption = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privilege', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'grantorType', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'grantOption', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privilege'])) { + $this->privilege = $vals['privilege']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['grantorType'])) { + $this->grantorType = $vals['grantorType']; + } + if (isset($vals['grantOption'])) { + $this->grantOption = $vals['grantOption']; + } + } + } + + public function getName() { + return 'PrivilegeGrantInfo'; + } + + 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->privilege); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->grantOption); + } 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('PrivilegeGrantInfo'); + if ($this->privilege !== null) { + $xfer += $output->writeFieldBegin('privilege', TType::STRING, 1); + $xfer += $output->writeString($this->privilege); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 3); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorType !== null) { + $xfer += $output->writeFieldBegin('grantorType', TType::I32, 4); + $xfer += $output->writeI32($this->grantorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantOption !== null) { + $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 5); + $xfer += $output->writeBool($this->grantOption); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HiveObjectPrivilege { + static $_TSPEC; + + public $hiveObject = null; + public $principalName = null; + public $principalType = null; + public $grantInfo = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectRef', + ), + 2 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principalType', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'grantInfo', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; + } + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['principalType'])) { + $this->principalType = $vals['principalType']; + } + if (isset($vals['grantInfo'])) { + $this->grantInfo = $vals['grantInfo']; + } + } + } + + public function getName() { + return 'HiveObjectPrivilege'; + } + + 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::STRUCT) { + $this->hiveObject = new \metastore\HiveObjectRef(); + $xfer += $this->hiveObject->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principalType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->grantInfo = new \metastore\PrivilegeGrantInfo(); + $xfer += $this->grantInfo->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('HiveObjectPrivilege'); + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1); + $xfer += $this->hiveObject->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 2); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalType !== null) { + $xfer += $output->writeFieldBegin('principalType', TType::I32, 3); + $xfer += $output->writeI32($this->principalType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantInfo !== null) { + if (!is_object($this->grantInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('grantInfo', TType::STRUCT, 4); + $xfer += $this->grantInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrivilegeBag { + static $_TSPEC; + + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privileges', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectPrivilege', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'PrivilegeBag'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->privileges = array(); + $_size14 = 0; + $_etype17 = 0; + $xfer += $input->readListBegin($_etype17, $_size14); + for ($_i18 = 0; $_i18 < $_size14; ++$_i18) + { + $elem19 = null; + $elem19 = new \metastore\HiveObjectPrivilege(); + $xfer += $elem19->read($input); + $this->privileges []= $elem19; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('PrivilegeBag'); + if ($this->privileges !== null) { + if (!is_array($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->privileges)); + { + foreach ($this->privileges as $iter20) + { + $xfer += $iter20->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrincipalPrivilegeSet { + static $_TSPEC; + + public $userPrivileges = null; + public $groupPrivileges = null; + public $rolePrivileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'userPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ), + ), + 2 => array( + 'var' => 'groupPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ), + ), + 3 => array( + 'var' => 'rolePrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['userPrivileges'])) { + $this->userPrivileges = $vals['userPrivileges']; + } + if (isset($vals['groupPrivileges'])) { + $this->groupPrivileges = $vals['groupPrivileges']; + } + if (isset($vals['rolePrivileges'])) { + $this->rolePrivileges = $vals['rolePrivileges']; + } + } + } + + public function getName() { + return 'PrincipalPrivilegeSet'; + } + + 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::MAP) { + $this->userPrivileges = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = array(); + $xfer += $input->readString($key26); + $val27 = array(); + $_size28 = 0; + $_etype31 = 0; + $xfer += $input->readListBegin($_etype31, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $elem33 = null; + $elem33 = new \metastore\PrivilegeGrantInfo(); + $xfer += $elem33->read($input); + $val27 []= $elem33; + } + $xfer += $input->readListEnd(); + $this->userPrivileges[$key26] = $val27; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->groupPrivileges = array(); + $_size34 = 0; + $_ktype35 = 0; + $_vtype36 = 0; + $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); + for ($_i38 = 0; $_i38 < $_size34; ++$_i38) + { + $key39 = ''; + $val40 = array(); + $xfer += $input->readString($key39); + $val40 = array(); + $_size41 = 0; + $_etype44 = 0; + $xfer += $input->readListBegin($_etype44, $_size41); + for ($_i45 = 0; $_i45 < $_size41; ++$_i45) + { + $elem46 = null; + $elem46 = new \metastore\PrivilegeGrantInfo(); + $xfer += $elem46->read($input); + $val40 []= $elem46; + } + $xfer += $input->readListEnd(); + $this->groupPrivileges[$key39] = $val40; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->rolePrivileges = array(); + $_size47 = 0; + $_ktype48 = 0; + $_vtype49 = 0; + $xfer += $input->readMapBegin($_ktype48, $_vtype49, $_size47); + for ($_i51 = 0; $_i51 < $_size47; ++$_i51) + { + $key52 = ''; + $val53 = array(); + $xfer += $input->readString($key52); + $val53 = array(); + $_size54 = 0; + $_etype57 = 0; + $xfer += $input->readListBegin($_etype57, $_size54); + for ($_i58 = 0; $_i58 < $_size54; ++$_i58) + { + $elem59 = null; + $elem59 = new \metastore\PrivilegeGrantInfo(); + $xfer += $elem59->read($input); + $val53 []= $elem59; + } + $xfer += $input->readListEnd(); + $this->rolePrivileges[$key52] = $val53; + } + $xfer += $input->readMapEnd(); + } 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('PrincipalPrivilegeSet'); + if ($this->userPrivileges !== null) { + if (!is_array($this->userPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('userPrivileges', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->userPrivileges)); + { + foreach ($this->userPrivileges as $kiter60 => $viter61) + { + $xfer += $output->writeString($kiter60); + { + $output->writeListBegin(TType::STRUCT, count($viter61)); + { + foreach ($viter61 as $iter62) + { + $xfer += $iter62->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->groupPrivileges !== null) { + if (!is_array($this->groupPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('groupPrivileges', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->groupPrivileges)); + { + foreach ($this->groupPrivileges as $kiter63 => $viter64) + { + $xfer += $output->writeString($kiter63); + { + $output->writeListBegin(TType::STRUCT, count($viter64)); + { + foreach ($viter64 as $iter65) + { + $xfer += $iter65->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->rolePrivileges !== null) { + if (!is_array($this->rolePrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rolePrivileges', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->rolePrivileges)); + { + foreach ($this->rolePrivileges as $kiter66 => $viter67) + { + $xfer += $output->writeString($kiter66); + { + $output->writeListBegin(TType::STRUCT, count($viter67)); + { + foreach ($viter67 as $iter68) + { + $xfer += $iter68->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Role { + static $_TSPEC; + + public $roleName = null; + public $createTime = null; + public $ownerName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'roleName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'ownerName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; + } + } + } + + public function getName() { + return 'Role'; + } + + 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->roleName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ownerName); + } 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('Role'); + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); + $xfer += $output->writeString($this->roleName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 3); + $xfer += $output->writeString($this->ownerName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Database { + static $_TSPEC; + + public $name = null; + public $description = null; + public $locationUri = null; + public $parameters = null; + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'description', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'locationUri', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['description'])) { + $this->description = $vals['description']; + } + if (isset($vals['locationUri'])) { + $this->locationUri = $vals['locationUri']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'Database'; + } + + 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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->description); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->locationUri); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size69 = 0; + $_ktype70 = 0; + $_vtype71 = 0; + $xfer += $input->readMapBegin($_ktype70, $_vtype71, $_size69); + for ($_i73 = 0; $_i73 < $_size69; ++$_i73) + { + $key74 = ''; + $val75 = ''; + $xfer += $input->readString($key74); + $xfer += $input->readString($val75); + $this->parameters[$key74] = $val75; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->privileges->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('Database'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->description !== null) { + $xfer += $output->writeFieldBegin('description', TType::STRING, 2); + $xfer += $output->writeString($this->description); + $xfer += $output->writeFieldEnd(); + } + if ($this->locationUri !== null) { + $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); + $xfer += $output->writeString($this->locationUri); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter76 => $viter77) + { + $xfer += $output->writeString($kiter76); + $xfer += $output->writeString($viter77); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 5); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SerDeInfo { + static $_TSPEC; + + public $name = null; + public $serializationLib = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'serializationLib', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['serializationLib'])) { + $this->serializationLib = $vals['serializationLib']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'SerDeInfo'; + } + + 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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->serializationLib); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size78 = 0; + $_ktype79 = 0; + $_vtype80 = 0; + $xfer += $input->readMapBegin($_ktype79, $_vtype80, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $key83 = ''; + $val84 = ''; + $xfer += $input->readString($key83); + $xfer += $input->readString($val84); + $this->parameters[$key83] = $val84; + } + $xfer += $input->readMapEnd(); + } 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('SerDeInfo'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->serializationLib !== null) { + $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); + $xfer += $output->writeString($this->serializationLib); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter85 => $viter86) + { + $xfer += $output->writeString($kiter85); + $xfer += $output->writeString($viter86); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Order { + static $_TSPEC; + + public $col = null; + public $order = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'col', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'order', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['col'])) { + $this->col = $vals['col']; + } + if (isset($vals['order'])) { + $this->order = $vals['order']; + } + } + } + + public function getName() { + return 'Order'; + } + + 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->col); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->order); + } 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('Order'); + if ($this->col !== null) { + $xfer += $output->writeFieldBegin('col', TType::STRING, 1); + $xfer += $output->writeString($this->col); + $xfer += $output->writeFieldEnd(); + } + if ($this->order !== null) { + $xfer += $output->writeFieldBegin('order', TType::I32, 2); + $xfer += $output->writeI32($this->order); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SkewedInfo { + static $_TSPEC; + + public $skewedColNames = null; + public $skewedColValues = null; + public $skewedColValueLocationMaps = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'skewedColNames', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'skewedColValues', + 'type' => TType::LST, + 'etype' => TType::LST, + 'elem' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ), + 3 => array( + 'var' => 'skewedColValueLocationMaps', + 'type' => TType::MAP, + 'ktype' => TType::LST, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['skewedColNames'])) { + $this->skewedColNames = $vals['skewedColNames']; + } + if (isset($vals['skewedColValues'])) { + $this->skewedColValues = $vals['skewedColValues']; + } + if (isset($vals['skewedColValueLocationMaps'])) { + $this->skewedColValueLocationMaps = $vals['skewedColValueLocationMaps']; + } + } + } + + public function getName() { + return 'SkewedInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->skewedColNames = array(); + $_size87 = 0; + $_etype90 = 0; + $xfer += $input->readListBegin($_etype90, $_size87); + for ($_i91 = 0; $_i91 < $_size87; ++$_i91) + { + $elem92 = null; + $xfer += $input->readString($elem92); + $this->skewedColNames []= $elem92; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->skewedColValues = array(); + $_size93 = 0; + $_etype96 = 0; + $xfer += $input->readListBegin($_etype96, $_size93); + for ($_i97 = 0; $_i97 < $_size93; ++$_i97) + { + $elem98 = null; + $elem98 = array(); + $_size99 = 0; + $_etype102 = 0; + $xfer += $input->readListBegin($_etype102, $_size99); + for ($_i103 = 0; $_i103 < $_size99; ++$_i103) + { + $elem104 = null; + $xfer += $input->readString($elem104); + $elem98 []= $elem104; + } + $xfer += $input->readListEnd(); + $this->skewedColValues []= $elem98; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->skewedColValueLocationMaps = array(); + $_size105 = 0; + $_ktype106 = 0; + $_vtype107 = 0; + $xfer += $input->readMapBegin($_ktype106, $_vtype107, $_size105); + for ($_i109 = 0; $_i109 < $_size105; ++$_i109) + { + $key110 = array(); + $val111 = ''; + $key110 = array(); + $_size112 = 0; + $_etype115 = 0; + $xfer += $input->readListBegin($_etype115, $_size112); + for ($_i116 = 0; $_i116 < $_size112; ++$_i116) + { + $elem117 = null; + $xfer += $input->readString($elem117); + $key110 []= $elem117; + } + $xfer += $input->readListEnd(); + $xfer += $input->readString($val111); + $this->skewedColValueLocationMaps[$key110] = $val111; + } + $xfer += $input->readMapEnd(); + } 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('SkewedInfo'); + if ($this->skewedColNames !== null) { + if (!is_array($this->skewedColNames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedColNames', TType::LST, 1); + { + $output->writeListBegin(TType::STRING, count($this->skewedColNames)); + { + foreach ($this->skewedColNames as $iter118) + { + $xfer += $output->writeString($iter118); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->skewedColValues !== null) { + if (!is_array($this->skewedColValues)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedColValues', TType::LST, 2); + { + $output->writeListBegin(TType::LST, count($this->skewedColValues)); + { + foreach ($this->skewedColValues as $iter119) + { + { + $output->writeListBegin(TType::STRING, count($iter119)); + { + foreach ($iter119 as $iter120) + { + $xfer += $output->writeString($iter120); + } + } + $output->writeListEnd(); + } + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->skewedColValueLocationMaps !== null) { + if (!is_array($this->skewedColValueLocationMaps)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedColValueLocationMaps', TType::MAP, 3); + { + $output->writeMapBegin(TType::LST, TType::STRING, count($this->skewedColValueLocationMaps)); + { + foreach ($this->skewedColValueLocationMaps as $kiter121 => $viter122) + { + { + $output->writeListBegin(TType::STRING, count($kiter121)); + { + foreach ($kiter121 as $iter123) + { + $xfer += $output->writeString($iter123); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeString($viter122); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class StorageDescriptor { + static $_TSPEC; + + public $cols = null; + public $location = null; + public $inputFormat = null; + public $outputFormat = null; + public $compressed = null; + public $numBuckets = null; + public $serdeInfo = null; + public $bucketCols = null; + public $sortCols = null; + public $parameters = null; + public $skewedInfo = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 2 => array( + 'var' => 'location', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'inputFormat', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'outputFormat', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'compressed', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'numBuckets', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'serdeInfo', + 'type' => TType::STRUCT, + 'class' => '\metastore\SerDeInfo', + ), + 8 => array( + 'var' => 'bucketCols', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 9 => array( + 'var' => 'sortCols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Order', + ), + ), + 10 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 11 => array( + 'var' => 'skewedInfo', + 'type' => TType::STRUCT, + 'class' => '\metastore\SkewedInfo', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cols'])) { + $this->cols = $vals['cols']; + } + if (isset($vals['location'])) { + $this->location = $vals['location']; + } + if (isset($vals['inputFormat'])) { + $this->inputFormat = $vals['inputFormat']; + } + if (isset($vals['outputFormat'])) { + $this->outputFormat = $vals['outputFormat']; + } + if (isset($vals['compressed'])) { + $this->compressed = $vals['compressed']; + } + if (isset($vals['numBuckets'])) { + $this->numBuckets = $vals['numBuckets']; + } + if (isset($vals['serdeInfo'])) { + $this->serdeInfo = $vals['serdeInfo']; + } + if (isset($vals['bucketCols'])) { + $this->bucketCols = $vals['bucketCols']; + } + if (isset($vals['sortCols'])) { + $this->sortCols = $vals['sortCols']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['skewedInfo'])) { + $this->skewedInfo = $vals['skewedInfo']; + } + } + } + + public function getName() { + return 'StorageDescriptor'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->cols = array(); + $_size124 = 0; + $_etype127 = 0; + $xfer += $input->readListBegin($_etype127, $_size124); + for ($_i128 = 0; $_i128 < $_size124; ++$_i128) + { + $elem129 = null; + $elem129 = new \metastore\FieldSchema(); + $xfer += $elem129->read($input); + $this->cols []= $elem129; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->location); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->inputFormat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->outputFormat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->compressed); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->numBuckets); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->serdeInfo = new \metastore\SerDeInfo(); + $xfer += $this->serdeInfo->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::LST) { + $this->bucketCols = array(); + $_size130 = 0; + $_etype133 = 0; + $xfer += $input->readListBegin($_etype133, $_size130); + for ($_i134 = 0; $_i134 < $_size130; ++$_i134) + { + $elem135 = null; + $xfer += $input->readString($elem135); + $this->bucketCols []= $elem135; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::LST) { + $this->sortCols = array(); + $_size136 = 0; + $_etype139 = 0; + $xfer += $input->readListBegin($_etype139, $_size136); + for ($_i140 = 0; $_i140 < $_size136; ++$_i140) + { + $elem141 = null; + $elem141 = new \metastore\Order(); + $xfer += $elem141->read($input); + $this->sortCols []= $elem141; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size142 = 0; + $_ktype143 = 0; + $_vtype144 = 0; + $xfer += $input->readMapBegin($_ktype143, $_vtype144, $_size142); + for ($_i146 = 0; $_i146 < $_size142; ++$_i146) + { + $key147 = ''; + $val148 = ''; + $xfer += $input->readString($key147); + $xfer += $input->readString($val148); + $this->parameters[$key147] = $val148; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRUCT) { + $this->skewedInfo = new \metastore\SkewedInfo(); + $xfer += $this->skewedInfo->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('StorageDescriptor'); + if ($this->cols !== null) { + if (!is_array($this->cols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cols', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->cols)); + { + foreach ($this->cols as $iter149) + { + $xfer += $iter149->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->location !== null) { + $xfer += $output->writeFieldBegin('location', TType::STRING, 2); + $xfer += $output->writeString($this->location); + $xfer += $output->writeFieldEnd(); + } + if ($this->inputFormat !== null) { + $xfer += $output->writeFieldBegin('inputFormat', TType::STRING, 3); + $xfer += $output->writeString($this->inputFormat); + $xfer += $output->writeFieldEnd(); + } + if ($this->outputFormat !== null) { + $xfer += $output->writeFieldBegin('outputFormat', TType::STRING, 4); + $xfer += $output->writeString($this->outputFormat); + $xfer += $output->writeFieldEnd(); + } + if ($this->compressed !== null) { + $xfer += $output->writeFieldBegin('compressed', TType::BOOL, 5); + $xfer += $output->writeBool($this->compressed); + $xfer += $output->writeFieldEnd(); + } + if ($this->numBuckets !== null) { + $xfer += $output->writeFieldBegin('numBuckets', TType::I32, 6); + $xfer += $output->writeI32($this->numBuckets); + $xfer += $output->writeFieldEnd(); + } + if ($this->serdeInfo !== null) { + if (!is_object($this->serdeInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('serdeInfo', TType::STRUCT, 7); + $xfer += $this->serdeInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->bucketCols !== null) { + if (!is_array($this->bucketCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('bucketCols', TType::LST, 8); + { + $output->writeListBegin(TType::STRING, count($this->bucketCols)); + { + foreach ($this->bucketCols as $iter150) + { + $xfer += $output->writeString($iter150); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->sortCols !== null) { + if (!is_array($this->sortCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sortCols', TType::LST, 9); + { + $output->writeListBegin(TType::STRUCT, count($this->sortCols)); + { + foreach ($this->sortCols as $iter151) + { + $xfer += $iter151->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 10); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter152 => $viter153) + { + $xfer += $output->writeString($kiter152); + $xfer += $output->writeString($viter153); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->skewedInfo !== null) { + if (!is_object($this->skewedInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedInfo', TType::STRUCT, 11); + $xfer += $this->skewedInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Table { + static $_TSPEC; + + public $tableName = null; + public $dbName = null; + public $owner = null; + public $createTime = null; + public $lastAccessTime = null; + public $retention = null; + public $sd = null; + public $partitionKeys = null; + public $parameters = null; + public $viewOriginalText = null; + public $viewExpandedText = null; + public $tableType = null; + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'owner', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'retention', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => '\metastore\StorageDescriptor', + ), + 8 => array( + 'var' => 'partitionKeys', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 9 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 10 => array( + 'var' => 'viewOriginalText', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'viewExpandedText', + 'type' => TType::STRING, + ), + 12 => array( + 'var' => 'tableType', + 'type' => TType::STRING, + ), + 13 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['owner'])) { + $this->owner = $vals['owner']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['retention'])) { + $this->retention = $vals['retention']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['partitionKeys'])) { + $this->partitionKeys = $vals['partitionKeys']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['viewOriginalText'])) { + $this->viewOriginalText = $vals['viewOriginalText']; + } + if (isset($vals['viewExpandedText'])) { + $this->viewExpandedText = $vals['viewExpandedText']; + } + if (isset($vals['tableType'])) { + $this->tableType = $vals['tableType']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'Table'; + } + + 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->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->owner); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->retention); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->sd = new \metastore\StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::LST) { + $this->partitionKeys = array(); + $_size154 = 0; + $_etype157 = 0; + $xfer += $input->readListBegin($_etype157, $_size154); + for ($_i158 = 0; $_i158 < $_size154; ++$_i158) + { + $elem159 = null; + $elem159 = new \metastore\FieldSchema(); + $xfer += $elem159->read($input); + $this->partitionKeys []= $elem159; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size160 = 0; + $_ktype161 = 0; + $_vtype162 = 0; + $xfer += $input->readMapBegin($_ktype161, $_vtype162, $_size160); + for ($_i164 = 0; $_i164 < $_size160; ++$_i164) + { + $key165 = ''; + $val166 = ''; + $xfer += $input->readString($key165); + $xfer += $input->readString($val166); + $this->parameters[$key165] = $val166; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->viewOriginalText); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->viewExpandedText); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 13: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->privileges->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('Table'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->owner !== null) { + $xfer += $output->writeFieldBegin('owner', TType::STRING, 3); + $xfer += $output->writeString($this->owner); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->retention !== null) { + $xfer += $output->writeFieldBegin('retention', TType::I32, 6); + $xfer += $output->writeI32($this->retention); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 7); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionKeys !== null) { + if (!is_array($this->partitionKeys)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionKeys', TType::LST, 8); + { + $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); + { + foreach ($this->partitionKeys as $iter167) + { + $xfer += $iter167->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter168 => $viter169) + { + $xfer += $output->writeString($kiter168); + $xfer += $output->writeString($viter169); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->viewOriginalText !== null) { + $xfer += $output->writeFieldBegin('viewOriginalText', TType::STRING, 10); + $xfer += $output->writeString($this->viewOriginalText); + $xfer += $output->writeFieldEnd(); + } + if ($this->viewExpandedText !== null) { + $xfer += $output->writeFieldBegin('viewExpandedText', TType::STRING, 11); + $xfer += $output->writeString($this->viewExpandedText); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableType !== null) { + $xfer += $output->writeFieldBegin('tableType', TType::STRING, 12); + $xfer += $output->writeString($this->tableType); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 13); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Partition { + static $_TSPEC; + + public $values = null; + public $dbName = null; + public $tableName = null; + public $createTime = null; + public $lastAccessTime = null; + public $sd = null; + public $parameters = null; + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'values', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => '\metastore\StorageDescriptor', + ), + 7 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 8 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['values'])) { + $this->values = $vals['values']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'Partition'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->values = array(); + $_size170 = 0; + $_etype173 = 0; + $xfer += $input->readListBegin($_etype173, $_size170); + for ($_i174 = 0; $_i174 < $_size170; ++$_i174) + { + $elem175 = null; + $xfer += $input->readString($elem175); + $this->values []= $elem175; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->sd = new \metastore\StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size176 = 0; + $_ktype177 = 0; + $_vtype178 = 0; + $xfer += $input->readMapBegin($_ktype177, $_vtype178, $_size176); + for ($_i180 = 0; $_i180 < $_size176; ++$_i180) + { + $key181 = ''; + $val182 = ''; + $xfer += $input->readString($key181); + $xfer += $input->readString($val182); + $this->parameters[$key181] = $val182; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->privileges->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('Partition'); + if ($this->values !== null) { + if (!is_array($this->values)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('values', TType::LST, 1); + { + $output->writeListBegin(TType::STRING, count($this->values)); + { + foreach ($this->values as $iter183) + { + $xfer += $output->writeString($iter183); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 6); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 7); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter184 => $viter185) + { + $xfer += $output->writeString($kiter184); + $xfer += $output->writeString($viter185); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 8); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Index { + static $_TSPEC; + + public $indexName = null; + public $indexHandlerClass = null; + public $dbName = null; + public $origTableName = null; + public $createTime = null; + public $lastAccessTime = null; + public $indexTableName = null; + public $sd = null; + public $parameters = null; + public $deferredRebuild = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'indexName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'indexHandlerClass', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'origTableName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'indexTableName', + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => '\metastore\StorageDescriptor', + ), + 9 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 10 => array( + 'var' => 'deferredRebuild', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['indexName'])) { + $this->indexName = $vals['indexName']; + } + if (isset($vals['indexHandlerClass'])) { + $this->indexHandlerClass = $vals['indexHandlerClass']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['origTableName'])) { + $this->origTableName = $vals['origTableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['indexTableName'])) { + $this->indexTableName = $vals['indexTableName']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['deferredRebuild'])) { + $this->deferredRebuild = $vals['deferredRebuild']; + } + } + } + + public function getName() { + return 'Index'; + } + + 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->indexName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexHandlerClass); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->origTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->sd = new \metastore\StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size186 = 0; + $_ktype187 = 0; + $_vtype188 = 0; + $xfer += $input->readMapBegin($_ktype187, $_vtype188, $_size186); + for ($_i190 = 0; $_i190 < $_size186; ++$_i190) + { + $key191 = ''; + $val192 = ''; + $xfer += $input->readString($key191); + $xfer += $input->readString($val192); + $this->parameters[$key191] = $val192; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deferredRebuild); + } 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('Index'); + if ($this->indexName !== null) { + $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); + $xfer += $output->writeString($this->indexName); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexHandlerClass !== null) { + $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); + $xfer += $output->writeString($this->indexHandlerClass); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->origTableName !== null) { + $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); + $xfer += $output->writeString($this->origTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexTableName !== null) { + $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); + $xfer += $output->writeString($this->indexTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter193 => $viter194) + { + $xfer += $output->writeString($kiter193); + $xfer += $output->writeString($viter194); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deferredRebuild !== null) { + $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); + $xfer += $output->writeBool($this->deferredRebuild); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class BooleanColumnStatsData { + static $_TSPEC; + + public $numTrues = null; + public $numFalses = null; + public $numNulls = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'numTrues', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'numFalses', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['numTrues'])) { + $this->numTrues = $vals['numTrues']; + } + if (isset($vals['numFalses'])) { + $this->numFalses = $vals['numFalses']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + } + } + + public function getName() { + return 'BooleanColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->numTrues); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numFalses); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } 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('BooleanColumnStatsData'); + if ($this->numTrues !== null) { + $xfer += $output->writeFieldBegin('numTrues', TType::I64, 1); + $xfer += $output->writeI64($this->numTrues); + $xfer += $output->writeFieldEnd(); + } + if ($this->numFalses !== null) { + $xfer += $output->writeFieldBegin('numFalses', TType::I64, 2); + $xfer += $output->writeI64($this->numFalses); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DoubleColumnStatsData { + static $_TSPEC; + + public $lowValue = null; + public $highValue = null; + public $numNulls = null; + public $numDVs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::DOUBLE, + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + } + } + + public function getName() { + return 'DoubleColumnStatsData'; + } + + 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::DOUBLE) { + $xfer += $input->readDouble($this->lowValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->highValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } 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('DoubleColumnStatsData'); + if ($this->lowValue !== null) { + $xfer += $output->writeFieldBegin('lowValue', TType::DOUBLE, 1); + $xfer += $output->writeDouble($this->lowValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + $xfer += $output->writeFieldBegin('highValue', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->highValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class LongColumnStatsData { + static $_TSPEC; + + public $lowValue = null; + public $highValue = null; + public $numNulls = null; + public $numDVs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + } + } + + public function getName() { + return 'LongColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->lowValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->highValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } 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('LongColumnStatsData'); + if ($this->lowValue !== null) { + $xfer += $output->writeFieldBegin('lowValue', TType::I64, 1); + $xfer += $output->writeI64($this->lowValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + $xfer += $output->writeFieldBegin('highValue', TType::I64, 2); + $xfer += $output->writeI64($this->highValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class StringColumnStatsData { + static $_TSPEC; + + public $maxColLen = null; + public $avgColLen = null; + public $numNulls = null; + public $numDVs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'maxColLen', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'avgColLen', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['maxColLen'])) { + $this->maxColLen = $vals['maxColLen']; + } + if (isset($vals['avgColLen'])) { + $this->avgColLen = $vals['avgColLen']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + } + } + + public function getName() { + return 'StringColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->maxColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->avgColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } 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('StringColumnStatsData'); + if ($this->maxColLen !== null) { + $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); + $xfer += $output->writeI64($this->maxColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->avgColLen !== null) { + $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->avgColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class BinaryColumnStatsData { + static $_TSPEC; + + public $maxColLen = null; + public $avgColLen = null; + public $numNulls = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'maxColLen', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'avgColLen', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['maxColLen'])) { + $this->maxColLen = $vals['maxColLen']; + } + if (isset($vals['avgColLen'])) { + $this->avgColLen = $vals['avgColLen']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + } + } + + public function getName() { + return 'BinaryColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->maxColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->avgColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } 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('BinaryColumnStatsData'); + if ($this->maxColLen !== null) { + $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); + $xfer += $output->writeI64($this->maxColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->avgColLen !== null) { + $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->avgColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsData { + static $_TSPEC; + + public $booleanStats = null; + public $longStats = null; + public $doubleStats = null; + public $stringStats = null; + public $binaryStats = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'booleanStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\BooleanColumnStatsData', + ), + 2 => array( + 'var' => 'longStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\LongColumnStatsData', + ), + 3 => array( + 'var' => 'doubleStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\DoubleColumnStatsData', + ), + 4 => array( + 'var' => 'stringStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\StringColumnStatsData', + ), + 5 => array( + 'var' => 'binaryStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\BinaryColumnStatsData', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['booleanStats'])) { + $this->booleanStats = $vals['booleanStats']; + } + if (isset($vals['longStats'])) { + $this->longStats = $vals['longStats']; + } + if (isset($vals['doubleStats'])) { + $this->doubleStats = $vals['doubleStats']; + } + if (isset($vals['stringStats'])) { + $this->stringStats = $vals['stringStats']; + } + if (isset($vals['binaryStats'])) { + $this->binaryStats = $vals['binaryStats']; + } + } + } + + public function getName() { + return 'ColumnStatisticsData'; + } + + 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::STRUCT) { + $this->booleanStats = new \metastore\BooleanColumnStatsData(); + $xfer += $this->booleanStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->longStats = new \metastore\LongColumnStatsData(); + $xfer += $this->longStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->doubleStats = new \metastore\DoubleColumnStatsData(); + $xfer += $this->doubleStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->stringStats = new \metastore\StringColumnStatsData(); + $xfer += $this->stringStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->binaryStats = new \metastore\BinaryColumnStatsData(); + $xfer += $this->binaryStats->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('ColumnStatisticsData'); + if ($this->booleanStats !== null) { + if (!is_object($this->booleanStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('booleanStats', TType::STRUCT, 1); + $xfer += $this->booleanStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->longStats !== null) { + if (!is_object($this->longStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('longStats', TType::STRUCT, 2); + $xfer += $this->longStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->doubleStats !== null) { + if (!is_object($this->doubleStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('doubleStats', TType::STRUCT, 3); + $xfer += $this->doubleStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->stringStats !== null) { + if (!is_object($this->stringStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stringStats', TType::STRUCT, 4); + $xfer += $this->stringStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->binaryStats !== null) { + if (!is_object($this->binaryStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('binaryStats', TType::STRUCT, 5); + $xfer += $this->binaryStats->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsObj { + static $_TSPEC; + + public $colName = null; + public $colType = null; + public $statsData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'colName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'colType', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'statsData', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsData', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['colName'])) { + $this->colName = $vals['colName']; + } + if (isset($vals['colType'])) { + $this->colType = $vals['colType']; + } + if (isset($vals['statsData'])) { + $this->statsData = $vals['statsData']; + } + } + } + + public function getName() { + return 'ColumnStatisticsObj'; + } + + 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->colName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->colType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->statsData = new \metastore\ColumnStatisticsData(); + $xfer += $this->statsData->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('ColumnStatisticsObj'); + if ($this->colName !== null) { + $xfer += $output->writeFieldBegin('colName', TType::STRING, 1); + $xfer += $output->writeString($this->colName); + $xfer += $output->writeFieldEnd(); + } + if ($this->colType !== null) { + $xfer += $output->writeFieldBegin('colType', TType::STRING, 2); + $xfer += $output->writeString($this->colType); + $xfer += $output->writeFieldEnd(); + } + if ($this->statsData !== null) { + if (!is_object($this->statsData)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsData', TType::STRUCT, 3); + $xfer += $this->statsData->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsDesc { + static $_TSPEC; + + public $isTblLevel = null; + public $dbName = null; + public $tableName = null; + public $partName = null; + public $lastAnalyzed = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'isTblLevel', + 'type' => TType::BOOL, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'lastAnalyzed', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['isTblLevel'])) { + $this->isTblLevel = $vals['isTblLevel']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['partName'])) { + $this->partName = $vals['partName']; + } + if (isset($vals['lastAnalyzed'])) { + $this->lastAnalyzed = $vals['lastAnalyzed']; + } + } + } + + public function getName() { + return 'ColumnStatisticsDesc'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->isTblLevel); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lastAnalyzed); + } 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('ColumnStatisticsDesc'); + if ($this->isTblLevel !== null) { + $xfer += $output->writeFieldBegin('isTblLevel', TType::BOOL, 1); + $xfer += $output->writeBool($this->isTblLevel); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partName !== null) { + $xfer += $output->writeFieldBegin('partName', TType::STRING, 4); + $xfer += $output->writeString($this->partName); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAnalyzed !== null) { + $xfer += $output->writeFieldBegin('lastAnalyzed', TType::I64, 5); + $xfer += $output->writeI64($this->lastAnalyzed); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatistics { + static $_TSPEC; + + public $statsDesc = null; + public $statsObj = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'statsDesc', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsDesc', + ), + 2 => array( + 'var' => 'statsObj', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsObj', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['statsDesc'])) { + $this->statsDesc = $vals['statsDesc']; + } + if (isset($vals['statsObj'])) { + $this->statsObj = $vals['statsObj']; + } + } + } + + public function getName() { + return 'ColumnStatistics'; + } + + 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::STRUCT) { + $this->statsDesc = new \metastore\ColumnStatisticsDesc(); + $xfer += $this->statsDesc->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->statsObj = array(); + $_size195 = 0; + $_etype198 = 0; + $xfer += $input->readListBegin($_etype198, $_size195); + for ($_i199 = 0; $_i199 < $_size195; ++$_i199) + { + $elem200 = null; + $elem200 = new \metastore\ColumnStatisticsObj(); + $xfer += $elem200->read($input); + $this->statsObj []= $elem200; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ColumnStatistics'); + if ($this->statsDesc !== null) { + if (!is_object($this->statsDesc)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsDesc', TType::STRUCT, 1); + $xfer += $this->statsDesc->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->statsObj !== null) { + if (!is_array($this->statsObj)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsObj', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->statsObj)); + { + foreach ($this->statsObj as $iter201) + { + $xfer += $iter201->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Schema { + static $_TSPEC; + + public $fieldSchemas = null; + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fieldSchemas', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 2 => array( + 'var' => 'properties', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fieldSchemas'])) { + $this->fieldSchemas = $vals['fieldSchemas']; + } + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'Schema'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->fieldSchemas = array(); + $_size202 = 0; + $_etype205 = 0; + $xfer += $input->readListBegin($_etype205, $_size202); + for ($_i206 = 0; $_i206 < $_size202; ++$_i206) + { + $elem207 = null; + $elem207 = new \metastore\FieldSchema(); + $xfer += $elem207->read($input); + $this->fieldSchemas []= $elem207; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size208 = 0; + $_ktype209 = 0; + $_vtype210 = 0; + $xfer += $input->readMapBegin($_ktype209, $_vtype210, $_size208); + for ($_i212 = 0; $_i212 < $_size208; ++$_i212) + { + $key213 = ''; + $val214 = ''; + $xfer += $input->readString($key213); + $xfer += $input->readString($val214); + $this->properties[$key213] = $val214; + } + $xfer += $input->readMapEnd(); + } 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('Schema'); + if ($this->fieldSchemas !== null) { + if (!is_array($this->fieldSchemas)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); + { + foreach ($this->fieldSchemas as $iter215) + { + $xfer += $iter215->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->properties !== null) { + if (!is_array($this->properties)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter216 => $viter217) + { + $xfer += $output->writeString($kiter216); + $xfer += $output->writeString($viter217); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class EnvironmentContext { + static $_TSPEC; + + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'properties', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'EnvironmentContext'; + } + + 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::MAP) { + $this->properties = array(); + $_size218 = 0; + $_ktype219 = 0; + $_vtype220 = 0; + $xfer += $input->readMapBegin($_ktype219, $_vtype220, $_size218); + for ($_i222 = 0; $_i222 < $_size218; ++$_i222) + { + $key223 = ''; + $val224 = ''; + $xfer += $input->readString($key223); + $xfer += $input->readString($val224); + $this->properties[$key223] = $val224; + } + $xfer += $input->readMapEnd(); + } 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('EnvironmentContext'); + if ($this->properties !== null) { + if (!is_array($this->properties)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('properties', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter225 => $viter226) + { + $xfer += $output->writeString($kiter225); + $xfer += $output->writeString($viter226); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class MetaException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'MetaException'; + } + + 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->message); + } 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('MetaException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UnknownTableException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'UnknownTableException'; + } + + 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->message); + } 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('UnknownTableException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UnknownDBException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'UnknownDBException'; + } + + 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->message); + } 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('UnknownDBException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AlreadyExistsException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'AlreadyExistsException'; + } + + 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->message); + } 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('AlreadyExistsException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InvalidPartitionException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidPartitionException'; + } + + 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->message); + } 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('InvalidPartitionException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UnknownPartitionException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'UnknownPartitionException'; + } + + 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->message); + } 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('UnknownPartitionException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InvalidObjectException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidObjectException'; + } + + 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->message); + } 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('InvalidObjectException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NoSuchObjectException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'NoSuchObjectException'; + } + + 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->message); + } 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('NoSuchObjectException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class IndexAlreadyExistsException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'IndexAlreadyExistsException'; + } + + 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->message); + } 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('IndexAlreadyExistsException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InvalidOperationException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidOperationException'; + } + + 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->message); + } 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('InvalidOperationException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ConfigValSecurityException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'ConfigValSecurityException'; + } + + 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->message); + } 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('ConfigValSecurityException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InvalidInputException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidInputException'; + } + + 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->message); + } 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('InvalidInputException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +$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"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_COLUMNS'] = "columns"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_COLUMN_TYPES'] = "columns.types"; + +$GLOBALS['hive_metastore_CONSTANTS']['BUCKET_FIELD_NAME'] = "bucket_field_name"; + +$GLOBALS['hive_metastore_CONSTANTS']['BUCKET_COUNT'] = "bucket_count"; + +$GLOBALS['hive_metastore_CONSTANTS']['FIELD_TO_DIMENSION'] = "field_to_dimension"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_NAME'] = "name"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_DB'] = "db"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_LOCATION'] = "location"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_SERDE'] = "serde"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_PARTITION_COLUMNS'] = "partition_columns"; + +$GLOBALS['hive_metastore_CONSTANTS']['FILE_INPUT_FORMAT'] = "file.inputformat"; + +$GLOBALS['hive_metastore_CONSTANTS']['FILE_OUTPUT_FORMAT'] = "file.outputformat"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_STORAGE'] = "storage_handler"; + + Index: ivy/libraries.properties =================================================================== --- ivy/libraries.properties (revision 1406838) +++ ivy/libraries.properties (working copy) @@ -54,8 +54,8 @@ sqlline.branch=1.0.2 json.version=20090211 junit.version=4.10 -libfb303.version=0.7.0 -libthrift.version=0.7.0 +libfb303.version=0.9.0 +libthrift.version=0.9.0 log4j.version=1.2.16 maven-ant-tasks.version=2.1.0 mockito-all.version=1.8.2 Index: contrib/src/test/org/apache/hadoop/hive/contrib/serde2/TestRegexSerDe.java =================================================================== --- contrib/src/test/org/apache/hadoop/hive/contrib/serde2/TestRegexSerDe.java (revision 1406838) +++ contrib/src/test/org/apache/hadoop/hive/contrib/serde2/TestRegexSerDe.java (working copy) @@ -22,7 +22,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDe; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils; @@ -38,8 +38,8 @@ private SerDe createSerDe(String fieldNames, String fieldTypes, String inputRegex, String outputFormatString) throws Throwable { Properties schema = new Properties(); - schema.setProperty(Constants.LIST_COLUMNS, fieldNames); - schema.setProperty(Constants.LIST_COLUMN_TYPES, fieldTypes); + schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames); + schema.setProperty(serdeConstants.LIST_COLUMN_TYPES, fieldTypes); schema.setProperty("input.regex", inputRegex); schema.setProperty("output.format.string", outputFormatString); Index: service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java =================================================================== --- service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java (revision 1406838) +++ service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java (working copy) @@ -29,7 +29,7 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Schema; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe; import org.apache.hadoop.io.BytesWritable; import org.apache.thrift.protocol.TBinaryProtocol; @@ -302,11 +302,11 @@ // Instantiate DynamicSerDe DynamicSerDe ds = new DynamicSerDe(); Properties dsp = new Properties(); - dsp.setProperty(Constants.SERIALIZATION_FORMAT, + dsp.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class .getName()); dsp.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "result"); String serDDL = new String("struct result { "); List schema = client.getThriftSchema().getFieldSchemas(); @@ -320,9 +320,9 @@ } serDDL = serDDL.concat("}"); - dsp.setProperty(Constants.SERIALIZATION_DDL, serDDL); - dsp.setProperty(Constants.SERIALIZATION_LIB, ds.getClass().toString()); - dsp.setProperty(Constants.FIELD_DELIM, "9"); + dsp.setProperty(serdeConstants.SERIALIZATION_DDL, serDDL); + dsp.setProperty(serdeConstants.SERIALIZATION_LIB, ds.getClass().toString()); + dsp.setProperty(serdeConstants.FIELD_DELIM, "9"); ds.initialize(new Configuration(), dsp); String row = client.fetchOne(); @@ -349,7 +349,7 @@ } serDDL = serDDL.concat("}"); - dsp.setProperty(Constants.SERIALIZATION_DDL, serDDL); + dsp.setProperty(serdeConstants.SERIALIZATION_DDL, serDDL); // Need a new DynamicSerDe instance - re-initialization is not supported. ds = new DynamicSerDe(); ds.initialize(new Configuration(), dsp); Index: service/src/gen/thrift/gen-py/__init__.py =================================================================== Index: service/src/gen/thrift/gen-py/hive_service/ttypes.py =================================================================== --- service/src/gen/thrift/gen-py/hive_service/ttypes.py (revision 1406838) +++ service/src/gen/thrift/gen-py/hive_service/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import fb303.ttypes import hive_metastore.ttypes import queryplan.ttypes @@ -153,7 +155,7 @@ def __ne__(self, other): return not (self == other) -class HiveServerException(Exception): +class HiveServerException(TException): """ Attributes: - message Index: service/src/gen/thrift/gen-py/hive_service/ThriftHive.py =================================================================== --- service/src/gen/thrift/gen-py/hive_service/ThriftHive.py (revision 1406838) +++ service/src/gen/thrift/gen-py/hive_service/ThriftHive.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import hive_metastore.ThriftHiveMetastore from ttypes import * from thrift.Thrift import TProcessor @@ -340,7 +342,7 @@ result = execute_result() try: self._handler.execute(args.query) - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("execute", TMessageType.REPLY, seqid) result.write(oprot) @@ -354,7 +356,7 @@ result = fetchOne_result() try: result.success = self._handler.fetchOne() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("fetchOne", TMessageType.REPLY, seqid) result.write(oprot) @@ -368,7 +370,7 @@ result = fetchN_result() try: result.success = self._handler.fetchN(args.numRows) - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("fetchN", TMessageType.REPLY, seqid) result.write(oprot) @@ -382,7 +384,7 @@ result = fetchAll_result() try: result.success = self._handler.fetchAll() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("fetchAll", TMessageType.REPLY, seqid) result.write(oprot) @@ -396,7 +398,7 @@ result = getSchema_result() try: result.success = self._handler.getSchema() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getSchema", TMessageType.REPLY, seqid) result.write(oprot) @@ -410,7 +412,7 @@ result = getThriftSchema_result() try: result.success = self._handler.getThriftSchema() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getThriftSchema", TMessageType.REPLY, seqid) result.write(oprot) @@ -424,7 +426,7 @@ result = getClusterStatus_result() try: result.success = self._handler.getClusterStatus() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getClusterStatus", TMessageType.REPLY, seqid) result.write(oprot) @@ -438,7 +440,7 @@ result = getQueryPlan_result() try: result.success = self._handler.getQueryPlan() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getQueryPlan", TMessageType.REPLY, seqid) result.write(oprot) Index: service/src/gen/thrift/gen-py/hive_service/constants.py =================================================================== --- service/src/gen/thrift/gen-py/hive_service/constants.py (revision 1406838) +++ service/src/gen/thrift/gen-py/hive_service/constants.py (working copy) @@ -1,9 +1,11 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * Index: service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote =================================================================== --- service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote (revision 1406838) +++ service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote (working copy) @@ -1,9 +1,11 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# import sys import pprint @@ -18,7 +20,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print '' - print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]' + print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' print ' void execute(string query)' @@ -44,7 +46,8 @@ if sys.argv[argi] == '-h': parts = sys.argv[argi+1].split(':') host = parts[0] - port = int(parts[1]) + if len(parts) > 1: + port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': Index: service/src/gen/thrift/gen-cpp/hive_service_types.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_types.cpp (revision 1406838) +++ service/src/gen/thrift/gen-cpp/hive_service_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_service_types.h" +#include + namespace Apache { namespace Hadoop { namespace Hive { int _kJobTrackerStateValues[] = { @@ -105,29 +108,47 @@ uint32_t HiveClusterStatus::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveClusterStatus"); + xfer += oprot->writeFieldBegin("taskTrackers", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->taskTrackers); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("mapTasks", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->mapTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("reduceTasks", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32(this->reduceTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("maxMapTasks", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->maxMapTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("maxReduceTasks", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->maxReduceTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32((int32_t)this->state); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveClusterStatus &a, HiveClusterStatus &b) { + using ::std::swap; + swap(a.taskTrackers, b.taskTrackers); + swap(a.mapTasks, b.mapTasks); + swap(a.reduceTasks, b.reduceTasks); + swap(a.maxMapTasks, b.maxMapTasks); + swap(a.maxReduceTasks, b.maxReduceTasks); + swap(a.state, b.state); + swap(a.__isset, b.__isset); +} + const char* HiveServerException::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; const uint8_t HiveServerException::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; @@ -190,18 +211,30 @@ uint32_t HiveServerException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveServerException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("errorCode", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->errorCode); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("SQLState", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->SQLState); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveServerException &a, HiveServerException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.errorCode, b.errorCode); + swap(a.SQLState, b.SQLState); + swap(a.__isset, b.__isset); +} + }}} // namespace Index: service/src/gen/thrift/gen-cpp/ThriftHive.h =================================================================== --- service/src/gen/thrift/gen-cpp/ThriftHive.h (revision 1406838) +++ service/src/gen/thrift/gen-cpp/ThriftHive.h (working copy) @@ -1,33 +1,58 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef ThriftHive_H #define ThriftHive_H -#include +#include #include "hive_service_types.h" #include "ThriftHiveMetastore.h" namespace Apache { namespace Hadoop { namespace Hive { -class ThriftHiveIf : virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreIf { +class ThriftHiveIf : virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreIf { public: virtual ~ThriftHiveIf() {} virtual void execute(const std::string& query) = 0; virtual void fetchOne(std::string& _return) = 0; virtual void fetchN(std::vector & _return, const int32_t numRows) = 0; virtual void fetchAll(std::vector & _return) = 0; - virtual void getSchema(Apache::Hadoop::Hive::Schema& _return) = 0; - virtual void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) = 0; + virtual void getSchema( ::Apache::Hadoop::Hive::Schema& _return) = 0; + virtual void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) = 0; virtual void getClusterStatus(HiveClusterStatus& _return) = 0; - virtual void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) = 0; + virtual void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) = 0; virtual void clean() = 0; }; -class ThriftHiveNull : virtual public ThriftHiveIf , virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreNull { +class ThriftHiveIfFactory : virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreIfFactory { public: + typedef ThriftHiveIf Handler; + + virtual ~ThriftHiveIfFactory() {} + + virtual ThriftHiveIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) = 0; +}; + +class ThriftHiveIfSingletonFactory : virtual public ThriftHiveIfFactory { + public: + ThriftHiveIfSingletonFactory(const boost::shared_ptr& iface) : iface_(iface) {} + virtual ~ThriftHiveIfSingletonFactory() {} + + virtual ThriftHiveIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) {} + + protected: + boost::shared_ptr iface_; +}; + +class ThriftHiveNull : virtual public ThriftHiveIf , virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreNull { + public: virtual ~ThriftHiveNull() {} void execute(const std::string& /* query */) { return; @@ -41,16 +66,16 @@ void fetchAll(std::vector & /* _return */) { return; } - void getSchema(Apache::Hadoop::Hive::Schema& /* _return */) { + void getSchema( ::Apache::Hadoop::Hive::Schema& /* _return */) { return; } - void getThriftSchema(Apache::Hadoop::Hive::Schema& /* _return */) { + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& /* _return */) { return; } void getClusterStatus(HiveClusterStatus& /* _return */) { return; } - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& /* _return */) { + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& /* _return */) { return; } void clean() { @@ -66,7 +91,7 @@ class ThriftHive_execute_args { public: - ThriftHive_execute_args() : query("") { + ThriftHive_execute_args() : query() { } virtual ~ThriftHive_execute_args() throw() {} @@ -212,7 +237,7 @@ class ThriftHive_fetchOne_result { public: - ThriftHive_fetchOne_result() : success("") { + ThriftHive_fetchOne_result() : success() { } virtual ~ThriftHive_fetchOne_result() throw() {} @@ -543,12 +568,12 @@ virtual ~ThriftHive_getSchema_result() throw() {} - Apache::Hadoop::Hive::Schema success; + ::Apache::Hadoop::Hive::Schema success; HiveServerException ex; _ThriftHive_getSchema_result__isset __isset; - void __set_success(const Apache::Hadoop::Hive::Schema& val) { + void __set_success(const ::Apache::Hadoop::Hive::Schema& val) { success = val; } @@ -587,7 +612,7 @@ virtual ~ThriftHive_getSchema_presult() throw() {} - Apache::Hadoop::Hive::Schema* success; + ::Apache::Hadoop::Hive::Schema* success; HiveServerException ex; _ThriftHive_getSchema_presult__isset __isset; @@ -647,12 +672,12 @@ virtual ~ThriftHive_getThriftSchema_result() throw() {} - Apache::Hadoop::Hive::Schema success; + ::Apache::Hadoop::Hive::Schema success; HiveServerException ex; _ThriftHive_getThriftSchema_result__isset __isset; - void __set_success(const Apache::Hadoop::Hive::Schema& val) { + void __set_success(const ::Apache::Hadoop::Hive::Schema& val) { success = val; } @@ -691,7 +716,7 @@ virtual ~ThriftHive_getThriftSchema_presult() throw() {} - Apache::Hadoop::Hive::Schema* success; + ::Apache::Hadoop::Hive::Schema* success; HiveServerException ex; _ThriftHive_getThriftSchema_presult__isset __isset; @@ -855,12 +880,12 @@ virtual ~ThriftHive_getQueryPlan_result() throw() {} - Apache::Hadoop::Hive::QueryPlan success; + ::Apache::Hadoop::Hive::QueryPlan success; HiveServerException ex; _ThriftHive_getQueryPlan_result__isset __isset; - void __set_success(const Apache::Hadoop::Hive::QueryPlan& val) { + void __set_success(const ::Apache::Hadoop::Hive::QueryPlan& val) { success = val; } @@ -899,7 +924,7 @@ virtual ~ThriftHive_getQueryPlan_presult() throw() {} - Apache::Hadoop::Hive::QueryPlan* success; + ::Apache::Hadoop::Hive::QueryPlan* success; HiveServerException ex; _ThriftHive_getQueryPlan_presult__isset __isset; @@ -982,12 +1007,12 @@ }; -class ThriftHiveClient : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreClient { +class ThriftHiveClient : virtual public ThriftHiveIf, public ::Apache::Hadoop::Hive::ThriftHiveMetastoreClient { public: ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : - Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {} + ::Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {} ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : - Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {} + ::Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {} boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } @@ -1006,29 +1031,31 @@ void fetchAll(std::vector & _return); void send_fetchAll(); void recv_fetchAll(std::vector & _return); - void getSchema(Apache::Hadoop::Hive::Schema& _return); + void getSchema( ::Apache::Hadoop::Hive::Schema& _return); void send_getSchema(); - void recv_getSchema(Apache::Hadoop::Hive::Schema& _return); - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return); + void recv_getSchema( ::Apache::Hadoop::Hive::Schema& _return); + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return); void send_getThriftSchema(); - void recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _return); + void recv_getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return); void getClusterStatus(HiveClusterStatus& _return); void send_getClusterStatus(); void recv_getClusterStatus(HiveClusterStatus& _return); - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return); void send_getQueryPlan(); - void recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); + void recv_getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return); void clean(); void send_clean(); void recv_clean(); }; -class ThriftHiveProcessor : virtual public ::apache::thrift::TProcessor, public Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor { +class ThriftHiveProcessor : public ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor { protected: boost::shared_ptr iface_; - virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext); + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); private: - std::map processMap_; + typedef void (ThriftHiveProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; void process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -1040,7 +1067,7 @@ void process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); public: ThriftHiveProcessor(boost::shared_ptr iface) : - Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface), + ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface), iface_(iface) { processMap_["execute"] = &ThriftHiveProcessor::process_execute; processMap_["fetchOne"] = &ThriftHiveProcessor::process_fetchOne; @@ -1053,16 +1080,26 @@ processMap_["clean"] = &ThriftHiveProcessor::process_clean; } - virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext); virtual ~ThriftHiveProcessor() {} }; -class ThriftHiveMultiface : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface { +class ThriftHiveProcessorFactory : public ::apache::thrift::TProcessorFactory { public: + ThriftHiveProcessorFactory(const ::boost::shared_ptr< ThriftHiveIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + ::boost::shared_ptr< ThriftHiveIfFactory > handlerFactory_; +}; + +class ThriftHiveMultiface : virtual public ThriftHiveIf, public ::Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface { + public: ThriftHiveMultiface(std::vector >& ifaces) : ifaces_(ifaces) { std::vector >::iterator iter; for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { - Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(*iter); + ::Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(*iter); } } virtual ~ThriftHiveMultiface() {} @@ -1070,106 +1107,96 @@ std::vector > ifaces_; ThriftHiveMultiface() {} void add(boost::shared_ptr iface) { - Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(iface); + ::Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(iface); ifaces_.push_back(iface); } public: void execute(const std::string& query) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->execute(query); } + ifaces_[i]->execute(query); } void fetchOne(std::string& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchOne(_return); - return; - } else { - ifaces_[i]->fetchOne(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fetchOne(_return); } + ifaces_[i]->fetchOne(_return); + return; } void fetchN(std::vector & _return, const int32_t numRows) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchN(_return, numRows); - return; - } else { - ifaces_[i]->fetchN(_return, numRows); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fetchN(_return, numRows); } + ifaces_[i]->fetchN(_return, numRows); + return; } void fetchAll(std::vector & _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchAll(_return); - return; - } else { - ifaces_[i]->fetchAll(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fetchAll(_return); } + ifaces_[i]->fetchAll(_return); + return; } - void getSchema(Apache::Hadoop::Hive::Schema& _return) { + void getSchema( ::Apache::Hadoop::Hive::Schema& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getSchema(_return); - return; - } else { - ifaces_[i]->getSchema(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getSchema(_return); } + ifaces_[i]->getSchema(_return); + return; } - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) { + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getThriftSchema(_return); - return; - } else { - ifaces_[i]->getThriftSchema(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getThriftSchema(_return); } + ifaces_[i]->getThriftSchema(_return); + return; } void getClusterStatus(HiveClusterStatus& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getClusterStatus(_return); - return; - } else { - ifaces_[i]->getClusterStatus(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getClusterStatus(_return); } + ifaces_[i]->getClusterStatus(_return); + return; } - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getQueryPlan(_return); - return; - } else { - ifaces_[i]->getQueryPlan(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getQueryPlan(_return); } + ifaces_[i]->getQueryPlan(_return); + return; } void clean() { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->clean(); } + ifaces_[i]->clean(); } }; Index: service/src/gen/thrift/gen-cpp/hive_service_types.h =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_types.h (revision 1406838) +++ service/src/gen/thrift/gen-cpp/hive_service_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_service_TYPES_H #define hive_service_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include #include "fb303_types.h" #include "hive_metastore_types.h" @@ -43,7 +44,7 @@ static const char* ascii_fingerprint; // = "D514EDCFFC86F64A2E924DCD16D4FAD8"; static const uint8_t binary_fingerprint[16]; // = {0xD5,0x14,0xED,0xCF,0xFC,0x86,0xF6,0x4A,0x2E,0x92,0x4D,0xCD,0x16,0xD4,0xFA,0xD8}; - HiveClusterStatus() : taskTrackers(0), mapTasks(0), reduceTasks(0), maxMapTasks(0), maxReduceTasks(0) { + HiveClusterStatus() : taskTrackers(0), mapTasks(0), reduceTasks(0), maxMapTasks(0), maxReduceTasks(0), state((JobTrackerState::type)0) { } virtual ~HiveClusterStatus() throw() {} @@ -108,6 +109,8 @@ }; +void swap(HiveClusterStatus &a, HiveClusterStatus &b); + typedef struct _HiveServerException__isset { _HiveServerException__isset() : message(false), errorCode(false), SQLState(false) {} bool message; @@ -121,7 +124,7 @@ static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; - HiveServerException() : message(""), errorCode(0), SQLState("") { + HiveServerException() : message(), errorCode(0), SQLState() { } virtual ~HiveServerException() throw() {} @@ -165,6 +168,8 @@ }; +void swap(HiveServerException &a, HiveServerException &b); + }}} // namespace #endif Index: service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp (revision 1406838) +++ service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp (working copy) @@ -2,10 +2,10 @@ // You should copy it to another filename to avoid overwriting it. #include "ThriftHive.h" -#include -#include -#include -#include +#include +#include +#include +#include using namespace ::apache::thrift; using namespace ::apache::thrift::protocol; @@ -14,7 +14,7 @@ using boost::shared_ptr; -using namespace Apache::Hadoop::Hive; +using namespace ::Apache::Hadoop::Hive; class ThriftHiveHandler : virtual public ThriftHiveIf { public: @@ -42,12 +42,12 @@ printf("fetchAll\n"); } - void getSchema(Apache::Hadoop::Hive::Schema& _return) { + void getSchema( ::Apache::Hadoop::Hive::Schema& _return) { // Your implementation goes here printf("getSchema\n"); } - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) { + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { // Your implementation goes here printf("getThriftSchema\n"); } @@ -57,7 +57,7 @@ printf("getClusterStatus\n"); } - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { // Your implementation goes here printf("getQueryPlan\n"); } Index: service/src/gen/thrift/gen-cpp/hive_service_constants.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_constants.cpp (revision 1406838) +++ service/src/gen/thrift/gen-cpp/hive_service_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_service_constants.h" Index: service/src/gen/thrift/gen-cpp/ThriftHive.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/ThriftHive.cpp (revision 1406838) +++ service/src/gen/thrift/gen-cpp/ThriftHive.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "ThriftHive.h" @@ -50,9 +51,11 @@ uint32_t ThriftHive_execute_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_execute_args"); + xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->query); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -61,9 +64,11 @@ uint32_t ThriftHive_execute_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_execute_pargs"); + xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->query))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -183,12 +188,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -200,6 +200,7 @@ uint32_t ThriftHive_fetchOne_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchOne_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -208,6 +209,7 @@ uint32_t ThriftHive_fetchOne_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchOne_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -372,9 +374,11 @@ uint32_t ThriftHive_fetchN_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchN_args"); + xfer += oprot->writeFieldBegin("numRows", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->numRows); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -383,9 +387,11 @@ uint32_t ThriftHive_fetchN_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchN_pargs"); + xfer += oprot->writeFieldBegin("numRows", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((*(this->numRows))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -417,14 +423,14 @@ this->success.clear(); uint32_t _size1; ::apache::thrift::protocol::TType _etype4; - iprot->readListBegin(_etype4, _size1); + xfer += iprot->readListBegin(_etype4, _size1); this->success.resize(_size1); uint32_t _i5; for (_i5 = 0; _i5 < _size1; ++_i5) { xfer += iprot->readString(this->success[_i5]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -505,14 +511,14 @@ (*(this->success)).clear(); uint32_t _size7; ::apache::thrift::protocol::TType _etype10; - iprot->readListBegin(_etype10, _size7); + xfer += iprot->readListBegin(_etype10, _size7); (*(this->success)).resize(_size7); uint32_t _i11; for (_i11 = 0; _i11 < _size7; ++_i11) { xfer += iprot->readString((*(this->success))[_i11]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -557,12 +563,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -574,6 +575,7 @@ uint32_t ThriftHive_fetchAll_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchAll_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -582,6 +584,7 @@ uint32_t ThriftHive_fetchAll_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchAll_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -613,14 +616,14 @@ this->success.clear(); uint32_t _size12; ::apache::thrift::protocol::TType _etype15; - iprot->readListBegin(_etype15, _size12); + xfer += iprot->readListBegin(_etype15, _size12); this->success.resize(_size12); uint32_t _i16; for (_i16 = 0; _i16 < _size12; ++_i16) { xfer += iprot->readString(this->success[_i16]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -701,14 +704,14 @@ (*(this->success)).clear(); uint32_t _size18; ::apache::thrift::protocol::TType _etype21; - iprot->readListBegin(_etype21, _size18); + xfer += iprot->readListBegin(_etype21, _size18); (*(this->success)).resize(_size18); uint32_t _i22; for (_i22 = 0; _i22 < _size18; ++_i22) { xfer += iprot->readString((*(this->success))[_i22]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -753,12 +756,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -770,6 +768,7 @@ uint32_t ThriftHive_getSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getSchema_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -778,6 +777,7 @@ uint32_t ThriftHive_getSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getSchema_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -917,12 +917,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -934,6 +929,7 @@ uint32_t ThriftHive_getThriftSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -942,6 +938,7 @@ uint32_t ThriftHive_getThriftSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1081,12 +1078,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1098,6 +1090,7 @@ uint32_t ThriftHive_getClusterStatus_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1106,6 +1099,7 @@ uint32_t ThriftHive_getClusterStatus_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1245,12 +1239,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1262,6 +1251,7 @@ uint32_t ThriftHive_getQueryPlan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1270,6 +1260,7 @@ uint32_t ThriftHive_getQueryPlan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1409,12 +1400,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1426,6 +1412,7 @@ uint32_t ThriftHive_clean_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_clean_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1434,6 +1421,7 @@ uint32_t ThriftHive_clean_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_clean_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1457,12 +1445,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1500,12 +1483,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1751,7 +1729,7 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchAll failed: unknown result"); } -void ThriftHiveClient::getSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::getSchema( ::Apache::Hadoop::Hive::Schema& _return) { send_getSchema(); recv_getSchema(_return); @@ -1770,7 +1748,7 @@ oprot_->getTransport()->flush(); } -void ThriftHiveClient::recv_getSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::recv_getSchema( ::Apache::Hadoop::Hive::Schema& _return) { int32_t rseqid = 0; @@ -1811,7 +1789,7 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getSchema failed: unknown result"); } -void ThriftHiveClient::getThriftSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { send_getThriftSchema(); recv_getThriftSchema(_return); @@ -1830,7 +1808,7 @@ oprot_->getTransport()->flush(); } -void ThriftHiveClient::recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::recv_getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { int32_t rseqid = 0; @@ -1931,7 +1909,7 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getClusterStatus failed: unknown result"); } -void ThriftHiveClient::getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) +void ThriftHiveClient::getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { send_getQueryPlan(); recv_getQueryPlan(_return); @@ -1950,7 +1928,7 @@ oprot_->getTransport()->flush(); } -void ThriftHiveClient::recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) +void ThriftHiveClient::recv_getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { int32_t rseqid = 0; @@ -2043,37 +2021,11 @@ return; } -bool ThriftHiveProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) { - - ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); - ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - iprot->readMessageBegin(fname, mtype, seqid); - - if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { - iprot->skip(::apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return false; - } - - return process_fn(iprot, oprot, fname, seqid, callContext); -} - -bool ThriftHiveProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) { - std::map::iterator pfn; +bool ThriftHiveProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; pfn = processMap_.find(fname); if (pfn == processMap_.end()) { - return Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::process_fn(iprot, oprot, fname, seqid, callContext); + return ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::dispatchCall(iprot, oprot, fname, seqid, callContext); } (this->*(pfn->second))(seqid, iprot, oprot, callContext); return true; @@ -2082,13 +2034,13 @@ void ThriftHiveProcessor::process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.execute", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.execute", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.execute"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.execute"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.execute"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.execute"); } ThriftHive_execute_args args; @@ -2096,8 +2048,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.execute", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.execute", bytes); } ThriftHive_execute_result result; @@ -2107,8 +2059,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.execute"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.execute"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2120,8 +2072,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.execute"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.execute"); } oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2130,21 +2082,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.execute", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.execute", bytes); } } void ThriftHiveProcessor::process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.fetchOne", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.fetchOne", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchOne"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchOne"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.fetchOne"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.fetchOne"); } ThriftHive_fetchOne_args args; @@ -2152,8 +2104,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.fetchOne", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.fetchOne", bytes); } ThriftHive_fetchOne_result result; @@ -2164,8 +2116,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.fetchOne"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.fetchOne"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2177,8 +2129,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.fetchOne"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.fetchOne"); } oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2187,21 +2139,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.fetchOne", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.fetchOne", bytes); } } void ThriftHiveProcessor::process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.fetchN", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.fetchN", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchN"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchN"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.fetchN"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.fetchN"); } ThriftHive_fetchN_args args; @@ -2209,8 +2161,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.fetchN", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.fetchN", bytes); } ThriftHive_fetchN_result result; @@ -2221,8 +2173,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.fetchN"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.fetchN"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2234,8 +2186,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.fetchN"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.fetchN"); } oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2244,21 +2196,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.fetchN", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.fetchN", bytes); } } void ThriftHiveProcessor::process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.fetchAll", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.fetchAll", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchAll"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchAll"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.fetchAll"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.fetchAll"); } ThriftHive_fetchAll_args args; @@ -2266,8 +2218,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.fetchAll", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.fetchAll", bytes); } ThriftHive_fetchAll_result result; @@ -2278,8 +2230,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.fetchAll"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.fetchAll"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2291,8 +2243,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.fetchAll"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.fetchAll"); } oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2301,21 +2253,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.fetchAll", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.fetchAll", bytes); } } void ThriftHiveProcessor::process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getSchema", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getSchema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getSchema"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getSchema"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getSchema"); } ThriftHive_getSchema_args args; @@ -2323,8 +2275,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getSchema", bytes); } ThriftHive_getSchema_result result; @@ -2335,8 +2287,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getSchema"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2348,8 +2300,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getSchema"); } oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2358,21 +2310,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getSchema", bytes); } } void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getThriftSchema", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getThriftSchema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getThriftSchema"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getThriftSchema"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getThriftSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getThriftSchema"); } ThriftHive_getThriftSchema_args args; @@ -2380,8 +2332,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getThriftSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getThriftSchema", bytes); } ThriftHive_getThriftSchema_result result; @@ -2392,8 +2344,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getThriftSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getThriftSchema"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2405,8 +2357,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getThriftSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getThriftSchema"); } oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2415,21 +2367,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getThriftSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getThriftSchema", bytes); } } void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getClusterStatus", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getClusterStatus", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getClusterStatus"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getClusterStatus"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getClusterStatus"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getClusterStatus"); } ThriftHive_getClusterStatus_args args; @@ -2437,8 +2389,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getClusterStatus", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getClusterStatus", bytes); } ThriftHive_getClusterStatus_result result; @@ -2449,8 +2401,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getClusterStatus"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getClusterStatus"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2462,8 +2414,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getClusterStatus"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getClusterStatus"); } oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2472,21 +2424,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getClusterStatus", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getClusterStatus", bytes); } } void ThriftHiveProcessor::process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getQueryPlan", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getQueryPlan", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getQueryPlan"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getQueryPlan"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getQueryPlan"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getQueryPlan"); } ThriftHive_getQueryPlan_args args; @@ -2494,8 +2446,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getQueryPlan", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getQueryPlan", bytes); } ThriftHive_getQueryPlan_result result; @@ -2506,8 +2458,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getQueryPlan"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getQueryPlan"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2519,8 +2471,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getQueryPlan"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getQueryPlan"); } oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2529,21 +2481,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getQueryPlan", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getQueryPlan", bytes); } } void ThriftHiveProcessor::process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.clean", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.clean", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.clean"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.clean"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.clean"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.clean"); } ThriftHive_clean_args args; @@ -2551,16 +2503,16 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.clean", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.clean", bytes); } ThriftHive_clean_result result; try { iface_->clean(); } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.clean"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.clean"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2572,8 +2524,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.clean"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.clean"); } oprot->writeMessageBegin("clean", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2582,10 +2534,16 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.clean", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.clean", bytes); } } +::boost::shared_ptr< ::apache::thrift::TProcessor > ThriftHiveProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ThriftHiveIfFactory > cleanup(handlerFactory_); + ::boost::shared_ptr< ThriftHiveIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new ThriftHiveProcessor(handler)); + return processor; +} }}} // namespace Index: service/src/gen/thrift/gen-cpp/hive_service_constants.h =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_constants.h (revision 1406838) +++ service/src/gen/thrift/gen-cpp/hive_service_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_service_CONSTANTS_H #define hive_service_CONSTANTS_H Index: service/src/gen/thrift/gen-rb/hive_service_types.rb =================================================================== --- service/src/gen/thrift/gen-rb/hive_service_types.rb (revision 1406838) +++ service/src/gen/thrift/gen-rb/hive_service_types.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'fb303_types' require 'hive_metastore_types' require 'queryplan_types' @@ -31,13 +32,13 @@ REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'}, MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'}, MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'}, - STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState} + STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::JobTrackerState} } def struct_fields; FIELDS; end def validate - unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state) + unless @state.nil? || ::JobTrackerState::VALID_VALUES.include?(@state) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') end end Index: service/src/gen/thrift/gen-rb/hive_service_constants.rb =================================================================== --- service/src/gen/thrift/gen-rb/hive_service_constants.rb (revision 1406838) +++ service/src/gen/thrift/gen-rb/hive_service_constants.rb (working copy) @@ -1,8 +1,9 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'hive_service_types' Index: service/src/gen/thrift/gen-rb/thrift_hive.rb =================================================================== --- service/src/gen/thrift/gen-rb/thrift_hive.rb (revision 1406838) +++ service/src/gen/thrift/gen-rb/thrift_hive.rb (working copy) @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -9,7 +9,7 @@ require 'hive_service_types' module ThriftHive - class Client < ThriftHiveMetastore::Client + class Client < ::ThriftHiveMetastore::Client include ::Thrift::Client def execute(query) @@ -155,7 +155,7 @@ end - class Processor < ThriftHiveMetastore::Processor + class Processor < ::ThriftHiveMetastore::Processor include ::Thrift::Processor def process_execute(seqid, iprot, oprot) @@ -163,7 +163,7 @@ result = Execute_result.new() begin @handler.execute(args.query) - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'execute', seqid) @@ -174,7 +174,7 @@ result = FetchOne_result.new() begin result.success = @handler.fetchOne() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'fetchOne', seqid) @@ -185,7 +185,7 @@ result = FetchN_result.new() begin result.success = @handler.fetchN(args.numRows) - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'fetchN', seqid) @@ -196,7 +196,7 @@ result = FetchAll_result.new() begin result.success = @handler.fetchAll() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'fetchAll', seqid) @@ -207,7 +207,7 @@ result = GetSchema_result.new() begin result.success = @handler.getSchema() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getSchema', seqid) @@ -218,7 +218,7 @@ result = GetThriftSchema_result.new() begin result.success = @handler.getThriftSchema() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getThriftSchema', seqid) @@ -229,7 +229,7 @@ result = GetClusterStatus_result.new() begin result.success = @handler.getClusterStatus() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getClusterStatus', seqid) @@ -240,7 +240,7 @@ result = GetQueryPlan_result.new() begin result.success = @handler.getQueryPlan() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getQueryPlan', seqid) @@ -278,7 +278,7 @@ EX = 1 FIELDS = { - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -311,7 +311,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -345,7 +345,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -378,7 +378,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -410,8 +410,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -443,8 +443,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -476,8 +476,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => HiveClusterStatus}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::HiveClusterStatus}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -509,8 +509,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => QueryPlan}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::QueryPlan}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java (revision 1406838) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -31,6 +41,12 @@ private static final org.apache.thrift.protocol.TField MAX_REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxReduceTasks", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveClusterStatusStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveClusterStatusTupleSchemeFactory()); + } + private int taskTrackers; // required private int mapTasks; // required private int reduceTasks; // required @@ -121,8 +137,7 @@ private static final int __REDUCETASKS_ISSET_ID = 2; private static final int __MAXMAPTASKS_ISSET_ID = 3; private static final int __MAXREDUCETASKS_ISSET_ID = 4; - private BitSet __isset_bit_vector = new BitSet(5); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -171,8 +186,7 @@ * Performs a deep copy on other. */ public HiveClusterStatus(HiveClusterStatus other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.taskTrackers = other.taskTrackers; this.mapTasks = other.mapTasks; this.reduceTasks = other.reduceTasks; @@ -212,16 +226,16 @@ } public void unsetTaskTrackers() { - __isset_bit_vector.clear(__TASKTRACKERS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID); } /** Returns true if field taskTrackers is set (has been assigned a value) and false otherwise */ public boolean isSetTaskTrackers() { - return __isset_bit_vector.get(__TASKTRACKERS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID); } public void setTaskTrackersIsSet(boolean value) { - __isset_bit_vector.set(__TASKTRACKERS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID, value); } public int getMapTasks() { @@ -234,16 +248,16 @@ } public void unsetMapTasks() { - __isset_bit_vector.clear(__MAPTASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAPTASKS_ISSET_ID); } /** Returns true if field mapTasks is set (has been assigned a value) and false otherwise */ public boolean isSetMapTasks() { - return __isset_bit_vector.get(__MAPTASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAPTASKS_ISSET_ID); } public void setMapTasksIsSet(boolean value) { - __isset_bit_vector.set(__MAPTASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAPTASKS_ISSET_ID, value); } public int getReduceTasks() { @@ -256,16 +270,16 @@ } public void unsetReduceTasks() { - __isset_bit_vector.clear(__REDUCETASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REDUCETASKS_ISSET_ID); } /** Returns true if field reduceTasks is set (has been assigned a value) and false otherwise */ public boolean isSetReduceTasks() { - return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __REDUCETASKS_ISSET_ID); } public void setReduceTasksIsSet(boolean value) { - __isset_bit_vector.set(__REDUCETASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REDUCETASKS_ISSET_ID, value); } public int getMaxMapTasks() { @@ -278,16 +292,16 @@ } public void unsetMaxMapTasks() { - __isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID); } /** Returns true if field maxMapTasks is set (has been assigned a value) and false otherwise */ public boolean isSetMaxMapTasks() { - return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID); } public void setMaxMapTasksIsSet(boolean value) { - __isset_bit_vector.set(__MAXMAPTASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID, value); } public int getMaxReduceTasks() { @@ -300,16 +314,16 @@ } public void unsetMaxReduceTasks() { - __isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID); } /** Returns true if field maxReduceTasks is set (has been assigned a value) and false otherwise */ public boolean isSetMaxReduceTasks() { - return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID); } public void setMaxReduceTasksIsSet(boolean value) { - __isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID, value); } /** @@ -626,97 +640,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TASK_TRACKERS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.taskTrackers = iprot.readI32(); - setTaskTrackersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // MAP_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.mapTasks = iprot.readI32(); - setMapTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // REDUCE_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.reduceTasks = iprot.readI32(); - setReduceTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_MAP_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.maxMapTasks = iprot.readI32(); - setMaxMapTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // MAX_REDUCE_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.maxReduceTasks = iprot.readI32(); - setMaxReduceTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // STATE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.state = JobTrackerState.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC); - oprot.writeI32(this.taskTrackers); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC); - oprot.writeI32(this.mapTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC); - oprot.writeI32(this.reduceTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC); - oprot.writeI32(this.maxMapTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); - oprot.writeI32(this.maxReduceTasks); - oprot.writeFieldEnd(); - if (this.state != null) { - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeI32(this.state.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -757,6 +685,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -770,12 +699,199 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class HiveClusterStatusStandardSchemeFactory implements SchemeFactory { + public HiveClusterStatusStandardScheme getScheme() { + return new HiveClusterStatusStandardScheme(); + } + } + + private static class HiveClusterStatusStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveClusterStatus struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TASK_TRACKERS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.taskTrackers = iprot.readI32(); + struct.setTaskTrackersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MAP_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.mapTasks = iprot.readI32(); + struct.setMapTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // REDUCE_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.reduceTasks = iprot.readI32(); + struct.setReduceTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_MAP_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxMapTasks = iprot.readI32(); + struct.setMaxMapTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // MAX_REDUCE_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxReduceTasks = iprot.readI32(); + struct.setMaxReduceTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.state = JobTrackerState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveClusterStatus struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC); + oprot.writeI32(struct.taskTrackers); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC); + oprot.writeI32(struct.mapTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC); + oprot.writeI32(struct.reduceTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC); + oprot.writeI32(struct.maxMapTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); + oprot.writeI32(struct.maxReduceTasks); + oprot.writeFieldEnd(); + if (struct.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeI32(struct.state.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveClusterStatusTupleSchemeFactory implements SchemeFactory { + public HiveClusterStatusTupleScheme getScheme() { + return new HiveClusterStatusTupleScheme(); + } + } + + private static class HiveClusterStatusTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveClusterStatus struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTaskTrackers()) { + optionals.set(0); + } + if (struct.isSetMapTasks()) { + optionals.set(1); + } + if (struct.isSetReduceTasks()) { + optionals.set(2); + } + if (struct.isSetMaxMapTasks()) { + optionals.set(3); + } + if (struct.isSetMaxReduceTasks()) { + optionals.set(4); + } + if (struct.isSetState()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetTaskTrackers()) { + oprot.writeI32(struct.taskTrackers); + } + if (struct.isSetMapTasks()) { + oprot.writeI32(struct.mapTasks); + } + if (struct.isSetReduceTasks()) { + oprot.writeI32(struct.reduceTasks); + } + if (struct.isSetMaxMapTasks()) { + oprot.writeI32(struct.maxMapTasks); + } + if (struct.isSetMaxReduceTasks()) { + oprot.writeI32(struct.maxReduceTasks); + } + if (struct.isSetState()) { + oprot.writeI32(struct.state.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveClusterStatus struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.taskTrackers = iprot.readI32(); + struct.setTaskTrackersIsSet(true); + } + if (incoming.get(1)) { + struct.mapTasks = iprot.readI32(); + struct.setMapTasksIsSet(true); + } + if (incoming.get(2)) { + struct.reduceTasks = iprot.readI32(); + struct.setReduceTasksIsSet(true); + } + if (incoming.get(3)) { + struct.maxMapTasks = iprot.readI32(); + struct.setMaxMapTasksIsSet(true); + } + if (incoming.get(4)) { + struct.maxReduceTasks = iprot.readI32(); + struct.setMaxReduceTasksIsSet(true); + } + if (incoming.get(5)) { + struct.state = JobTrackerState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } + } + } + } Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java (revision 1406838) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,13 +31,19 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HiveServerException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class HiveServerException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveServerException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCode", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField SQLSTATE_FIELD_DESC = new org.apache.thrift.protocol.TField("SQLState", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveServerExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveServerExceptionTupleSchemeFactory()); + } + private String message; // required private int errorCode; // required private String SQLState; // required @@ -98,8 +114,7 @@ // isset id assignments private static final int __ERRORCODE_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -132,8 +147,7 @@ * Performs a deep copy on other. */ public HiveServerException(HiveServerException other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetMessage()) { this.message = other.message; } @@ -188,16 +202,16 @@ } public void unsetErrorCode() { - __isset_bit_vector.clear(__ERRORCODE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRORCODE_ISSET_ID); } /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */ public boolean isSetErrorCode() { - return __isset_bit_vector.get(__ERRORCODE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __ERRORCODE_ISSET_ID); } public void setErrorCodeIsSet(boolean value) { - __isset_bit_vector.set(__ERRORCODE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRORCODE_ISSET_ID, value); } public String getSQLState() { @@ -395,65 +409,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ERROR_CODE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.errorCode = iprot.readI32(); - setErrorCodeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // SQLSTATE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.SQLState = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); - oprot.writeI32(this.errorCode); - oprot.writeFieldEnd(); - if (this.SQLState != null) { - oprot.writeFieldBegin(SQLSTATE_FIELD_DESC); - oprot.writeString(this.SQLState); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -486,6 +446,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -499,12 +460,138 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class HiveServerExceptionStandardSchemeFactory implements SchemeFactory { + public HiveServerExceptionStandardScheme getScheme() { + return new HiveServerExceptionStandardScheme(); + } + } + + private static class HiveServerExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveServerException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ERROR_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SQLSTATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.SQLState = iprot.readString(); + struct.setSQLStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveServerException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); + oprot.writeI32(struct.errorCode); + oprot.writeFieldEnd(); + if (struct.SQLState != null) { + oprot.writeFieldBegin(SQLSTATE_FIELD_DESC); + oprot.writeString(struct.SQLState); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveServerExceptionTupleSchemeFactory implements SchemeFactory { + public HiveServerExceptionTupleScheme getScheme() { + return new HiveServerExceptionTupleScheme(); + } + } + + private static class HiveServerExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveServerException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + if (struct.isSetErrorCode()) { + optionals.set(1); + } + if (struct.isSetSQLState()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + if (struct.isSetErrorCode()) { + oprot.writeI32(struct.errorCode); + } + if (struct.isSetSQLState()) { + oprot.writeString(struct.SQLState); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveServerException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + if (incoming.get(1)) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } + if (incoming.get(2)) { + struct.SQLState = iprot.readString(); + struct.setSQLStateIsSet(true); + } + } + } + } Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java (revision 1406838) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java (revision 1406838) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -592,7 +602,7 @@ } - public static class Processor extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Processor implements org.apache.thrift.TProcessor { + public static class Processor extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Processor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); @@ -615,16 +625,20 @@ return processMap; } - private static class execute extends org.apache.thrift.ProcessFunction { + public static class execute extends org.apache.thrift.ProcessFunction { public execute() { super("execute"); } - protected execute_args getEmptyArgsInstance() { + public execute_args getEmptyArgsInstance() { return new execute_args(); } - protected execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException { execute_result result = new execute_result(); try { iface.execute(args.query); @@ -635,16 +649,20 @@ } } - private static class fetchOne extends org.apache.thrift.ProcessFunction { + public static class fetchOne extends org.apache.thrift.ProcessFunction { public fetchOne() { super("fetchOne"); } - protected fetchOne_args getEmptyArgsInstance() { + public fetchOne_args getEmptyArgsInstance() { return new fetchOne_args(); } - protected fetchOne_result getResult(I iface, fetchOne_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public fetchOne_result getResult(I iface, fetchOne_args args) throws org.apache.thrift.TException { fetchOne_result result = new fetchOne_result(); try { result.success = iface.fetchOne(); @@ -655,16 +673,20 @@ } } - private static class fetchN extends org.apache.thrift.ProcessFunction { + public static class fetchN extends org.apache.thrift.ProcessFunction { public fetchN() { super("fetchN"); } - protected fetchN_args getEmptyArgsInstance() { + public fetchN_args getEmptyArgsInstance() { return new fetchN_args(); } - protected fetchN_result getResult(I iface, fetchN_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public fetchN_result getResult(I iface, fetchN_args args) throws org.apache.thrift.TException { fetchN_result result = new fetchN_result(); try { result.success = iface.fetchN(args.numRows); @@ -675,16 +697,20 @@ } } - private static class fetchAll extends org.apache.thrift.ProcessFunction { + public static class fetchAll extends org.apache.thrift.ProcessFunction { public fetchAll() { super("fetchAll"); } - protected fetchAll_args getEmptyArgsInstance() { + public fetchAll_args getEmptyArgsInstance() { return new fetchAll_args(); } - protected fetchAll_result getResult(I iface, fetchAll_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public fetchAll_result getResult(I iface, fetchAll_args args) throws org.apache.thrift.TException { fetchAll_result result = new fetchAll_result(); try { result.success = iface.fetchAll(); @@ -695,16 +721,20 @@ } } - private static class getSchema extends org.apache.thrift.ProcessFunction { + public static class getSchema extends org.apache.thrift.ProcessFunction { public getSchema() { super("getSchema"); } - protected getSchema_args getEmptyArgsInstance() { + public getSchema_args getEmptyArgsInstance() { return new getSchema_args(); } - protected getSchema_result getResult(I iface, getSchema_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getSchema_result getResult(I iface, getSchema_args args) throws org.apache.thrift.TException { getSchema_result result = new getSchema_result(); try { result.success = iface.getSchema(); @@ -715,16 +745,20 @@ } } - private static class getThriftSchema extends org.apache.thrift.ProcessFunction { + public static class getThriftSchema extends org.apache.thrift.ProcessFunction { public getThriftSchema() { super("getThriftSchema"); } - protected getThriftSchema_args getEmptyArgsInstance() { + public getThriftSchema_args getEmptyArgsInstance() { return new getThriftSchema_args(); } - protected getThriftSchema_result getResult(I iface, getThriftSchema_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getThriftSchema_result getResult(I iface, getThriftSchema_args args) throws org.apache.thrift.TException { getThriftSchema_result result = new getThriftSchema_result(); try { result.success = iface.getThriftSchema(); @@ -735,16 +769,20 @@ } } - private static class getClusterStatus extends org.apache.thrift.ProcessFunction { + public static class getClusterStatus extends org.apache.thrift.ProcessFunction { public getClusterStatus() { super("getClusterStatus"); } - protected getClusterStatus_args getEmptyArgsInstance() { + public getClusterStatus_args getEmptyArgsInstance() { return new getClusterStatus_args(); } - protected getClusterStatus_result getResult(I iface, getClusterStatus_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getClusterStatus_result getResult(I iface, getClusterStatus_args args) throws org.apache.thrift.TException { getClusterStatus_result result = new getClusterStatus_result(); try { result.success = iface.getClusterStatus(); @@ -755,16 +793,20 @@ } } - private static class getQueryPlan extends org.apache.thrift.ProcessFunction { + public static class getQueryPlan extends org.apache.thrift.ProcessFunction { public getQueryPlan() { super("getQueryPlan"); } - protected getQueryPlan_args getEmptyArgsInstance() { + public getQueryPlan_args getEmptyArgsInstance() { return new getQueryPlan_args(); } - protected getQueryPlan_result getResult(I iface, getQueryPlan_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getQueryPlan_result getResult(I iface, getQueryPlan_args args) throws org.apache.thrift.TException { getQueryPlan_result result = new getQueryPlan_result(); try { result.success = iface.getQueryPlan(); @@ -775,16 +817,20 @@ } } - private static class clean extends org.apache.thrift.ProcessFunction { + public static class clean extends org.apache.thrift.ProcessFunction { public clean() { super("clean"); } - protected clean_args getEmptyArgsInstance() { + public clean_args getEmptyArgsInstance() { return new clean_args(); } - protected clean_result getResult(I iface, clean_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public clean_result getResult(I iface, clean_args args) throws org.apache.thrift.TException { clean_result result = new clean_result(); iface.clean(); return result; @@ -798,6 +844,12 @@ private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new execute_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new execute_argsTupleSchemeFactory()); + } + private String query; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -859,7 +911,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -1018,42 +1069,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // QUERY - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.query = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.query != null) { - oprot.writeFieldBegin(QUERY_FIELD_DESC); - oprot.writeString(this.query); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1074,6 +1094,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1092,6 +1113,88 @@ } } + private static class execute_argsStandardSchemeFactory implements SchemeFactory { + public execute_argsStandardScheme getScheme() { + return new execute_argsStandardScheme(); + } + } + + private static class execute_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, execute_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.query = iprot.readString(); + struct.setQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, execute_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.query != null) { + oprot.writeFieldBegin(QUERY_FIELD_DESC); + oprot.writeString(struct.query); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class execute_argsTupleSchemeFactory implements SchemeFactory { + public execute_argsTupleScheme getScheme() { + return new execute_argsTupleScheme(); + } + } + + private static class execute_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetQuery()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetQuery()) { + oprot.writeString(struct.query); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.query = iprot.readString(); + struct.setQueryIsSet(true); + } + } + } + } public static class execute_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -1099,6 +1202,12 @@ private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new execute_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new execute_resultTupleSchemeFactory()); + } + private HiveServerException ex; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -1160,7 +1269,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -1319,43 +1427,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -1375,6 +1452,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1393,13 +1471,103 @@ } } + private static class execute_resultStandardSchemeFactory implements SchemeFactory { + public execute_resultStandardScheme getScheme() { + return new execute_resultStandardScheme(); + } + } + + private static class execute_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, execute_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, execute_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class execute_resultTupleSchemeFactory implements SchemeFactory { + public execute_resultTupleScheme getScheme() { + return new execute_resultTupleScheme(); + } + } + + private static class execute_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetEx()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class fetchOne_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchOne_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchOne_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchOne_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -1540,30 +1708,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1577,6 +1726,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1595,6 +1745,62 @@ } } + private static class fetchOne_argsStandardSchemeFactory implements SchemeFactory { + public fetchOne_argsStandardScheme getScheme() { + return new fetchOne_argsStandardScheme(); + } + } + + private static class fetchOne_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchOne_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchOne_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchOne_argsTupleSchemeFactory implements SchemeFactory { + public fetchOne_argsTupleScheme getScheme() { + return new fetchOne_argsTupleScheme(); + } + } + + private static class fetchOne_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchOne_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchOne_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class fetchOne_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -1603,6 +1809,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchOne_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchOne_resultTupleSchemeFactory()); + } + private String success; // required private HiveServerException ex; // required @@ -1668,7 +1880,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -1895,54 +2106,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.success = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -1970,6 +2139,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1988,6 +2158,113 @@ } } + private static class fetchOne_resultStandardSchemeFactory implements SchemeFactory { + public fetchOne_resultStandardScheme getScheme() { + return new fetchOne_resultStandardScheme(); + } + } + + private static class fetchOne_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchOne_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchOne_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchOne_resultTupleSchemeFactory implements SchemeFactory { + public fetchOne_resultTupleScheme getScheme() { + return new fetchOne_resultTupleScheme(); + } + } + + private static class fetchOne_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchOne_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchOne_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class fetchN_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -1995,6 +2272,12 @@ private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchN_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchN_argsTupleSchemeFactory()); + } + private int numRows; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -2057,8 +2340,7 @@ // isset id assignments private static final int __NUMROWS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -2083,8 +2365,7 @@ * Performs a deep copy on other. */ public fetchN_args(fetchN_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.numRows = other.numRows; } @@ -2108,16 +2389,16 @@ } public void unsetNumRows() { - __isset_bit_vector.clear(__NUMROWS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID); } /** Returns true if field numRows is set (has been assigned a value) and false otherwise */ public boolean isSetNumRows() { - return __isset_bit_vector.get(__NUMROWS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); } public void setNumRowsIsSet(boolean value) { - __isset_bit_vector.set(__NUMROWS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -2218,41 +2499,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NUM_ROWS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.numRows = iprot.readI32(); - setNumRowsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); - oprot.writeI32(this.numRows); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -2269,6 +2520,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -2282,13 +2534,93 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class fetchN_argsStandardSchemeFactory implements SchemeFactory { + public fetchN_argsStandardScheme getScheme() { + return new fetchN_argsStandardScheme(); + } + } + + private static class fetchN_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchN_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NUM_ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchN_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); + oprot.writeI32(struct.numRows); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchN_argsTupleSchemeFactory implements SchemeFactory { + public fetchN_argsTupleScheme getScheme() { + return new fetchN_argsTupleScheme(); + } + } + + private static class fetchN_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchN_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNumRows()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNumRows()) { + oprot.writeI32(struct.numRows); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchN_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } + } + } + } public static class fetchN_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -2297,6 +2629,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchN_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchN_resultTupleSchemeFactory()); + } + private List success; // required private HiveServerException ex; // required @@ -2362,7 +2700,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -2609,71 +2946,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.success = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; // required - _elem2 = iprot.readString(); - this.success.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter3 : this.success) - { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -2701,6 +2979,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -2719,13 +2998,158 @@ } } + private static class fetchN_resultStandardSchemeFactory implements SchemeFactory { + public fetchN_resultStandardScheme getScheme() { + return new fetchN_resultStandardScheme(); + } + } + + private static class fetchN_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchN_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.success = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + String _elem2; // required + _elem2 = iprot.readString(); + struct.success.add(_elem2); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchN_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter3 : struct.success) + { + oprot.writeString(_iter3); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchN_resultTupleSchemeFactory implements SchemeFactory { + public fetchN_resultTupleScheme getScheme() { + return new fetchN_resultTupleScheme(); + } + } + + private static class fetchN_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchN_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter4 : struct.success) + { + oprot.writeString(_iter4); + } + } + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchN_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + String _elem7; // required + _elem7 = iprot.readString(); + struct.success.add(_elem7); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class fetchAll_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAll_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchAll_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchAll_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -2866,30 +3290,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -2903,6 +3308,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -2921,6 +3327,62 @@ } } + private static class fetchAll_argsStandardSchemeFactory implements SchemeFactory { + public fetchAll_argsStandardScheme getScheme() { + return new fetchAll_argsStandardScheme(); + } + } + + private static class fetchAll_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAll_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAll_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchAll_argsTupleSchemeFactory implements SchemeFactory { + public fetchAll_argsTupleScheme getScheme() { + return new fetchAll_argsTupleScheme(); + } + } + + private static class fetchAll_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class fetchAll_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -2929,6 +3391,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchAll_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchAll_resultTupleSchemeFactory()); + } + private List success; // required private HiveServerException ex; // required @@ -2994,7 +3462,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -3241,71 +3708,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); - this.success = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; // required - _elem6 = iprot.readString(); - this.success.add(_elem6); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter7 : this.success) - { - oprot.writeString(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -3333,6 +3741,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3351,13 +3760,158 @@ } } + private static class fetchAll_resultStandardSchemeFactory implements SchemeFactory { + public fetchAll_resultStandardScheme getScheme() { + return new fetchAll_resultStandardScheme(); + } + } + + private static class fetchAll_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAll_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.success = new ArrayList(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + String _elem10; // required + _elem10 = iprot.readString(); + struct.success.add(_elem10); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAll_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter11 : struct.success) + { + oprot.writeString(_iter11); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchAll_resultTupleSchemeFactory implements SchemeFactory { + public fetchAll_resultTupleScheme getScheme() { + return new fetchAll_resultTupleScheme(); + } + } + + private static class fetchAll_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter12 : struct.success) + { + oprot.writeString(_iter12); + } + } + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list13.size); + for (int _i14 = 0; _i14 < _list13.size; ++_i14) + { + String _elem15; // required + _elem15 = iprot.readString(); + struct.success.add(_elem15); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getSchema_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSchema_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getSchema_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getSchema_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -3498,30 +4052,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -3535,6 +4070,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3553,6 +4089,62 @@ } } + private static class getSchema_argsStandardSchemeFactory implements SchemeFactory { + public getSchema_argsStandardScheme getScheme() { + return new getSchema_argsStandardScheme(); + } + } + + private static class getSchema_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getSchema_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getSchema_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getSchema_argsTupleSchemeFactory implements SchemeFactory { + public getSchema_argsTupleScheme getScheme() { + return new getSchema_argsTupleScheme(); + } + } + + private static class getSchema_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getSchema_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -3561,6 +4153,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getSchema_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getSchema_resultTupleSchemeFactory()); + } + private org.apache.hadoop.hive.metastore.api.Schema success; // required private HiveServerException ex; // required @@ -3626,7 +4224,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -3853,55 +4450,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -3929,6 +4483,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3947,13 +4505,128 @@ } } + private static class getSchema_resultStandardSchemeFactory implements SchemeFactory { + public getSchema_resultStandardScheme getScheme() { + return new getSchema_resultStandardScheme(); + } + } + + private static class getSchema_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getSchema_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getSchema_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getSchema_resultTupleSchemeFactory implements SchemeFactory { + public getSchema_resultTupleScheme getScheme() { + return new getSchema_resultTupleScheme(); + } + } + + private static class getSchema_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getThriftSchema_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getThriftSchema_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getThriftSchema_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getThriftSchema_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -4094,30 +4767,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -4131,6 +4785,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4149,6 +4804,62 @@ } } + private static class getThriftSchema_argsStandardSchemeFactory implements SchemeFactory { + public getThriftSchema_argsStandardScheme getScheme() { + return new getThriftSchema_argsStandardScheme(); + } + } + + private static class getThriftSchema_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftSchema_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftSchema_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftSchema_argsTupleSchemeFactory implements SchemeFactory { + public getThriftSchema_argsTupleScheme getScheme() { + return new getThriftSchema_argsTupleScheme(); + } + } + + private static class getThriftSchema_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getThriftSchema_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -4157,6 +4868,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getThriftSchema_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getThriftSchema_resultTupleSchemeFactory()); + } + private org.apache.hadoop.hive.metastore.api.Schema success; // required private HiveServerException ex; // required @@ -4222,7 +4939,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -4449,55 +5165,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -4525,6 +5198,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4543,13 +5220,128 @@ } } + private static class getThriftSchema_resultStandardSchemeFactory implements SchemeFactory { + public getThriftSchema_resultStandardScheme getScheme() { + return new getThriftSchema_resultStandardScheme(); + } + } + + private static class getThriftSchema_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftSchema_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftSchema_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftSchema_resultTupleSchemeFactory implements SchemeFactory { + public getThriftSchema_resultTupleScheme getScheme() { + return new getThriftSchema_resultTupleScheme(); + } + } + + private static class getThriftSchema_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getClusterStatus_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getClusterStatus_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getClusterStatus_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClusterStatus_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -4690,30 +5482,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -4727,6 +5500,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4745,6 +5519,62 @@ } } + private static class getClusterStatus_argsStandardSchemeFactory implements SchemeFactory { + public getClusterStatus_argsStandardScheme getScheme() { + return new getClusterStatus_argsStandardScheme(); + } + } + + private static class getClusterStatus_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getClusterStatus_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getClusterStatus_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getClusterStatus_argsTupleSchemeFactory implements SchemeFactory { + public getClusterStatus_argsTupleScheme getScheme() { + return new getClusterStatus_argsTupleScheme(); + } + } + + private static class getClusterStatus_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getClusterStatus_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -4753,6 +5583,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getClusterStatus_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClusterStatus_resultTupleSchemeFactory()); + } + private HiveClusterStatus success; // required private HiveServerException ex; // required @@ -4818,7 +5654,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -5045,55 +5880,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new HiveClusterStatus(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -5121,6 +5913,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5139,13 +5935,128 @@ } } + private static class getClusterStatus_resultStandardSchemeFactory implements SchemeFactory { + public getClusterStatus_resultStandardScheme getScheme() { + return new getClusterStatus_resultStandardScheme(); + } + } + + private static class getClusterStatus_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getClusterStatus_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new HiveClusterStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getClusterStatus_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getClusterStatus_resultTupleSchemeFactory implements SchemeFactory { + public getClusterStatus_resultTupleScheme getScheme() { + return new getClusterStatus_resultTupleScheme(); + } + } + + private static class getClusterStatus_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new HiveClusterStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getQueryPlan_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getQueryPlan_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getQueryPlan_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getQueryPlan_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -5286,30 +6197,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -5323,6 +6215,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5341,6 +6234,62 @@ } } + private static class getQueryPlan_argsStandardSchemeFactory implements SchemeFactory { + public getQueryPlan_argsStandardScheme getScheme() { + return new getQueryPlan_argsStandardScheme(); + } + } + + private static class getQueryPlan_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getQueryPlan_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getQueryPlan_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getQueryPlan_argsTupleSchemeFactory implements SchemeFactory { + public getQueryPlan_argsTupleScheme getScheme() { + return new getQueryPlan_argsTupleScheme(); + } + } + + private static class getQueryPlan_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getQueryPlan_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -5349,6 +6298,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getQueryPlan_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getQueryPlan_resultTupleSchemeFactory()); + } + private org.apache.hadoop.hive.ql.plan.api.QueryPlan success; // required private HiveServerException ex; // required @@ -5414,7 +6369,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -5641,55 +6595,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -5717,6 +6628,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5735,13 +6650,128 @@ } } + private static class getQueryPlan_resultStandardSchemeFactory implements SchemeFactory { + public getQueryPlan_resultStandardScheme getScheme() { + return new getQueryPlan_resultStandardScheme(); + } + } + + private static class getQueryPlan_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getQueryPlan_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getQueryPlan_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getQueryPlan_resultTupleSchemeFactory implements SchemeFactory { + public getQueryPlan_resultTupleScheme getScheme() { + return new getQueryPlan_resultTupleScheme(); + } + } + + private static class getQueryPlan_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class clean_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clean_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new clean_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new clean_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -5882,30 +6912,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -5919,6 +6930,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5937,13 +6949,75 @@ } } + private static class clean_argsStandardSchemeFactory implements SchemeFactory { + public clean_argsStandardScheme getScheme() { + return new clean_argsStandardScheme(); + } + } + + private static class clean_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, clean_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, clean_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class clean_argsTupleSchemeFactory implements SchemeFactory { + public clean_argsTupleScheme getScheme() { + return new clean_argsTupleScheme(); + } + } + + private static class clean_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, clean_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, clean_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class clean_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clean_result"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new clean_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new clean_resultTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -6084,31 +7158,13 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - @Override public String toString() { StringBuilder sb = new StringBuilder("clean_result("); @@ -6120,6 +7176,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -6138,6 +7195,62 @@ } } + private static class clean_resultStandardSchemeFactory implements SchemeFactory { + public clean_resultStandardScheme getScheme() { + return new clean_resultStandardScheme(); + } + } + + private static class clean_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, clean_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, clean_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class clean_resultTupleSchemeFactory implements SchemeFactory { + public clean_resultTupleScheme getScheme() { + return new clean_resultTupleScheme(); + } + } + + private static class clean_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, clean_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, clean_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } } Index: service/src/gen/thrift/gen-php/ThriftHive.php =================================================================== --- service/src/gen/thrift/gen-php/ThriftHive.php (revision 0) +++ service/src/gen/thrift/gen-php/ThriftHive.php (revision 0) @@ -0,0 +1,1857 @@ +send_execute($query); + $this->recv_execute(); + } + + public function send_execute($query) + { + $args = new \ThriftHive_execute_args(); + $args->query = $query; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'execute', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('execute', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_execute() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_execute_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 \ThriftHive_execute_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->ex !== null) { + throw $result->ex; + } + return; + } + + public function fetchOne() + { + $this->send_fetchOne(); + return $this->recv_fetchOne(); + } + + public function send_fetchOne() + { + $args = new \ThriftHive_fetchOne_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchOne', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchOne', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchOne() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchOne_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 \ThriftHive_fetchOne_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("fetchOne failed: unknown result"); + } + + public function fetchN($numRows) + { + $this->send_fetchN($numRows); + return $this->recv_fetchN(); + } + + public function send_fetchN($numRows) + { + $args = new \ThriftHive_fetchN_args(); + $args->numRows = $numRows; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchN', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchN', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchN() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchN_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 \ThriftHive_fetchN_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("fetchN failed: unknown result"); + } + + public function fetchAll() + { + $this->send_fetchAll(); + return $this->recv_fetchAll(); + } + + public function send_fetchAll() + { + $args = new \ThriftHive_fetchAll_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchAll', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchAll() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchAll_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 \ThriftHive_fetchAll_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("fetchAll failed: unknown result"); + } + + public function getSchema() + { + $this->send_getSchema(); + return $this->recv_getSchema(); + } + + public function send_getSchema() + { + $args = new \ThriftHive_getSchema_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getSchema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getSchema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getSchema_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 \ThriftHive_getSchema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getSchema failed: unknown result"); + } + + public function getThriftSchema() + { + $this->send_getThriftSchema(); + return $this->recv_getThriftSchema(); + } + + public function send_getThriftSchema() + { + $args = new \ThriftHive_getThriftSchema_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getThriftSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getThriftSchema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getThriftSchema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getThriftSchema_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 \ThriftHive_getThriftSchema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getThriftSchema failed: unknown result"); + } + + public function getClusterStatus() + { + $this->send_getClusterStatus(); + return $this->recv_getClusterStatus(); + } + + public function send_getClusterStatus() + { + $args = new \ThriftHive_getClusterStatus_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getClusterStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getClusterStatus', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getClusterStatus() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getClusterStatus_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 \ThriftHive_getClusterStatus_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getClusterStatus failed: unknown result"); + } + + public function getQueryPlan() + { + $this->send_getQueryPlan(); + return $this->recv_getQueryPlan(); + } + + public function send_getQueryPlan() + { + $args = new \ThriftHive_getQueryPlan_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getQueryPlan', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getQueryPlan', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getQueryPlan() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getQueryPlan_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 \ThriftHive_getQueryPlan_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getQueryPlan failed: unknown result"); + } + + public function clean() + { + $this->send_clean(); + $this->recv_clean(); + } + + public function send_clean() + { + $args = new \ThriftHive_clean_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'clean', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('clean', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_clean() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_clean_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 \ThriftHive_clean_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + return; + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class ThriftHive_execute_args { + static $_TSPEC; + + public $query = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'query', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['query'])) { + $this->query = $vals['query']; + } + } + } + + public function getName() { + return 'ThriftHive_execute_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->query); + } 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('ThriftHive_execute_args'); + if ($this->query !== null) { + $xfer += $output->writeFieldBegin('query', TType::STRING, 1); + $xfer += $output->writeString($this->query); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_execute_result { + static $_TSPEC; + + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_execute_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 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_execute_result'); + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchOne_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_fetchOne_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchOne_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchOne_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchOne_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::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_fetchOne_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchN_args { + static $_TSPEC; + + public $numRows = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'numRows', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['numRows'])) { + $this->numRows = $vals['numRows']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchN_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::I32) { + $xfer += $input->readI32($this->numRows); + } 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('ThriftHive_fetchN_args'); + if ($this->numRows !== null) { + $xfer += $output->writeFieldBegin('numRows', TType::I32, 1); + $xfer += $output->writeI32($this->numRows); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchN_result { + static $_TSPEC; + + public $success = null; + public $ex = 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' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchN_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(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $xfer += $input->readString($elem5); + $this->success []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_fetchN_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 $iter6) + { + $xfer += $output->writeString($iter6); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchAll_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_fetchAll_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchAll_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchAll_result { + static $_TSPEC; + + public $success = null; + public $ex = 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' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchAll_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(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->success []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_fetchAll_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 $iter13) + { + $xfer += $output->writeString($iter13); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getSchema_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getSchema_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getSchema_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getSchema_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Schema', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getSchema_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::STRUCT) { + $this->success = new \metastore\Schema(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getSchema_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getThriftSchema_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getThriftSchema_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getThriftSchema_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getThriftSchema_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Schema', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getThriftSchema_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::STRUCT) { + $this->success = new \metastore\Schema(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getThriftSchema_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getClusterStatus_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getClusterStatus_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getClusterStatus_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getClusterStatus_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\HiveClusterStatus', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getClusterStatus_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::STRUCT) { + $this->success = new \HiveClusterStatus(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getClusterStatus_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getQueryPlan_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getQueryPlan_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getQueryPlan_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\QueryPlan', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getQueryPlan_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::STRUCT) { + $this->success = new \QueryPlan(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getQueryPlan_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_clean_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_clean_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_clean_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_clean_result { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_clean_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_clean_result'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + + Index: service/src/gen/thrift/gen-php/Types.php =================================================================== --- service/src/gen/thrift/gen-php/Types.php (revision 0) +++ service/src/gen/thrift/gen-php/Types.php (revision 0) @@ -0,0 +1,312 @@ + 'INITIALIZING', + 2 => 'RUNNING', + ); +} + +class HiveClusterStatus { + static $_TSPEC; + + public $taskTrackers = null; + public $mapTasks = null; + public $reduceTasks = null; + public $maxMapTasks = null; + public $maxReduceTasks = null; + public $state = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'taskTrackers', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'mapTasks', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'reduceTasks', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'maxMapTasks', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'maxReduceTasks', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['taskTrackers'])) { + $this->taskTrackers = $vals['taskTrackers']; + } + if (isset($vals['mapTasks'])) { + $this->mapTasks = $vals['mapTasks']; + } + if (isset($vals['reduceTasks'])) { + $this->reduceTasks = $vals['reduceTasks']; + } + if (isset($vals['maxMapTasks'])) { + $this->maxMapTasks = $vals['maxMapTasks']; + } + if (isset($vals['maxReduceTasks'])) { + $this->maxReduceTasks = $vals['maxReduceTasks']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + } + } + + public function getName() { + return 'HiveClusterStatus'; + } + + 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::I32) { + $xfer += $input->readI32($this->taskTrackers); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->mapTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->reduceTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxMapTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxReduceTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->state); + } 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('HiveClusterStatus'); + if ($this->taskTrackers !== null) { + $xfer += $output->writeFieldBegin('taskTrackers', TType::I32, 1); + $xfer += $output->writeI32($this->taskTrackers); + $xfer += $output->writeFieldEnd(); + } + if ($this->mapTasks !== null) { + $xfer += $output->writeFieldBegin('mapTasks', TType::I32, 2); + $xfer += $output->writeI32($this->mapTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->reduceTasks !== null) { + $xfer += $output->writeFieldBegin('reduceTasks', TType::I32, 3); + $xfer += $output->writeI32($this->reduceTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxMapTasks !== null) { + $xfer += $output->writeFieldBegin('maxMapTasks', TType::I32, 4); + $xfer += $output->writeI32($this->maxMapTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxReduceTasks !== null) { + $xfer += $output->writeFieldBegin('maxReduceTasks', TType::I32, 5); + $xfer += $output->writeI32($this->maxReduceTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 6); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HiveServerException extends TException { + static $_TSPEC; + + public $message = null; + public $errorCode = null; + public $SQLState = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'errorCode', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'SQLState', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + if (isset($vals['errorCode'])) { + $this->errorCode = $vals['errorCode']; + } + if (isset($vals['SQLState'])) { + $this->SQLState = $vals['SQLState']; + } + } + } + + public function getName() { + return 'HiveServerException'; + } + + 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->message); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->errorCode); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->SQLState); + } 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('HiveServerException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + if ($this->errorCode !== null) { + $xfer += $output->writeFieldBegin('errorCode', TType::I32, 2); + $xfer += $output->writeI32($this->errorCode); + $xfer += $output->writeFieldEnd(); + } + if ($this->SQLState !== null) { + $xfer += $output->writeFieldBegin('SQLState', TType::STRING, 3); + $xfer += $output->writeString($this->SQLState); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + + Index: serde/src/test/org/apache/hadoop/hive/serde2/lazy/TestLazySimpleSerDe.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/lazy/TestLazySimpleSerDe.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/lazy/TestLazySimpleSerDe.java (working copy) @@ -24,7 +24,7 @@ import org.apache.commons.codec.binary.Base64; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.io.ByteWritable; import org.apache.hadoop.hive.serde2.io.DoubleWritable; @@ -51,12 +51,12 @@ LazySimpleSerDe serDe = new LazySimpleSerDe(); Configuration conf = new Configuration(); Properties tbl = new Properties(); - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "abyte,ashort,aint,along,adouble,astring,anullint,anullstring,aba"); tbl.setProperty("columns.types", "tinyint:smallint:int:bigint:double:string:int:string:binary"); - tbl.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "NULL"); + tbl.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL"); serDe.initialize(conf, tbl); // Data @@ -105,12 +105,12 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "abyte,ashort,aint,along,adouble,astring,anullint,anullstring"); tbl.setProperty("columns.types", "tinyint:smallint:int:bigint:double:string:int:string"); - tbl.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "NULL"); + tbl.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL"); return tbl; } @@ -123,7 +123,7 @@ LazySimpleSerDe serDe = new LazySimpleSerDe(); Configuration conf = new Configuration(); Properties tbl = createProperties(); - tbl.setProperty(Constants.SERIALIZATION_LAST_COLUMN_TAKES_REST, "true"); + tbl.setProperty(serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST, "true"); serDe.initialize(conf, tbl); // Data Index: serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/TestBinarySortableSerDe.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/TestBinarySortableSerDe.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/TestBinarySortableSerDe.java (working copy) @@ -26,7 +26,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDe; import org.apache.hadoop.hive.serde2.SerDeUtils; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -63,9 +63,9 @@ private SerDe getSerDe(String fieldNames, String fieldTypes, String order) throws Throwable { Properties schema = new Properties(); - schema.setProperty(Constants.LIST_COLUMNS, fieldNames); - schema.setProperty(Constants.LIST_COLUMN_TYPES, fieldTypes); - schema.setProperty(Constants.SERIALIZATION_SORT_ORDER, order); + schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames); + schema.setProperty(serdeConstants.LIST_COLUMN_TYPES, fieldTypes); + schema.setProperty(serdeConstants.SERIALIZATION_SORT_ORDER, order); BinarySortableSerDe serde = new BinarySortableSerDe(); serde.initialize(new Configuration(), schema); Index: serde/src/test/org/apache/hadoop/hive/serde2/columnar/TestLazyBinaryColumnarSerDe.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/columnar/TestLazyBinaryColumnarSerDe.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/columnar/TestLazyBinaryColumnarSerDe.java (working copy) @@ -28,7 +28,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeUtils; import org.apache.hadoop.hive.serde2.objectinspector.CrossMapEqualComparer; @@ -69,8 +69,8 @@ .getReflectionObjectInspector(OuterStruct.class, ObjectInspectorOptions.JAVA); String cols = ObjectInspectorUtils.getFieldNames(oi); Properties props = new Properties(); - props.setProperty(Constants.LIST_COLUMNS, cols); - props.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); + props.setProperty(serdeConstants.LIST_COLUMNS, cols); + props.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); LazyBinaryColumnarSerDe serde = new LazyBinaryColumnarSerDe(); serde.initialize(new Configuration(), props); @@ -110,8 +110,8 @@ .getReflectionObjectInspector(OuterStruct.class, ObjectInspectorOptions.JAVA); String cols = ObjectInspectorUtils.getFieldNames(oi); Properties props = new Properties(); - props.setProperty(Constants.LIST_COLUMNS, cols); - props.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); + props.setProperty(serdeConstants.LIST_COLUMNS, cols); + props.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); LazyBinaryColumnarSerDe serde = new LazyBinaryColumnarSerDe(); serde.initialize(new Configuration(), props); @@ -145,8 +145,8 @@ .getReflectionObjectInspector(OuterStruct.class, ObjectInspectorOptions.JAVA); String cols = ObjectInspectorUtils.getFieldNames(oi); Properties props = new Properties(); - props.setProperty(Constants.LIST_COLUMNS, cols); - props.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); + props.setProperty(serdeConstants.LIST_COLUMNS, cols); + props.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); LazyBinaryColumnarSerDe serde = new LazyBinaryColumnarSerDe(); serde.initialize(new Configuration(), props); @@ -178,8 +178,8 @@ .getReflectionObjectInspector(OuterStruct.class, ObjectInspectorOptions.JAVA); String cols = ObjectInspectorUtils.getFieldNames(oi); Properties props = new Properties(); - props.setProperty(Constants.LIST_COLUMNS, cols); - props.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); + props.setProperty(serdeConstants.LIST_COLUMNS, cols); + props.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); LazyBinaryColumnarSerDe serde = new LazyBinaryColumnarSerDe(); serde.initialize(new Configuration(), props); @@ -202,8 +202,8 @@ .getReflectionObjectInspector(OuterStruct.class, ObjectInspectorOptions.JAVA); String cols = ObjectInspectorUtils.getFieldNames(oi); Properties props = new Properties(); - props.setProperty(Constants.LIST_COLUMNS, cols); - props.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); + props.setProperty(serdeConstants.LIST_COLUMNS, cols); + props.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi)); LazyBinaryColumnarSerDe serde = new LazyBinaryColumnarSerDe(); serde.initialize(new Configuration(), props); Index: serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java (working copy) @@ -25,7 +25,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.binarysortable.MyTestClass; import org.apache.hadoop.hive.serde2.binarysortable.MyTestInnerStruct; import org.apache.hadoop.hive.serde2.binarysortable.TestBinarySortableSerDe; @@ -129,8 +129,8 @@ String fieldTypes = ObjectInspectorUtils.getFieldTypes(rowOI); Properties schema = new Properties(); - schema.setProperty(Constants.LIST_COLUMNS, fieldNames); - schema.setProperty(Constants.LIST_COLUMN_TYPES, fieldTypes); + schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames); + schema.setProperty(serdeConstants.LIST_COLUMN_TYPES, fieldTypes); LazyBinarySerDe serDe = new LazyBinarySerDe(); serDe.initialize(new Configuration(), schema); @@ -233,12 +233,12 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "abyte,ashort,aint,along,adouble,astring,anullint,anullstring"); tbl.setProperty("columns.types", "tinyint:smallint:int:bigint:double:string:int:string"); - tbl.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "NULL"); + tbl.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL"); return tbl; } Index: serde/src/test/org/apache/hadoop/hive/serde2/TestTCTLSeparatedProtocol.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/TestTCTLSeparatedProtocol.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/TestTCTLSeparatedProtocol.java (working copy) @@ -23,7 +23,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol; import org.apache.thrift.protocol.TField; import org.apache.thrift.protocol.TList; @@ -240,8 +240,8 @@ TMemoryBuffer trans = new TMemoryBuffer(4096); TCTLSeparatedProtocol prot = new TCTLSeparatedProtocol(trans, 4096); Properties schema = new Properties(); - schema.setProperty(Constants.QUOTE_CHAR, "\""); - schema.setProperty(Constants.FIELD_DELIM, ","); + schema.setProperty(serdeConstants.QUOTE_CHAR, "\""); + schema.setProperty(serdeConstants.FIELD_DELIM, ","); prot.initialize(new Configuration(), schema); String testStr = "\"hello, world!\""; @@ -322,10 +322,10 @@ // this is a hacky way of doing the quotes since it will match any 2 of // these, so // "[ hello this is something to split [" would be considered to be quoted. - schema.setProperty(Constants.QUOTE_CHAR, "(\"|\\[|\\])"); + schema.setProperty(serdeConstants.QUOTE_CHAR, "(\"|\\[|\\])"); - schema.setProperty(Constants.FIELD_DELIM, " "); - schema.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "-"); + schema.setProperty(serdeConstants.FIELD_DELIM, " "); + schema.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "-"); prot.initialize(new Configuration(), schema); prot.readStructBegin(); Index: serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/TestLazyBinarySerDe.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/TestLazyBinarySerDe.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/TestLazyBinarySerDe.java (working copy) @@ -29,7 +29,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDe; import org.apache.hadoop.hive.serde2.SerDeUtils; import org.apache.hadoop.hive.serde2.binarysortable.MyTestClass; @@ -90,8 +90,8 @@ */ private SerDe getSerDe(String fieldNames, String fieldTypes) throws Throwable { Properties schema = new Properties(); - schema.setProperty(Constants.LIST_COLUMNS, fieldNames); - schema.setProperty(Constants.LIST_COLUMN_TYPES, fieldTypes); + schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames); + schema.setProperty(serdeConstants.LIST_COLUMN_TYPES, fieldTypes); LazyBinarySerDe serde = new LazyBinarySerDe(); serde.initialize(new Configuration(), schema); Index: serde/src/test/org/apache/hadoop/hive/serde2/dynamic_type/TestDynamicSerDe.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/dynamic_type/TestDynamicSerDe.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/dynamic_type/TestDynamicSerDe.java (working copy) @@ -28,7 +28,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol; import org.apache.hadoop.io.BytesWritable; @@ -110,15 +110,15 @@ System.out.println("Testing protocol: " + protocol); Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, protocol); + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, protocol); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema .setProperty( - Constants.SERIALIZATION_DDL, + serdeConstants.SERIALIZATION_DDL, "struct test { i32 _hello, list 2bye, map another, i32 nhello, double d, double nd}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); HashMap p = additionalParams.get(pp); if (p != null) { @@ -182,15 +182,15 @@ } Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TBinarySortableProtocol.class .getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, "test"); - schema.setProperty(Constants.SERIALIZATION_DDL, ddl); - schema.setProperty(Constants.SERIALIZATION_LIB, DynamicSerDe.class + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); + schema.setProperty(serdeConstants.SERIALIZATION_DDL, ddl); + schema.setProperty(serdeConstants.SERIALIZATION_LIB, DynamicSerDe.class .getName()); - schema.setProperty(Constants.SERIALIZATION_SORT_ORDER, order); + schema.setProperty(serdeConstants.SERIALIZATION_SORT_ORDER, order); DynamicSerDe serde = new DynamicSerDe(); serde.initialize(new Configuration(), schema); @@ -417,22 +417,22 @@ struct.add(another); Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class .getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema - .setProperty(Constants.SERIALIZATION_DDL, + .setProperty(serdeConstants.SERIALIZATION_DDL, "struct test { i32 hello, list bye, map another}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); - schema.setProperty(Constants.FIELD_DELIM, "9"); - schema.setProperty(Constants.COLLECTION_DELIM, "1"); - schema.setProperty(Constants.LINE_DELIM, "2"); - schema.setProperty(Constants.MAPKEY_DELIM, "4"); + schema.setProperty(serdeConstants.FIELD_DELIM, "9"); + schema.setProperty(serdeConstants.COLLECTION_DELIM, "1"); + schema.setProperty(serdeConstants.LINE_DELIM, "2"); + schema.setProperty(serdeConstants.MAPKEY_DELIM, "4"); DynamicSerDe serde = new DynamicSerDe(); serde.initialize(new Configuration(), schema); @@ -494,16 +494,16 @@ struct.add(another); Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class .getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema - .setProperty(Constants.SERIALIZATION_DDL, + .setProperty(serdeConstants.SERIALIZATION_DDL, "struct test { i32 hello, list bye, map another}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "true"); @@ -544,16 +544,16 @@ struct.add(another); Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class .getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema - .setProperty(Constants.SERIALIZATION_DDL, + .setProperty(serdeConstants.SERIALIZATION_DDL, "struct test { i32 hello, list bye, map another}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "true"); @@ -602,16 +602,16 @@ struct.add(another); Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class .getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema - .setProperty(Constants.SERIALIZATION_DDL, + .setProperty(serdeConstants.SERIALIZATION_DDL, "struct test { i32 hello, list bye, map another}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "true"); @@ -660,16 +660,16 @@ struct.add(another); Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class .getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema - .setProperty(Constants.SERIALIZATION_DDL, + .setProperty(serdeConstants.SERIALIZATION_DDL, "struct test { i32 hello, list bye, map another}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "false"); @@ -712,17 +712,17 @@ try { Properties schema = new Properties(); - // schema.setProperty(Constants.SERIALIZATION_FORMAT, + // schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, // org.apache.thrift.protocol.TJSONProtocol.class.getName()); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.thrift.protocol.TBinaryProtocol.class.getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema.setProperty( - Constants.SERIALIZATION_DDL, + serdeConstants.SERIALIZATION_DDL, "struct inner { i32 field1, string field2 },struct test {inner foo, i32 hello, list bye, map another}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); // @@ -790,22 +790,22 @@ struct.add(another); Properties schema = new Properties(); - schema.setProperty(Constants.SERIALIZATION_FORMAT, + schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class .getName()); schema.setProperty( - org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test"); schema - .setProperty(Constants.SERIALIZATION_DDL, + .setProperty(serdeConstants.SERIALIZATION_DDL, "struct test { i32 hello, list bye, map another}"); - schema.setProperty(Constants.SERIALIZATION_LIB, new DynamicSerDe() + schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe() .getClass().toString()); - schema.setProperty(Constants.FIELD_DELIM, "9"); - schema.setProperty(Constants.COLLECTION_DELIM, "1"); - schema.setProperty(Constants.LINE_DELIM, "2"); - schema.setProperty(Constants.MAPKEY_DELIM, "4"); + schema.setProperty(serdeConstants.FIELD_DELIM, "9"); + schema.setProperty(serdeConstants.COLLECTION_DELIM, "1"); + schema.setProperty(serdeConstants.LINE_DELIM, "2"); + schema.setProperty(serdeConstants.MAPKEY_DELIM, "4"); DynamicSerDe serde = new DynamicSerDe(); serde.initialize(new Configuration(), schema); @@ -831,7 +831,7 @@ assertTrue(compare.equals(new String(bytes.get(), 0, bytes.getSize()))); schema - .setProperty(Constants.SERIALIZATION_DDL, + .setProperty(serdeConstants.SERIALIZATION_DDL, "struct test { i32 hello, skip list bye, map another}"); serde.initialize(new Configuration(), schema); Index: serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestCrossMapEqualComparer.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestCrossMapEqualComparer.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestCrossMapEqualComparer.java (working copy) @@ -23,7 +23,7 @@ import java.util.TreeMap; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.ByteStream; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; @@ -96,8 +96,8 @@ LazySimpleSerDe serde = new LazySimpleSerDe(); Configuration conf = new Configuration(); Properties tbl = new Properties(); - tbl.setProperty(Constants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); SerDeParameters serdeParams = LazySimpleSerDe.initSerdeParams(conf, tbl, LazySimpleSerDe.class.getName()); serde.initialize(conf, tbl); @@ -150,8 +150,8 @@ LazySimpleSerDe serde = new LazySimpleSerDe(); Configuration conf = new Configuration(); Properties tbl = new Properties(); - tbl.setProperty(Constants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); SerDeParameters serdeParams = LazySimpleSerDe.initSerdeParams(conf, tbl, LazySimpleSerDe.class.getName()); serde.initialize(conf, tbl); Index: serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestSimpleMapEqualComparer.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestSimpleMapEqualComparer.java (revision 1406838) +++ serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestSimpleMapEqualComparer.java (working copy) @@ -23,7 +23,7 @@ import java.util.TreeMap; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.ByteStream; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; @@ -96,8 +96,8 @@ LazySimpleSerDe serde = new LazySimpleSerDe(); Configuration conf = new Configuration(); Properties tbl = new Properties(); - tbl.setProperty(Constants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); SerDeParameters serdeParams = LazySimpleSerDe.initSerdeParams(conf, tbl, LazySimpleSerDe.class.getName()); serde.initialize(conf, tbl); @@ -150,8 +150,8 @@ LazySimpleSerDe serde = new LazySimpleSerDe(); Configuration conf = new Configuration(); Properties tbl = new Properties(); - tbl.setProperty(Constants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); - tbl.setProperty(Constants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMNS, ObjectInspectorUtils.getFieldNames(oi1)); + tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, ObjectInspectorUtils.getFieldTypes(oi1)); SerDeParameters serdeParams = LazySimpleSerDe.initSerdeParams(conf, tbl, LazySimpleSerDe.class.getName()); serde.initialize(conf, tbl); Index: serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java (working copy) @@ -28,7 +28,7 @@ import java.util.Properties; import org.apache.commons.codec.binary.Base64; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.SerDeParameters; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; @@ -315,9 +315,9 @@ public static void extractColumnInfo(Properties tbl, SerDeParameters serdeParams, String serdeName) throws SerDeException { // Read the configuration parameters - String columnNameProperty = tbl.getProperty(Constants.LIST_COLUMNS); + String columnNameProperty = tbl.getProperty(serdeConstants.LIST_COLUMNS); // NOTE: if "columns.types" is missing, all columns will be of String type - String columnTypeProperty = tbl.getProperty(Constants.LIST_COLUMN_TYPES); + String columnTypeProperty = tbl.getProperty(serdeConstants.LIST_COLUMN_TYPES); // Parse the configuration parameters @@ -333,7 +333,7 @@ if (i > 0) { sb.append(":"); } - sb.append(Constants.STRING_TYPE_NAME); + sb.append(serdeConstants.STRING_TYPE_NAME); } columnTypeProperty = sb.toString(); } Index: serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe.java (working copy) @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.ByteStream; import org.apache.hadoop.hive.serde2.SerDe; import org.apache.hadoop.hive.serde2.SerDeException; @@ -212,22 +212,22 @@ // should change this when we allow users to specify more than 10 levels // of separators through DDL. serdeParams.separators = new byte[8]; - serdeParams.separators[0] = getByte(tbl.getProperty(Constants.FIELD_DELIM, - tbl.getProperty(Constants.SERIALIZATION_FORMAT)), DefaultSeparators[0]); + serdeParams.separators[0] = getByte(tbl.getProperty(serdeConstants.FIELD_DELIM, + tbl.getProperty(serdeConstants.SERIALIZATION_FORMAT)), DefaultSeparators[0]); serdeParams.separators[1] = getByte(tbl - .getProperty(Constants.COLLECTION_DELIM), DefaultSeparators[1]); + .getProperty(serdeConstants.COLLECTION_DELIM), DefaultSeparators[1]); serdeParams.separators[2] = getByte( - tbl.getProperty(Constants.MAPKEY_DELIM), DefaultSeparators[2]); + tbl.getProperty(serdeConstants.MAPKEY_DELIM), DefaultSeparators[2]); for (int i = 3; i < serdeParams.separators.length; i++) { serdeParams.separators[i] = (byte) (i + 1); } serdeParams.nullString = tbl.getProperty( - Constants.SERIALIZATION_NULL_FORMAT, "\\N"); + serdeConstants.SERIALIZATION_NULL_FORMAT, "\\N"); serdeParams.nullSequence = new Text(serdeParams.nullString); String lastColumnTakesRestString = tbl - .getProperty(Constants.SERIALIZATION_LAST_COLUMN_TAKES_REST); + .getProperty(serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST); serdeParams.lastColumnTakesRest = (lastColumnTakesRestString != null && lastColumnTakesRestString .equalsIgnoreCase("true")); @@ -238,7 +238,7 @@ serdeParams.columnNames, serdeParams.columnTypes); // Get the escape information - String escapeProperty = tbl.getProperty(Constants.ESCAPE_CHAR); + String escapeProperty = tbl.getProperty(serdeConstants.ESCAPE_CHAR); serdeParams.escaped = (escapeProperty != null); if (serdeParams.escaped) { serdeParams.escapeChar = getByte(escapeProperty, (byte) '\\'); Index: serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/LazyListObjectInspector.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/LazyListObjectInspector.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/LazyListObjectInspector.java (working copy) @@ -98,7 +98,7 @@ @Override public String getTypeName() { - return org.apache.hadoop.hive.serde.Constants.LIST_TYPE_NAME + "<" + return org.apache.hadoop.hive.serde.serdeConstants.LIST_TYPE_NAME + "<" + listElementObjectInspector.getTypeName() + ">"; } Index: serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/LazyMapObjectInspector.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/LazyMapObjectInspector.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/lazy/objectinspector/LazyMapObjectInspector.java (working copy) @@ -71,7 +71,7 @@ @Override public String getTypeName() { - return org.apache.hadoop.hive.serde.Constants.MAP_TYPE_NAME + "<" + return org.apache.hadoop.hive.serde.serdeConstants.MAP_TYPE_NAME + "<" + mapKeyObjectInspector.getTypeName() + "," + mapValueObjectInspector.getTypeName() + ">"; } Index: serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java (working copy) @@ -29,7 +29,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDe; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeStats; @@ -112,8 +112,8 @@ throws SerDeException { // Get column names and sort order - String columnNameProperty = tbl.getProperty(Constants.LIST_COLUMNS); - String columnTypeProperty = tbl.getProperty(Constants.LIST_COLUMN_TYPES); + String columnNameProperty = tbl.getProperty(serdeConstants.LIST_COLUMNS); + String columnTypeProperty = tbl.getProperty(serdeConstants.LIST_COLUMN_TYPES); if (columnNameProperty.length() == 0) { columnNames = new ArrayList(); } else { @@ -138,7 +138,7 @@ // Get the sort order String columnSortOrder = tbl - .getProperty(Constants.SERIALIZATION_SORT_ORDER); + .getProperty(serdeConstants.SERIALIZATION_SORT_ORDER); columnSortOrderIsDesc = new boolean[columnNames.size()]; for (int i = 0; i < columnSortOrderIsDesc.length; i++) { columnSortOrderIsDesc[i] = (columnSortOrder != null && columnSortOrder Index: serde/src/java/org/apache/hadoop/hive/serde2/MetadataTypedColumnsetSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/MetadataTypedColumnsetSerDe.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/MetadataTypedColumnsetSerDe.java (working copy) @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.MetadataListStructObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory; @@ -96,14 +96,14 @@ } public void initialize(Configuration job, Properties tbl) throws SerDeException { - String altSep = tbl.getProperty(Constants.SERIALIZATION_FORMAT); + String altSep = tbl.getProperty(serdeConstants.SERIALIZATION_FORMAT); separator = getByteValue(altSep, DefaultSeparator); - String altNull = tbl.getProperty(Constants.SERIALIZATION_NULL_FORMAT); + String altNull = tbl.getProperty(serdeConstants.SERIALIZATION_NULL_FORMAT); nullString = getByteValue(altNull, defaultNullString); String columnProperty = tbl.getProperty("columns"); - String serdeName = tbl.getProperty(Constants.SERIALIZATION_LIB); + String serdeName = tbl.getProperty(serdeConstants.SERIALIZATION_LIB); // tables that were serialized with columnsetSerDe doesn't have metadata // so this hack applies to all such tables boolean columnsetSerDe = false; @@ -125,7 +125,7 @@ } String lastColumnTakesRestString = tbl - .getProperty(Constants.SERIALIZATION_LAST_COLUMN_TAKES_REST); + .getProperty(serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST); lastColumnTakesRest = (lastColumnTakesRestString != null && lastColumnTakesRestString .equalsIgnoreCase("true")); splitLimit = (lastColumnTakesRest && columnNames != null) ? columnNames Index: serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java (working copy) @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.ByteStream; import org.apache.hadoop.hive.serde2.ByteStream.Output; import org.apache.hadoop.hive.serde2.SerDe; @@ -94,8 +94,8 @@ public void initialize(Configuration conf, Properties tbl) throws SerDeException { // Get column names and types - String columnNameProperty = tbl.getProperty(Constants.LIST_COLUMNS); - String columnTypeProperty = tbl.getProperty(Constants.LIST_COLUMN_TYPES); + String columnNameProperty = tbl.getProperty(serdeConstants.LIST_COLUMNS); + String columnTypeProperty = tbl.getProperty(serdeConstants.LIST_COLUMN_TYPES); if (columnNameProperty.length() == 0) { columnNames = new ArrayList(); } else { Index: serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java (working copy) @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.ByteStream; import org.apache.hadoop.hive.serde2.SerDe; import org.apache.hadoop.hive.serde2.SerDeException; @@ -76,7 +76,7 @@ public void initialize(Configuration job, Properties tbl) throws SerDeException { try { - String ddl = tbl.getProperty(Constants.SERIALIZATION_DDL); + String ddl = tbl.getProperty(serdeConstants.SERIALIZATION_DDL); // type_name used to be tbl.getProperty(META_TABLE_NAME). // However, now the value is DBName.TableName. To make it backward compatible, // we take the TableName part as type_name. @@ -88,7 +88,7 @@ } else { type_name = tableName; } - String protoName = tbl.getProperty(Constants.SERIALIZATION_FORMAT); + String protoName = tbl.getProperty(serdeConstants.SERIALIZATION_FORMAT); if (protoName == null) { protoName = "org.apache.thrift.protocol.TBinaryProtocol"; Index: serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeList.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeList.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeList.java (working copy) @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.List; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -70,7 +70,7 @@ @Override public String toString() { - return Constants.LIST_TYPE_NAME + "<" + getElementType().toString() + ">"; + return serdeConstants.LIST_TYPE_NAME + "<" + getElementType().toString() + ">"; } @Override Index: serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardMapObjectInspector.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardMapObjectInspector.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardMapObjectInspector.java (working copy) @@ -88,7 +88,7 @@ } public String getTypeName() { - return org.apache.hadoop.hive.serde.Constants.MAP_TYPE_NAME + "<" + return org.apache.hadoop.hive.serde.serdeConstants.MAP_TYPE_NAME + "<" + mapKeyObjectInspector.getTypeName() + "," + mapValueObjectInspector.getTypeName() + ">"; } Index: serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardListObjectInspector.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardListObjectInspector.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardListObjectInspector.java (working copy) @@ -102,7 +102,7 @@ } public String getTypeName() { - return org.apache.hadoop.hive.serde.Constants.LIST_TYPE_NAME + "<" + return org.apache.hadoop.hive.serde.serdeConstants.LIST_TYPE_NAME + "<" + listElementObjectInspector.getTypeName() + ">"; } Index: serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java (working copy) @@ -29,7 +29,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.io.TimestampWritable; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.ObjectInspectorOptions; @@ -312,7 +312,7 @@ public static String getStandardUnionTypeName(UnionObjectInspector uoi) { StringBuilder sb = new StringBuilder(); - sb.append(Constants.UNION_TYPE_NAME + "<"); + sb.append(serdeConstants.UNION_TYPE_NAME + "<"); List ois = uoi.getObjectInspectors(); for(int i = 0; i < ois.size(); i++) { if (i > 0) { Index: serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java (working copy) @@ -25,7 +25,7 @@ import java.util.HashMap; import java.util.Map; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.io.ByteWritable; import org.apache.hadoop.hive.serde2.io.DoubleWritable; import org.apache.hadoop.hive.serde2.io.ShortWritable; @@ -144,39 +144,39 @@ } public static final PrimitiveTypeEntry binaryTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.BINARY, Constants.BINARY_TYPE_NAME, byte[].class, + PrimitiveCategory.BINARY, serdeConstants.BINARY_TYPE_NAME, byte[].class, byte[].class, BytesWritable.class); public static final PrimitiveTypeEntry stringTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.STRING, Constants.STRING_TYPE_NAME, null, String.class, + PrimitiveCategory.STRING, serdeConstants.STRING_TYPE_NAME, null, String.class, Text.class); public static final PrimitiveTypeEntry booleanTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.BOOLEAN, Constants.BOOLEAN_TYPE_NAME, Boolean.TYPE, + PrimitiveCategory.BOOLEAN, serdeConstants.BOOLEAN_TYPE_NAME, Boolean.TYPE, Boolean.class, BooleanWritable.class); public static final PrimitiveTypeEntry intTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.INT, Constants.INT_TYPE_NAME, Integer.TYPE, + PrimitiveCategory.INT, serdeConstants.INT_TYPE_NAME, Integer.TYPE, Integer.class, IntWritable.class); public static final PrimitiveTypeEntry longTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.LONG, Constants.BIGINT_TYPE_NAME, Long.TYPE, + PrimitiveCategory.LONG, serdeConstants.BIGINT_TYPE_NAME, Long.TYPE, Long.class, LongWritable.class); public static final PrimitiveTypeEntry floatTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.FLOAT, Constants.FLOAT_TYPE_NAME, Float.TYPE, + PrimitiveCategory.FLOAT, serdeConstants.FLOAT_TYPE_NAME, Float.TYPE, Float.class, FloatWritable.class); public static final PrimitiveTypeEntry voidTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.VOID, Constants.VOID_TYPE_NAME, Void.TYPE, Void.class, + PrimitiveCategory.VOID, serdeConstants.VOID_TYPE_NAME, Void.TYPE, Void.class, NullWritable.class); // No corresponding Writable classes for the following 3 in hadoop 0.17.0 public static final PrimitiveTypeEntry doubleTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.DOUBLE, Constants.DOUBLE_TYPE_NAME, Double.TYPE, + PrimitiveCategory.DOUBLE, serdeConstants.DOUBLE_TYPE_NAME, Double.TYPE, Double.class, DoubleWritable.class); public static final PrimitiveTypeEntry byteTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.BYTE, Constants.TINYINT_TYPE_NAME, Byte.TYPE, + PrimitiveCategory.BYTE, serdeConstants.TINYINT_TYPE_NAME, Byte.TYPE, Byte.class, ByteWritable.class); public static final PrimitiveTypeEntry shortTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.SHORT, Constants.SMALLINT_TYPE_NAME, Short.TYPE, + PrimitiveCategory.SHORT, serdeConstants.SMALLINT_TYPE_NAME, Short.TYPE, Short.class, ShortWritable.class); public static final PrimitiveTypeEntry timestampTypeEntry = new PrimitiveTypeEntry( - PrimitiveCategory.TIMESTAMP, Constants.TIMESTAMP_TYPE_NAME, null, + PrimitiveCategory.TIMESTAMP, serdeConstants.TIMESTAMP_TYPE_NAME, null, Object.class, TimestampWritable.class); // The following is a complex type for special handling Index: serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/StructTypeInfo.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/StructTypeInfo.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/StructTypeInfo.java (working copy) @@ -23,7 +23,7 @@ import java.util.Iterator; import java.util.List; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; /** @@ -50,7 +50,7 @@ @Override public String getTypeName() { StringBuilder sb = new StringBuilder(); - sb.append(Constants.STRUCT_TYPE_NAME + "<"); + sb.append(serdeConstants.STRUCT_TYPE_NAME + "<"); for (int i = 0; i < allStructFieldNames.size(); i++) { if (i > 0) { sb.append(","); Index: serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java (working copy) @@ -22,7 +22,7 @@ import java.util.HashMap; import java.util.List; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils; /** @@ -53,17 +53,17 @@ return result; } - public static final TypeInfo voidTypeInfo = getPrimitiveTypeInfo(Constants.VOID_TYPE_NAME); - public static final TypeInfo booleanTypeInfo = getPrimitiveTypeInfo(Constants.BOOLEAN_TYPE_NAME); - public static final TypeInfo intTypeInfo = getPrimitiveTypeInfo(Constants.INT_TYPE_NAME); - public static final TypeInfo longTypeInfo = getPrimitiveTypeInfo(Constants.BIGINT_TYPE_NAME); - public static final TypeInfo stringTypeInfo = getPrimitiveTypeInfo(Constants.STRING_TYPE_NAME); - public static final TypeInfo floatTypeInfo = getPrimitiveTypeInfo(Constants.FLOAT_TYPE_NAME); - public static final TypeInfo doubleTypeInfo = getPrimitiveTypeInfo(Constants.DOUBLE_TYPE_NAME); - public static final TypeInfo byteTypeInfo = getPrimitiveTypeInfo(Constants.TINYINT_TYPE_NAME); - public static final TypeInfo shortTypeInfo = getPrimitiveTypeInfo(Constants.SMALLINT_TYPE_NAME); - public static final TypeInfo timestampTypeInfo = getPrimitiveTypeInfo(Constants.TIMESTAMP_TYPE_NAME); - public static final TypeInfo binaryTypeInfo = getPrimitiveTypeInfo(Constants.BINARY_TYPE_NAME); + public static final TypeInfo voidTypeInfo = getPrimitiveTypeInfo(serdeConstants.VOID_TYPE_NAME); + public static final TypeInfo booleanTypeInfo = getPrimitiveTypeInfo(serdeConstants.BOOLEAN_TYPE_NAME); + public static final TypeInfo intTypeInfo = getPrimitiveTypeInfo(serdeConstants.INT_TYPE_NAME); + public static final TypeInfo longTypeInfo = getPrimitiveTypeInfo(serdeConstants.BIGINT_TYPE_NAME); + public static final TypeInfo stringTypeInfo = getPrimitiveTypeInfo(serdeConstants.STRING_TYPE_NAME); + public static final TypeInfo floatTypeInfo = getPrimitiveTypeInfo(serdeConstants.FLOAT_TYPE_NAME); + public static final TypeInfo doubleTypeInfo = getPrimitiveTypeInfo(serdeConstants.DOUBLE_TYPE_NAME); + public static final TypeInfo byteTypeInfo = getPrimitiveTypeInfo(serdeConstants.TINYINT_TYPE_NAME); + public static final TypeInfo shortTypeInfo = getPrimitiveTypeInfo(serdeConstants.SMALLINT_TYPE_NAME); + public static final TypeInfo timestampTypeInfo = getPrimitiveTypeInfo(serdeConstants.TIMESTAMP_TYPE_NAME); + public static final TypeInfo binaryTypeInfo = getPrimitiveTypeInfo(serdeConstants.BINARY_TYPE_NAME); public static final TypeInfo unknownTypeInfo = getPrimitiveTypeInfo("unknown"); Index: serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/UnionTypeInfo.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/UnionTypeInfo.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/UnionTypeInfo.java (working copy) @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.List; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; /** @@ -47,7 +47,7 @@ @Override public String getTypeName() { StringBuilder sb = new StringBuilder(); - sb.append(Constants.UNION_TYPE_NAME + "<"); + sb.append(serdeConstants.UNION_TYPE_NAME + "<"); for (int i = 0; i < allUnionObjectTypeInfos.size(); i++) { if (i > 0) { sb.append(","); Index: serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/ListTypeInfo.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/ListTypeInfo.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/ListTypeInfo.java (working copy) @@ -42,7 +42,7 @@ @Override public String getTypeName() { - return org.apache.hadoop.hive.serde.Constants.LIST_TYPE_NAME + "<" + return org.apache.hadoop.hive.serde.serdeConstants.LIST_TYPE_NAME + "<" + listElementTypeInfo.getTypeName() + ">"; } Index: serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/MapTypeInfo.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/MapTypeInfo.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/MapTypeInfo.java (working copy) @@ -46,7 +46,7 @@ @Override public String getTypeName() { - return org.apache.hadoop.hive.serde.Constants.MAP_TYPE_NAME + "<" + return org.apache.hadoop.hive.serde.serdeConstants.MAP_TYPE_NAME + "<" + mapKeyTypeInfo.getTypeName() + "," + mapValueTypeInfo.getTypeName() + ">"; } Index: serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java (working copy) @@ -27,7 +27,7 @@ import java.util.List; import java.util.Map; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -291,10 +291,10 @@ } Token t = typeInfoTokens.get(iToken); if (item.equals("type")) { - if (!Constants.LIST_TYPE_NAME.equals(t.text) - && !Constants.MAP_TYPE_NAME.equals(t.text) - && !Constants.STRUCT_TYPE_NAME.equals(t.text) - && !Constants.UNION_TYPE_NAME.equals(t.text) + if (!serdeConstants.LIST_TYPE_NAME.equals(t.text) + && !serdeConstants.MAP_TYPE_NAME.equals(t.text) + && !serdeConstants.STRUCT_TYPE_NAME.equals(t.text) + && !serdeConstants.UNION_TYPE_NAME.equals(t.text) && null == PrimitiveObjectInspectorUtils .getTypeEntryFromTypeName(t.text) && !t.text.equals(alternative)) { @@ -332,7 +332,7 @@ } // Is this a list type? - if (Constants.LIST_TYPE_NAME.equals(t.text)) { + if (serdeConstants.LIST_TYPE_NAME.equals(t.text)) { expect("<"); TypeInfo listElementType = parseType(); expect(">"); @@ -340,7 +340,7 @@ } // Is this a map type? - if (Constants.MAP_TYPE_NAME.equals(t.text)) { + if (serdeConstants.MAP_TYPE_NAME.equals(t.text)) { expect("<"); TypeInfo mapKeyType = parseType(); expect(","); @@ -350,7 +350,7 @@ } // Is this a struct type? - if (Constants.STRUCT_TYPE_NAME.equals(t.text)) { + if (serdeConstants.STRUCT_TYPE_NAME.equals(t.text)) { ArrayList fieldNames = new ArrayList(); ArrayList fieldTypeInfos = new ArrayList(); boolean first = true; @@ -374,7 +374,7 @@ return TypeInfoFactory.getStructTypeInfo(fieldNames, fieldTypeInfos); } // Is this a union type? - if (Constants.UNION_TYPE_NAME.equals(t.text)) { + if (serdeConstants.UNION_TYPE_NAME.equals(t.text)) { List objectTypeInfos = new ArrayList(); boolean first = true; do { Index: serde/src/java/org/apache/hadoop/hive/serde2/DelimitedJSONSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/DelimitedJSONSerDe.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/DelimitedJSONSerDe.java (working copy) @@ -22,7 +22,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; @@ -54,7 +54,7 @@ @Override protected void serializeField(ByteStream.Output out, Object obj, ObjectInspector objInspector, SerDeParameters serdeParams) throws SerDeException { - if (!objInspector.getCategory().equals(Category.PRIMITIVE) || (objInspector.getTypeName().equalsIgnoreCase(Constants.BINARY_TYPE_NAME))) { + if (!objInspector.getCategory().equals(Category.PRIMITIVE) || (objInspector.getTypeName().equalsIgnoreCase(serdeConstants.BINARY_TYPE_NAME))) { try { serialize(out, SerDeUtils.getJSONString(obj, objInspector), PrimitiveObjectInspectorFactory.javaStringObjectInspector, serdeParams.getSeparators(), Index: serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java (working copy) @@ -31,7 +31,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.io.Text; import org.apache.thrift.TException; import org.apache.thrift.protocol.TField; @@ -443,21 +443,21 @@ */ public void initialize(Configuration conf, Properties tbl) throws TException { - primarySeparator = getByteValue(tbl.getProperty(Constants.FIELD_DELIM), + primarySeparator = getByteValue(tbl.getProperty(serdeConstants.FIELD_DELIM), primarySeparator); secondarySeparator = getByteValue(tbl - .getProperty(Constants.COLLECTION_DELIM), secondarySeparator); - rowSeparator = getByteValue(tbl.getProperty(Constants.LINE_DELIM), + .getProperty(serdeConstants.COLLECTION_DELIM), secondarySeparator); + rowSeparator = getByteValue(tbl.getProperty(serdeConstants.LINE_DELIM), rowSeparator); - mapSeparator = getByteValue(tbl.getProperty(Constants.MAPKEY_DELIM), + mapSeparator = getByteValue(tbl.getProperty(serdeConstants.MAPKEY_DELIM), mapSeparator); returnNulls = Boolean.valueOf( tbl.getProperty(ReturnNullsKey, String.valueOf(returnNulls))) .booleanValue(); bufferSize = Integer.valueOf( tbl.getProperty(BufferSizeKey, String.valueOf(bufferSize))).intValue(); - nullString = tbl.getProperty(Constants.SERIALIZATION_NULL_FORMAT, "\\N"); - quote = tbl.getProperty(Constants.QUOTE_CHAR, null); + nullString = tbl.getProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "\\N"); + quote = tbl.getProperty(serdeConstants.QUOTE_CHAR, null); internalInitialize(); Index: serde/src/java/org/apache/hadoop/hive/serde2/thrift/ThriftDeserializer.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/thrift/ThriftDeserializer.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/ThriftDeserializer.java (working copy) @@ -47,11 +47,11 @@ // per Table basis String className = tbl - .getProperty(org.apache.hadoop.hive.serde.Constants.SERIALIZATION_CLASS); + .getProperty(org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_CLASS); Class recordClass = job.getClassByName(className); String protoName = tbl - .getProperty(org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT); + .getProperty(org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT); if (protoName == null) { protoName = "TBinaryProtocol"; } Index: serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java (working copy) @@ -26,7 +26,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.io.Text; import org.apache.thrift.TException; import org.apache.thrift.protocol.TField; @@ -116,14 +116,14 @@ boolean ascending; public void initialize(Configuration conf, Properties tbl) throws TException { - sortOrder = tbl.getProperty(Constants.SERIALIZATION_SORT_ORDER); + sortOrder = tbl.getProperty(serdeConstants.SERIALIZATION_SORT_ORDER); if (sortOrder == null) { sortOrder = ""; } for (int i = 0; i < sortOrder.length(); i++) { char c = sortOrder.charAt(i); if (c != '+' && c != '-') { - throw new TException(Constants.SERIALIZATION_SORT_ORDER + throw new TException(serdeConstants.SERIALIZATION_SORT_ORDER + " should be a string consists of only '+' and '-'!"); } } Index: serde/src/java/org/apache/hadoop/hive/serde2/RegexSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/RegexSerDe.java (revision 1406838) +++ serde/src/java/org/apache/hadoop/hive/serde2/RegexSerDe.java (working copy) @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; @@ -82,8 +82,8 @@ // Read the configuration parameters inputRegex = tbl.getProperty("input.regex"); - String columnNameProperty = tbl.getProperty(Constants.LIST_COLUMNS); - String columnTypeProperty = tbl.getProperty(Constants.LIST_COLUMN_TYPES); + String columnNameProperty = tbl.getProperty(serdeConstants.LIST_COLUMNS); + String columnTypeProperty = tbl.getProperty(serdeConstants.LIST_COLUMN_TYPES); boolean inputRegexIgnoreCase = "true".equalsIgnoreCase(tbl .getProperty("input.regex.case.insensitive")); Index: serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py =================================================================== --- serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py (revision 1406838) +++ serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol Index: serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py =================================================================== --- serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py (revision 1406838) +++ serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * SERIALIZATION_LIB = "serialization.lib" Index: serde/src/gen/thrift/gen-py/__init__.py =================================================================== Index: serde/src/gen/thrift/gen-cpp/serde_constants.cpp =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_constants.cpp (revision 1406838) +++ serde/src/gen/thrift/gen-cpp/serde_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "serde_constants.h" Index: serde/src/gen/thrift/gen-cpp/serde_constants.h =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_constants.h (revision 1406838) +++ serde/src/gen/thrift/gen-cpp/serde_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef serde_CONSTANTS_H #define serde_CONSTANTS_H Index: serde/src/gen/thrift/gen-cpp/serde_types.cpp =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_types.cpp (revision 1406838) +++ serde/src/gen/thrift/gen-cpp/serde_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "serde_types.h" +#include + namespace Hive { } // namespace Index: serde/src/gen/thrift/gen-cpp/serde_types.h =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_types.h (revision 1406838) +++ serde/src/gen/thrift/gen-cpp/serde_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef serde_TYPES_H #define serde_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include Index: serde/src/gen/thrift/gen-rb/serde_constants.rb =================================================================== --- serde/src/gen/thrift/gen-rb/serde_constants.rb (revision 1406838) +++ serde/src/gen/thrift/gen-rb/serde_constants.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'serde_types' SERIALIZATION_LIB = %q"serialization.lib" Index: serde/src/gen/thrift/gen-rb/serde_types.rb =================================================================== --- serde/src/gen/thrift/gen-rb/serde_types.rb (revision 1406838) +++ serde/src/gen/thrift/gen-rb/serde_types.rb (working copy) @@ -1,7 +1,8 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -25,6 +35,12 @@ private static final org.apache.thrift.protocol.TField FIELD0_FIELD_DESC = new org.apache.thrift.protocol.TField("field0", org.apache.thrift.protocol.TType.I32, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InnerStructStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InnerStructTupleSchemeFactory()); + } + private int field0; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,8 +103,7 @@ // isset id assignments private static final int __FIELD0_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -113,8 +128,7 @@ * Performs a deep copy on other. */ public InnerStruct(InnerStruct other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.field0 = other.field0; } @@ -138,16 +152,16 @@ } public void unsetField0() { - __isset_bit_vector.clear(__FIELD0_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FIELD0_ISSET_ID); } /** Returns true if field field0 is set (has been assigned a value) and false otherwise */ public boolean isSetField0() { - return __isset_bit_vector.get(__FIELD0_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __FIELD0_ISSET_ID); } public void setField0IsSet(boolean value) { - __isset_bit_vector.set(__FIELD0_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FIELD0_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -241,41 +255,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // FIELD0 - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.field0 = iprot.readI32(); - setField0IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD0_FIELD_DESC); - oprot.writeI32(this.field0); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -292,6 +276,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -305,12 +290,92 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class InnerStructStandardSchemeFactory implements SchemeFactory { + public InnerStructStandardScheme getScheme() { + return new InnerStructStandardScheme(); + } + } + + private static class InnerStructStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InnerStruct struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FIELD0 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.field0 = iprot.readI32(); + struct.setField0IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InnerStruct struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD0_FIELD_DESC); + oprot.writeI32(struct.field0); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InnerStructTupleSchemeFactory implements SchemeFactory { + public InnerStructTupleScheme getScheme() { + return new InnerStructTupleScheme(); + } + } + + private static class InnerStructTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InnerStruct struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetField0()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetField0()) { + oprot.writeI32(struct.field0); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InnerStruct struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.field0 = iprot.readI32(); + struct.setField0IsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField FIELD2_FIELD_DESC = new org.apache.thrift.protocol.TField("field2", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField FIELD3_FIELD_DESC = new org.apache.thrift.protocol.TField("field3", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ThriftTestObjStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ThriftTestObjTupleSchemeFactory()); + } + private int field1; // required private String field2; // required private List field3; // required @@ -97,8 +113,7 @@ // isset id assignments private static final int __FIELD1_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -132,8 +147,7 @@ * Performs a deep copy on other. */ public ThriftTestObj(ThriftTestObj other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.field1 = other.field1; if (other.isSetField2()) { this.field2 = other.field2; @@ -169,16 +183,16 @@ } public void unsetField1() { - __isset_bit_vector.clear(__FIELD1_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FIELD1_ISSET_ID); } /** Returns true if field field1 is set (has been assigned a value) and false otherwise */ public boolean isSetField1() { - return __isset_bit_vector.get(__FIELD1_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __FIELD1_ISSET_ID); } public void setField1IsSet(boolean value) { - __isset_bit_vector.set(__FIELD1_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FIELD1_ISSET_ID, value); } public String getField2() { @@ -397,83 +411,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // FIELD1 - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.field1 = iprot.readI32(); - setField1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // FIELD2 - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.field2 = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // FIELD3 - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.field3 = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - InnerStruct _elem2; // required - _elem2 = new InnerStruct(); - _elem2.read(iprot); - this.field3.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD1_FIELD_DESC); - oprot.writeI32(this.field1); - oprot.writeFieldEnd(); - if (this.field2 != null) { - oprot.writeFieldBegin(FIELD2_FIELD_DESC); - oprot.writeString(this.field2); - oprot.writeFieldEnd(); - } - if (this.field3 != null) { - oprot.writeFieldBegin(FIELD3_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.field3.size())); - for (InnerStruct _iter3 : this.field3) - { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -506,6 +448,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -519,12 +462,172 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class ThriftTestObjStandardSchemeFactory implements SchemeFactory { + public ThriftTestObjStandardScheme getScheme() { + return new ThriftTestObjStandardScheme(); + } + } + + private static class ThriftTestObjStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftTestObj struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FIELD1 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.field1 = iprot.readI32(); + struct.setField1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FIELD2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.field2 = iprot.readString(); + struct.setField2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FIELD3 + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.field3 = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + InnerStruct _elem2; // required + _elem2 = new InnerStruct(); + _elem2.read(iprot); + struct.field3.add(_elem2); + } + iprot.readListEnd(); + } + struct.setField3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ThriftTestObj struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD1_FIELD_DESC); + oprot.writeI32(struct.field1); + oprot.writeFieldEnd(); + if (struct.field2 != null) { + oprot.writeFieldBegin(FIELD2_FIELD_DESC); + oprot.writeString(struct.field2); + oprot.writeFieldEnd(); + } + if (struct.field3 != null) { + oprot.writeFieldBegin(FIELD3_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.field3.size())); + for (InnerStruct _iter3 : struct.field3) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ThriftTestObjTupleSchemeFactory implements SchemeFactory { + public ThriftTestObjTupleScheme getScheme() { + return new ThriftTestObjTupleScheme(); + } + } + + private static class ThriftTestObjTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ThriftTestObj struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetField1()) { + optionals.set(0); + } + if (struct.isSetField2()) { + optionals.set(1); + } + if (struct.isSetField3()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetField1()) { + oprot.writeI32(struct.field1); + } + if (struct.isSetField2()) { + oprot.writeString(struct.field2); + } + if (struct.isSetField3()) { + { + oprot.writeI32(struct.field3.size()); + for (InnerStruct _iter4 : struct.field3) + { + _iter4.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ThriftTestObj struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.field1 = iprot.readI32(); + struct.setField1IsSet(true); + } + if (incoming.get(1)) { + struct.field2 = iprot.readString(); + struct.setField2IsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.field3 = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + InnerStruct _elem7; // required + _elem7 = new InnerStruct(); + _elem7.read(iprot); + struct.field3.add(_elem7); + } + } + struct.setField3IsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java (revision 0) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java (revision 0) @@ -0,0 +1,125 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.serde; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class serdeConstants { + + public static final String SERIALIZATION_LIB = "serialization.lib"; + + public static final String SERIALIZATION_CLASS = "serialization.class"; + + public static final String SERIALIZATION_FORMAT = "serialization.format"; + + public static final String SERIALIZATION_DDL = "serialization.ddl"; + + public static final String SERIALIZATION_NULL_FORMAT = "serialization.null.format"; + + public static final String SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; + + public static final String SERIALIZATION_SORT_ORDER = "serialization.sort.order"; + + public static final String SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; + + public static final String FIELD_DELIM = "field.delim"; + + public static final String COLLECTION_DELIM = "colelction.delim"; + + public static final String LINE_DELIM = "line.delim"; + + public static final String MAPKEY_DELIM = "mapkey.delim"; + + public static final String QUOTE_CHAR = "quote.delim"; + + public static final String ESCAPE_CHAR = "escape.delim"; + + public static final String VOID_TYPE_NAME = "void"; + + public static final String BOOLEAN_TYPE_NAME = "boolean"; + + public static final String TINYINT_TYPE_NAME = "tinyint"; + + public static final String SMALLINT_TYPE_NAME = "smallint"; + + public static final String INT_TYPE_NAME = "int"; + + public static final String BIGINT_TYPE_NAME = "bigint"; + + public static final String FLOAT_TYPE_NAME = "float"; + + public static final String DOUBLE_TYPE_NAME = "double"; + + public static final String STRING_TYPE_NAME = "string"; + + public static final String DATE_TYPE_NAME = "date"; + + public static final String DATETIME_TYPE_NAME = "datetime"; + + public static final String TIMESTAMP_TYPE_NAME = "timestamp"; + + public static final String BINARY_TYPE_NAME = "binary"; + + public static final String LIST_TYPE_NAME = "array"; + + public static final String MAP_TYPE_NAME = "map"; + + public static final String STRUCT_TYPE_NAME = "struct"; + + public static final String UNION_TYPE_NAME = "uniontype"; + + public static final String LIST_COLUMNS = "columns"; + + public static final String LIST_COLUMN_TYPES = "columns.types"; + + public static final Set PrimitiveTypes = new HashSet(); + static { + PrimitiveTypes.add("void"); + PrimitiveTypes.add("boolean"); + PrimitiveTypes.add("tinyint"); + PrimitiveTypes.add("smallint"); + PrimitiveTypes.add("int"); + PrimitiveTypes.add("bigint"); + PrimitiveTypes.add("float"); + PrimitiveTypes.add("double"); + PrimitiveTypes.add("string"); + PrimitiveTypes.add("date"); + PrimitiveTypes.add("datetime"); + PrimitiveTypes.add("timestamp"); + PrimitiveTypes.add("binary"); + } + + public static final Set CollectionTypes = new HashSet(); + static { + CollectionTypes.add("array"); + CollectionTypes.add("map"); + } + +} Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java (working copy) @@ -1,115 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.7.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde; - -import org.apache.commons.lang.builder.HashCodeBuilder; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Constants { - - public static final String SERIALIZATION_LIB = "serialization.lib"; - - public static final String SERIALIZATION_CLASS = "serialization.class"; - - public static final String SERIALIZATION_FORMAT = "serialization.format"; - - public static final String SERIALIZATION_DDL = "serialization.ddl"; - - public static final String SERIALIZATION_NULL_FORMAT = "serialization.null.format"; - - public static final String SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; - - public static final String SERIALIZATION_SORT_ORDER = "serialization.sort.order"; - - public static final String SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; - - public static final String FIELD_DELIM = "field.delim"; - - public static final String COLLECTION_DELIM = "colelction.delim"; - - public static final String LINE_DELIM = "line.delim"; - - public static final String MAPKEY_DELIM = "mapkey.delim"; - - public static final String QUOTE_CHAR = "quote.delim"; - - public static final String ESCAPE_CHAR = "escape.delim"; - - public static final String VOID_TYPE_NAME = "void"; - - public static final String BOOLEAN_TYPE_NAME = "boolean"; - - public static final String TINYINT_TYPE_NAME = "tinyint"; - - public static final String SMALLINT_TYPE_NAME = "smallint"; - - public static final String INT_TYPE_NAME = "int"; - - public static final String BIGINT_TYPE_NAME = "bigint"; - - public static final String FLOAT_TYPE_NAME = "float"; - - public static final String DOUBLE_TYPE_NAME = "double"; - - public static final String STRING_TYPE_NAME = "string"; - - public static final String DATE_TYPE_NAME = "date"; - - public static final String DATETIME_TYPE_NAME = "datetime"; - - public static final String TIMESTAMP_TYPE_NAME = "timestamp"; - - public static final String BINARY_TYPE_NAME = "binary"; - - public static final String LIST_TYPE_NAME = "array"; - - public static final String MAP_TYPE_NAME = "map"; - - public static final String STRUCT_TYPE_NAME = "struct"; - - public static final String UNION_TYPE_NAME = "uniontype"; - - public static final String LIST_COLUMNS = "columns"; - - public static final String LIST_COLUMN_TYPES = "columns.types"; - - public static final Set PrimitiveTypes = new HashSet(); - static { - PrimitiveTypes.add("void"); - PrimitiveTypes.add("boolean"); - PrimitiveTypes.add("tinyint"); - PrimitiveTypes.add("smallint"); - PrimitiveTypes.add("int"); - PrimitiveTypes.add("bigint"); - PrimitiveTypes.add("float"); - PrimitiveTypes.add("double"); - PrimitiveTypes.add("string"); - PrimitiveTypes.add("date"); - PrimitiveTypes.add("datetime"); - PrimitiveTypes.add("timestamp"); - PrimitiveTypes.add("binary"); - } - - public static final Set CollectionTypes = new HashSet(); - static { - CollectionTypes.add("array"); - CollectionTypes.add("map"); - } - -} Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde2.thrift.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField MY_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("myString", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField UNDERSCORE_INT_FIELD_DESC = new org.apache.thrift.protocol.TField("underscore_int", org.apache.thrift.protocol.TType.I32, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IntStringStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IntStringTupleSchemeFactory()); + } + private int myint; // required private String myString; // required private int underscore_int; // required @@ -98,8 +114,7 @@ // isset id assignments private static final int __MYINT_ISSET_ID = 0; private static final int __UNDERSCORE_INT_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -133,8 +148,7 @@ * Performs a deep copy on other. */ public IntString(IntString other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.myint = other.myint; if (other.isSetMyString()) { this.myString = other.myString; @@ -165,16 +179,16 @@ } public void unsetMyint() { - __isset_bit_vector.clear(__MYINT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MYINT_ISSET_ID); } /** Returns true if field myint is set (has been assigned a value) and false otherwise */ public boolean isSetMyint() { - return __isset_bit_vector.get(__MYINT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MYINT_ISSET_ID); } public void setMyintIsSet(boolean value) { - __isset_bit_vector.set(__MYINT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MYINT_ISSET_ID, value); } public String getMyString() { @@ -210,16 +224,16 @@ } public void unsetUnderscore_int() { - __isset_bit_vector.clear(__UNDERSCORE_INT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UNDERSCORE_INT_ISSET_ID); } /** Returns true if field underscore_int is set (has been assigned a value) and false otherwise */ public boolean isSetUnderscore_int() { - return __isset_bit_vector.get(__UNDERSCORE_INT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __UNDERSCORE_INT_ISSET_ID); } public void setUnderscore_intIsSet(boolean value) { - __isset_bit_vector.set(__UNDERSCORE_INT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UNDERSCORE_INT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -377,64 +391,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MYINT - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.myint = iprot.readI32(); - setMyintIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // MY_STRING - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.myString = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // UNDERSCORE_INT - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.underscore_int = iprot.readI32(); - setUnderscore_intIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MYINT_FIELD_DESC); - oprot.writeI32(this.myint); - oprot.writeFieldEnd(); - if (this.myString != null) { - oprot.writeFieldBegin(MY_STRING_FIELD_DESC); - oprot.writeString(this.myString); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); - oprot.writeI32(this.underscore_int); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -463,6 +424,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -476,12 +438,136 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class IntStringStandardSchemeFactory implements SchemeFactory { + public IntStringStandardScheme getScheme() { + return new IntStringStandardScheme(); + } + } + + private static class IntStringStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, IntString struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MYINT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.myint = iprot.readI32(); + struct.setMyintIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MY_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.myString = iprot.readString(); + struct.setMyStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // UNDERSCORE_INT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.underscore_int = iprot.readI32(); + struct.setUnderscore_intIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, IntString struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MYINT_FIELD_DESC); + oprot.writeI32(struct.myint); + oprot.writeFieldEnd(); + if (struct.myString != null) { + oprot.writeFieldBegin(MY_STRING_FIELD_DESC); + oprot.writeString(struct.myString); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); + oprot.writeI32(struct.underscore_int); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IntStringTupleSchemeFactory implements SchemeFactory { + public IntStringTupleScheme getScheme() { + return new IntStringTupleScheme(); + } + } + + private static class IntStringTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, IntString struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMyint()) { + optionals.set(0); + } + if (struct.isSetMyString()) { + optionals.set(1); + } + if (struct.isSetUnderscore_int()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetMyint()) { + oprot.writeI32(struct.myint); + } + if (struct.isSetMyString()) { + oprot.writeString(struct.myString); + } + if (struct.isSetUnderscore_int()) { + oprot.writeI32(struct.underscore_int); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, IntString struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.myint = iprot.readI32(); + struct.setMyintIsSet(true); + } + if (incoming.get(1)) { + struct.myString = iprot.readString(); + struct.setMyStringIsSet(true); + } + if (incoming.get(2)) { + struct.underscore_int = iprot.readI32(); + struct.setUnderscore_intIsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde2.thrift.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -26,9 +36,15 @@ private static final org.apache.thrift.protocol.TField MY_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("my_string", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField MY_ENUM_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enum", org.apache.thrift.protocol.TType.I32, (short)2); - private String my_string; // required - private MyEnum my_enum; // required + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MiniStructStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MiniStructTupleSchemeFactory()); + } + private String my_string; // optional + private MyEnum my_enum; // optional + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MY_STRING((short)1, "my_string"), @@ -95,7 +111,7 @@ } // isset id assignments - + private _Fields optionals[] = {_Fields.MY_STRING,_Fields.MY_ENUM}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -309,58 +325,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MY_STRING - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.my_string = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // MY_ENUM - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.my_enum = MyEnum.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.my_string != null) { - if (isSetMy_string()) { - oprot.writeFieldBegin(MY_STRING_FIELD_DESC); - oprot.writeString(this.my_string); - oprot.writeFieldEnd(); - } - } - if (this.my_enum != null) { - if (isSetMy_enum()) { - oprot.writeFieldBegin(MY_ENUM_FIELD_DESC); - oprot.writeI32(this.my_enum.getValue()); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -393,6 +362,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -411,5 +381,114 @@ } } + private static class MiniStructStandardSchemeFactory implements SchemeFactory { + public MiniStructStandardScheme getScheme() { + return new MiniStructStandardScheme(); + } + } + + private static class MiniStructStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, MiniStruct struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MY_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.my_string = iprot.readString(); + struct.setMy_stringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MY_ENUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.my_enum = MyEnum.findByValue(iprot.readI32()); + struct.setMy_enumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, MiniStruct struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.my_string != null) { + if (struct.isSetMy_string()) { + oprot.writeFieldBegin(MY_STRING_FIELD_DESC); + oprot.writeString(struct.my_string); + oprot.writeFieldEnd(); + } + } + if (struct.my_enum != null) { + if (struct.isSetMy_enum()) { + oprot.writeFieldBegin(MY_ENUM_FIELD_DESC); + oprot.writeI32(struct.my_enum.getValue()); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MiniStructTupleSchemeFactory implements SchemeFactory { + public MiniStructTupleScheme getScheme() { + return new MiniStructTupleScheme(); + } + } + + private static class MiniStructTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMy_string()) { + optionals.set(0); + } + if (struct.isSetMy_enum()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetMy_string()) { + oprot.writeString(struct.my_string); + } + if (struct.isSetMy_enum()) { + oprot.writeI32(struct.my_enum.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.my_string = iprot.readString(); + struct.setMy_stringIsSet(true); + } + if (incoming.get(1)) { + struct.my_enum = MyEnum.findByValue(iprot.readI32()); + struct.setMy_enumIsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde2.thrift.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,6 +40,12 @@ private static final org.apache.thrift.protocol.TField LINT_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("lintString", org.apache.thrift.protocol.TType.LIST, (short)5); private static final org.apache.thrift.protocol.TField M_STRING_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("mStringString", org.apache.thrift.protocol.TType.MAP, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ComplexStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ComplexTupleSchemeFactory()); + } + private int aint; // required private String aString; // required private List lint; // required @@ -112,8 +128,7 @@ // isset id assignments private static final int __AINT_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -163,8 +178,7 @@ * Performs a deep copy on other. */ public Complex(Complex other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.aint = other.aint; if (other.isSetAString()) { this.aString = other.aString; @@ -232,16 +246,16 @@ } public void unsetAint() { - __isset_bit_vector.clear(__AINT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AINT_ISSET_ID); } /** Returns true if field aint is set (has been assigned a value) and false otherwise */ public boolean isSetAint() { - return __isset_bit_vector.get(__AINT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __AINT_ISSET_ID); } public void setAintIsSet(boolean value) { - __isset_bit_vector.set(__AINT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AINT_ISSET_ID, value); } public String getAString() { @@ -666,173 +680,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // AINT - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.aint = iprot.readI32(); - setAintIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // A_STRING - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.aString = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // LINT - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.lint = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - int _elem2; // required - _elem2 = iprot.readI32(); - this.lint.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // L_STRING - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); - this.lString = new ArrayList(_list3.size); - for (int _i4 = 0; _i4 < _list3.size; ++_i4) - { - String _elem5; // required - _elem5 = iprot.readString(); - this.lString.add(_elem5); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // LINT_STRING - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list6 = iprot.readListBegin(); - this.lintString = new ArrayList(_list6.size); - for (int _i7 = 0; _i7 < _list6.size; ++_i7) - { - IntString _elem8; // required - _elem8 = new IntString(); - _elem8.read(iprot); - this.lintString.add(_elem8); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // M_STRING_STRING - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map9 = iprot.readMapBegin(); - this.mStringString = new HashMap(2*_map9.size); - for (int _i10 = 0; _i10 < _map9.size; ++_i10) - { - String _key11; // required - String _val12; // required - _key11 = iprot.readString(); - _val12 = iprot.readString(); - this.mStringString.put(_key11, _val12); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(AINT_FIELD_DESC); - oprot.writeI32(this.aint); - oprot.writeFieldEnd(); - if (this.aString != null) { - oprot.writeFieldBegin(A_STRING_FIELD_DESC); - oprot.writeString(this.aString); - oprot.writeFieldEnd(); - } - if (this.lint != null) { - oprot.writeFieldBegin(LINT_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.lint.size())); - for (int _iter13 : this.lint) - { - oprot.writeI32(_iter13); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lString != null) { - oprot.writeFieldBegin(L_STRING_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.lString.size())); - for (String _iter14 : this.lString) - { - oprot.writeString(_iter14); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lintString != null) { - oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lintString.size())); - for (IntString _iter15 : this.lintString) - { - _iter15.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.mStringString != null) { - oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.mStringString.size())); - for (Map.Entry _iter16 : this.mStringString.entrySet()) - { - oprot.writeString(_iter16.getKey()); - oprot.writeString(_iter16.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -889,6 +741,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -902,12 +755,343 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class ComplexStandardSchemeFactory implements SchemeFactory { + public ComplexStandardScheme getScheme() { + return new ComplexStandardScheme(); + } + } + + private static class ComplexStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Complex struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // AINT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.aint = iprot.readI32(); + struct.setAintIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // A_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.aString = iprot.readString(); + struct.setAStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // LINT + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.lint = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + int _elem2; // required + _elem2 = iprot.readI32(); + struct.lint.add(_elem2); + } + iprot.readListEnd(); + } + struct.setLintIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // L_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); + struct.lString = new ArrayList(_list3.size); + for (int _i4 = 0; _i4 < _list3.size; ++_i4) + { + String _elem5; // required + _elem5 = iprot.readString(); + struct.lString.add(_elem5); + } + iprot.readListEnd(); + } + struct.setLStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LINT_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list6 = iprot.readListBegin(); + struct.lintString = new ArrayList(_list6.size); + for (int _i7 = 0; _i7 < _list6.size; ++_i7) + { + IntString _elem8; // required + _elem8 = new IntString(); + _elem8.read(iprot); + struct.lintString.add(_elem8); + } + iprot.readListEnd(); + } + struct.setLintStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // M_STRING_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map9 = iprot.readMapBegin(); + struct.mStringString = new HashMap(2*_map9.size); + for (int _i10 = 0; _i10 < _map9.size; ++_i10) + { + String _key11; // required + String _val12; // required + _key11 = iprot.readString(); + _val12 = iprot.readString(); + struct.mStringString.put(_key11, _val12); + } + iprot.readMapEnd(); + } + struct.setMStringStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Complex struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(AINT_FIELD_DESC); + oprot.writeI32(struct.aint); + oprot.writeFieldEnd(); + if (struct.aString != null) { + oprot.writeFieldBegin(A_STRING_FIELD_DESC); + oprot.writeString(struct.aString); + oprot.writeFieldEnd(); + } + if (struct.lint != null) { + oprot.writeFieldBegin(LINT_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.lint.size())); + for (int _iter13 : struct.lint) + { + oprot.writeI32(_iter13); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.lString != null) { + oprot.writeFieldBegin(L_STRING_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.lString.size())); + for (String _iter14 : struct.lString) + { + oprot.writeString(_iter14); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.lintString != null) { + oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.lintString.size())); + for (IntString _iter15 : struct.lintString) + { + _iter15.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.mStringString != null) { + oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.mStringString.size())); + for (Map.Entry _iter16 : struct.mStringString.entrySet()) + { + oprot.writeString(_iter16.getKey()); + oprot.writeString(_iter16.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ComplexTupleSchemeFactory implements SchemeFactory { + public ComplexTupleScheme getScheme() { + return new ComplexTupleScheme(); + } + } + + private static class ComplexTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Complex struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAint()) { + optionals.set(0); + } + if (struct.isSetAString()) { + optionals.set(1); + } + if (struct.isSetLint()) { + optionals.set(2); + } + if (struct.isSetLString()) { + optionals.set(3); + } + if (struct.isSetLintString()) { + optionals.set(4); + } + if (struct.isSetMStringString()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetAint()) { + oprot.writeI32(struct.aint); + } + if (struct.isSetAString()) { + oprot.writeString(struct.aString); + } + if (struct.isSetLint()) { + { + oprot.writeI32(struct.lint.size()); + for (int _iter17 : struct.lint) + { + oprot.writeI32(_iter17); + } + } + } + if (struct.isSetLString()) { + { + oprot.writeI32(struct.lString.size()); + for (String _iter18 : struct.lString) + { + oprot.writeString(_iter18); + } + } + } + if (struct.isSetLintString()) { + { + oprot.writeI32(struct.lintString.size()); + for (IntString _iter19 : struct.lintString) + { + _iter19.write(oprot); + } + } + } + if (struct.isSetMStringString()) { + { + oprot.writeI32(struct.mStringString.size()); + for (Map.Entry _iter20 : struct.mStringString.entrySet()) + { + oprot.writeString(_iter20.getKey()); + oprot.writeString(_iter20.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Complex struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.aint = iprot.readI32(); + struct.setAintIsSet(true); + } + if (incoming.get(1)) { + struct.aString = iprot.readString(); + struct.setAStringIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.lint = new ArrayList(_list21.size); + for (int _i22 = 0; _i22 < _list21.size; ++_i22) + { + int _elem23; // required + _elem23 = iprot.readI32(); + struct.lint.add(_elem23); + } + } + struct.setLintIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list24 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.lString = new ArrayList(_list24.size); + for (int _i25 = 0; _i25 < _list24.size; ++_i25) + { + String _elem26; // required + _elem26 = iprot.readString(); + struct.lString.add(_elem26); + } + } + struct.setLStringIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list27 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.lintString = new ArrayList(_list27.size); + for (int _i28 = 0; _i28 < _list27.size; ++_i28) + { + IntString _elem29; // required + _elem29 = new IntString(); + _elem29.read(iprot); + struct.lintString.add(_elem29); + } + } + struct.setLintStringIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TMap _map30 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.mStringString = new HashMap(2*_map30.size); + for (int _i31 = 0; _i31 < _map30.size; ++_i31) + { + String _key32; // required + String _val33; // required + _key32 = iprot.readString(); + _val33 = iprot.readString(); + struct.mStringString.put(_key32, _val33); + } + } + struct.setMStringStringIsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde2.thrift.test; Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java (revision 1406838) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde2.thrift.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -44,27 +54,33 @@ private static final org.apache.thrift.protocol.TField MY_ENUMSET_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enumset", org.apache.thrift.protocol.TType.SET, (short)19); private static final org.apache.thrift.protocol.TField MY_STRUCTSET_FIELD_DESC = new org.apache.thrift.protocol.TField("my_structset", org.apache.thrift.protocol.TType.SET, (short)20); - private boolean my_bool; // required - private byte my_byte; // required - private short my_16bit_int; // required - private int my_32bit_int; // required - private long my_64bit_int; // required - private double my_double; // required - private String my_string; // required - private ByteBuffer my_binary; // required - private Map my_string_string_map; // required - private Map my_string_enum_map; // required - private Map my_enum_string_map; // required - private Map my_enum_struct_map; // required - private Map> my_enum_stringlist_map; // required - private Map> my_enum_structlist_map; // required - private List my_stringlist; // required - private List my_structlist; // required - private List my_enumlist; // required - private Set my_stringset; // required - private Set my_enumset; // required - private Set my_structset; // required + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MegaStructStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MegaStructTupleSchemeFactory()); + } + private boolean my_bool; // optional + private byte my_byte; // optional + private short my_16bit_int; // optional + private int my_32bit_int; // optional + private long my_64bit_int; // optional + private double my_double; // optional + private String my_string; // optional + private ByteBuffer my_binary; // optional + private Map my_string_string_map; // optional + private Map my_string_enum_map; // optional + private Map my_enum_string_map; // optional + private Map my_enum_struct_map; // optional + private Map> my_enum_stringlist_map; // optional + private Map> my_enum_structlist_map; // optional + private List my_stringlist; // optional + private List my_structlist; // optional + private List my_enumlist; // optional + private Set my_stringset; // optional + private Set my_enumset; // optional + private Set my_structset; // optional + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MY_BOOL((short)1, "my_bool"), @@ -187,8 +203,8 @@ private static final int __MY_32BIT_INT_ISSET_ID = 3; private static final int __MY_64BIT_INT_ISSET_ID = 4; private static final int __MY_DOUBLE_ISSET_ID = 5; - private BitSet __isset_bit_vector = new BitSet(6); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.MY_BOOL,_Fields.MY_BYTE,_Fields.MY_16BIT_INT,_Fields.MY_32BIT_INT,_Fields.MY_64BIT_INT,_Fields.MY_DOUBLE,_Fields.MY_STRING,_Fields.MY_BINARY,_Fields.MY_STRING_STRING_MAP,_Fields.MY_STRING_ENUM_MAP,_Fields.MY_ENUM_STRING_MAP,_Fields.MY_ENUM_STRUCT_MAP,_Fields.MY_ENUM_STRINGLIST_MAP,_Fields.MY_ENUM_STRUCTLIST_MAP,_Fields.MY_STRINGLIST,_Fields.MY_STRUCTLIST,_Fields.MY_ENUMLIST,_Fields.MY_STRINGSET,_Fields.MY_ENUMSET,_Fields.MY_STRUCTSET}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -263,8 +279,7 @@ * Performs a deep copy on other. */ public MegaStruct(MegaStruct other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.my_bool = other.my_bool; this.my_byte = other.my_byte; this.my_16bit_int = other.my_16bit_int; @@ -462,16 +477,16 @@ } public void unsetMy_bool() { - __isset_bit_vector.clear(__MY_BOOL_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_BOOL_ISSET_ID); } /** Returns true if field my_bool is set (has been assigned a value) and false otherwise */ public boolean isSetMy_bool() { - return __isset_bit_vector.get(__MY_BOOL_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MY_BOOL_ISSET_ID); } public void setMy_boolIsSet(boolean value) { - __isset_bit_vector.set(__MY_BOOL_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_BOOL_ISSET_ID, value); } public byte getMy_byte() { @@ -484,16 +499,16 @@ } public void unsetMy_byte() { - __isset_bit_vector.clear(__MY_BYTE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_BYTE_ISSET_ID); } /** Returns true if field my_byte is set (has been assigned a value) and false otherwise */ public boolean isSetMy_byte() { - return __isset_bit_vector.get(__MY_BYTE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MY_BYTE_ISSET_ID); } public void setMy_byteIsSet(boolean value) { - __isset_bit_vector.set(__MY_BYTE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_BYTE_ISSET_ID, value); } public short getMy_16bit_int() { @@ -506,16 +521,16 @@ } public void unsetMy_16bit_int() { - __isset_bit_vector.clear(__MY_16BIT_INT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID); } /** Returns true if field my_16bit_int is set (has been assigned a value) and false otherwise */ public boolean isSetMy_16bit_int() { - return __isset_bit_vector.get(__MY_16BIT_INT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID); } public void setMy_16bit_intIsSet(boolean value) { - __isset_bit_vector.set(__MY_16BIT_INT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID, value); } public int getMy_32bit_int() { @@ -528,16 +543,16 @@ } public void unsetMy_32bit_int() { - __isset_bit_vector.clear(__MY_32BIT_INT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID); } /** Returns true if field my_32bit_int is set (has been assigned a value) and false otherwise */ public boolean isSetMy_32bit_int() { - return __isset_bit_vector.get(__MY_32BIT_INT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID); } public void setMy_32bit_intIsSet(boolean value) { - __isset_bit_vector.set(__MY_32BIT_INT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID, value); } public long getMy_64bit_int() { @@ -550,16 +565,16 @@ } public void unsetMy_64bit_int() { - __isset_bit_vector.clear(__MY_64BIT_INT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID); } /** Returns true if field my_64bit_int is set (has been assigned a value) and false otherwise */ public boolean isSetMy_64bit_int() { - return __isset_bit_vector.get(__MY_64BIT_INT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID); } public void setMy_64bit_intIsSet(boolean value) { - __isset_bit_vector.set(__MY_64BIT_INT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID, value); } public double getMy_double() { @@ -572,16 +587,16 @@ } public void unsetMy_double() { - __isset_bit_vector.clear(__MY_DOUBLE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID); } /** Returns true if field my_double is set (has been assigned a value) and false otherwise */ public boolean isSetMy_double() { - return __isset_bit_vector.get(__MY_DOUBLE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID); } public void setMy_doubleIsSet(boolean value) { - __isset_bit_vector.set(__MY_DOUBLE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID, value); } public String getMy_string() { @@ -1770,564 +1785,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MY_BOOL - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.my_bool = iprot.readBool(); - setMy_boolIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // MY_BYTE - if (field.type == org.apache.thrift.protocol.TType.BYTE) { - this.my_byte = iprot.readByte(); - setMy_byteIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MY_16BIT_INT - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.my_16bit_int = iprot.readI16(); - setMy_16bit_intIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MY_32BIT_INT - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.my_32bit_int = iprot.readI32(); - setMy_32bit_intIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // MY_64BIT_INT - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.my_64bit_int = iprot.readI64(); - setMy_64bit_intIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // MY_DOUBLE - if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { - this.my_double = iprot.readDouble(); - setMy_doubleIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // MY_STRING - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.my_string = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // MY_BINARY - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.my_binary = iprot.readBinary(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 9: // MY_STRING_STRING_MAP - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); - this.my_string_string_map = new HashMap(2*_map0.size); - for (int _i1 = 0; _i1 < _map0.size; ++_i1) - { - String _key2; // required - String _val3; // required - _key2 = iprot.readString(); - _val3 = iprot.readString(); - this.my_string_string_map.put(_key2, _val3); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 10: // MY_STRING_ENUM_MAP - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin(); - this.my_string_enum_map = new HashMap(2*_map4.size); - for (int _i5 = 0; _i5 < _map4.size; ++_i5) - { - String _key6; // required - MyEnum _val7; // required - _key6 = iprot.readString(); - _val7 = MyEnum.findByValue(iprot.readI32()); - this.my_string_enum_map.put(_key6, _val7); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 11: // MY_ENUM_STRING_MAP - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin(); - this.my_enum_string_map = new HashMap(2*_map8.size); - for (int _i9 = 0; _i9 < _map8.size; ++_i9) - { - MyEnum _key10; // required - String _val11; // required - _key10 = MyEnum.findByValue(iprot.readI32()); - _val11 = iprot.readString(); - this.my_enum_string_map.put(_key10, _val11); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 12: // MY_ENUM_STRUCT_MAP - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(); - this.my_enum_struct_map = new HashMap(2*_map12.size); - for (int _i13 = 0; _i13 < _map12.size; ++_i13) - { - MyEnum _key14; // required - MiniStruct _val15; // required - _key14 = MyEnum.findByValue(iprot.readI32()); - _val15 = new MiniStruct(); - _val15.read(iprot); - this.my_enum_struct_map.put(_key14, _val15); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 13: // MY_ENUM_STRINGLIST_MAP - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin(); - this.my_enum_stringlist_map = new HashMap>(2*_map16.size); - for (int _i17 = 0; _i17 < _map16.size; ++_i17) - { - MyEnum _key18; // required - List _val19; // required - _key18 = MyEnum.findByValue(iprot.readI32()); - { - org.apache.thrift.protocol.TList _list20 = iprot.readListBegin(); - _val19 = new ArrayList(_list20.size); - for (int _i21 = 0; _i21 < _list20.size; ++_i21) - { - String _elem22; // required - _elem22 = iprot.readString(); - _val19.add(_elem22); - } - iprot.readListEnd(); - } - this.my_enum_stringlist_map.put(_key18, _val19); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 14: // MY_ENUM_STRUCTLIST_MAP - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map23 = iprot.readMapBegin(); - this.my_enum_structlist_map = new HashMap>(2*_map23.size); - for (int _i24 = 0; _i24 < _map23.size; ++_i24) - { - MyEnum _key25; // required - List _val26; // required - _key25 = MyEnum.findByValue(iprot.readI32()); - { - org.apache.thrift.protocol.TList _list27 = iprot.readListBegin(); - _val26 = new ArrayList(_list27.size); - for (int _i28 = 0; _i28 < _list27.size; ++_i28) - { - MiniStruct _elem29; // required - _elem29 = new MiniStruct(); - _elem29.read(iprot); - _val26.add(_elem29); - } - iprot.readListEnd(); - } - this.my_enum_structlist_map.put(_key25, _val26); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 15: // MY_STRINGLIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); - this.my_stringlist = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) - { - String _elem32; // required - _elem32 = iprot.readString(); - this.my_stringlist.add(_elem32); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 16: // MY_STRUCTLIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list33 = iprot.readListBegin(); - this.my_structlist = new ArrayList(_list33.size); - for (int _i34 = 0; _i34 < _list33.size; ++_i34) - { - MiniStruct _elem35; // required - _elem35 = new MiniStruct(); - _elem35.read(iprot); - this.my_structlist.add(_elem35); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 17: // MY_ENUMLIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(); - this.my_enumlist = new ArrayList(_list36.size); - for (int _i37 = 0; _i37 < _list36.size; ++_i37) - { - MyEnum _elem38; // required - _elem38 = MyEnum.findByValue(iprot.readI32()); - this.my_enumlist.add(_elem38); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 18: // MY_STRINGSET - if (field.type == org.apache.thrift.protocol.TType.SET) { - { - org.apache.thrift.protocol.TSet _set39 = iprot.readSetBegin(); - this.my_stringset = new HashSet(2*_set39.size); - for (int _i40 = 0; _i40 < _set39.size; ++_i40) - { - String _elem41; // required - _elem41 = iprot.readString(); - this.my_stringset.add(_elem41); - } - iprot.readSetEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 19: // MY_ENUMSET - if (field.type == org.apache.thrift.protocol.TType.SET) { - { - org.apache.thrift.protocol.TSet _set42 = iprot.readSetBegin(); - this.my_enumset = new HashSet(2*_set42.size); - for (int _i43 = 0; _i43 < _set42.size; ++_i43) - { - MyEnum _elem44; // required - _elem44 = MyEnum.findByValue(iprot.readI32()); - this.my_enumset.add(_elem44); - } - iprot.readSetEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 20: // MY_STRUCTSET - if (field.type == org.apache.thrift.protocol.TType.SET) { - { - org.apache.thrift.protocol.TSet _set45 = iprot.readSetBegin(); - this.my_structset = new HashSet(2*_set45.size); - for (int _i46 = 0; _i46 < _set45.size; ++_i46) - { - MiniStruct _elem47; // required - _elem47 = new MiniStruct(); - _elem47.read(iprot); - this.my_structset.add(_elem47); - } - iprot.readSetEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (isSetMy_bool()) { - oprot.writeFieldBegin(MY_BOOL_FIELD_DESC); - oprot.writeBool(this.my_bool); - oprot.writeFieldEnd(); - } - if (isSetMy_byte()) { - oprot.writeFieldBegin(MY_BYTE_FIELD_DESC); - oprot.writeByte(this.my_byte); - oprot.writeFieldEnd(); - } - if (isSetMy_16bit_int()) { - oprot.writeFieldBegin(MY_16BIT_INT_FIELD_DESC); - oprot.writeI16(this.my_16bit_int); - oprot.writeFieldEnd(); - } - if (isSetMy_32bit_int()) { - oprot.writeFieldBegin(MY_32BIT_INT_FIELD_DESC); - oprot.writeI32(this.my_32bit_int); - oprot.writeFieldEnd(); - } - if (isSetMy_64bit_int()) { - oprot.writeFieldBegin(MY_64BIT_INT_FIELD_DESC); - oprot.writeI64(this.my_64bit_int); - oprot.writeFieldEnd(); - } - if (isSetMy_double()) { - oprot.writeFieldBegin(MY_DOUBLE_FIELD_DESC); - oprot.writeDouble(this.my_double); - oprot.writeFieldEnd(); - } - if (this.my_string != null) { - if (isSetMy_string()) { - oprot.writeFieldBegin(MY_STRING_FIELD_DESC); - oprot.writeString(this.my_string); - oprot.writeFieldEnd(); - } - } - if (this.my_binary != null) { - if (isSetMy_binary()) { - oprot.writeFieldBegin(MY_BINARY_FIELD_DESC); - oprot.writeBinary(this.my_binary); - oprot.writeFieldEnd(); - } - } - if (this.my_string_string_map != null) { - if (isSetMy_string_string_map()) { - oprot.writeFieldBegin(MY_STRING_STRING_MAP_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.my_string_string_map.size())); - for (Map.Entry _iter48 : this.my_string_string_map.entrySet()) - { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_string_enum_map != null) { - if (isSetMy_string_enum_map()) { - oprot.writeFieldBegin(MY_STRING_ENUM_MAP_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, this.my_string_enum_map.size())); - for (Map.Entry _iter49 : this.my_string_enum_map.entrySet()) - { - oprot.writeString(_iter49.getKey()); - oprot.writeI32(_iter49.getValue().getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_enum_string_map != null) { - if (isSetMy_enum_string_map()) { - oprot.writeFieldBegin(MY_ENUM_STRING_MAP_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, this.my_enum_string_map.size())); - for (Map.Entry _iter50 : this.my_enum_string_map.entrySet()) - { - oprot.writeI32(_iter50.getKey().getValue()); - oprot.writeString(_iter50.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_enum_struct_map != null) { - if (isSetMy_enum_struct_map()) { - oprot.writeFieldBegin(MY_ENUM_STRUCT_MAP_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, this.my_enum_struct_map.size())); - for (Map.Entry _iter51 : this.my_enum_struct_map.entrySet()) - { - oprot.writeI32(_iter51.getKey().getValue()); - _iter51.getValue().write(oprot); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_enum_stringlist_map != null) { - if (isSetMy_enum_stringlist_map()) { - oprot.writeFieldBegin(MY_ENUM_STRINGLIST_MAP_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, this.my_enum_stringlist_map.size())); - for (Map.Entry> _iter52 : this.my_enum_stringlist_map.entrySet()) - { - oprot.writeI32(_iter52.getKey().getValue()); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter52.getValue().size())); - for (String _iter53 : _iter52.getValue()) - { - oprot.writeString(_iter53); - } - oprot.writeListEnd(); - } - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_enum_structlist_map != null) { - if (isSetMy_enum_structlist_map()) { - oprot.writeFieldBegin(MY_ENUM_STRUCTLIST_MAP_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, this.my_enum_structlist_map.size())); - for (Map.Entry> _iter54 : this.my_enum_structlist_map.entrySet()) - { - oprot.writeI32(_iter54.getKey().getValue()); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter54.getValue().size())); - for (MiniStruct _iter55 : _iter54.getValue()) - { - _iter55.write(oprot); - } - oprot.writeListEnd(); - } - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_stringlist != null) { - if (isSetMy_stringlist()) { - oprot.writeFieldBegin(MY_STRINGLIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.my_stringlist.size())); - for (String _iter56 : this.my_stringlist) - { - oprot.writeString(_iter56); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_structlist != null) { - if (isSetMy_structlist()) { - oprot.writeFieldBegin(MY_STRUCTLIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.my_structlist.size())); - for (MiniStruct _iter57 : this.my_structlist) - { - _iter57.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_enumlist != null) { - if (isSetMy_enumlist()) { - oprot.writeFieldBegin(MY_ENUMLIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.my_enumlist.size())); - for (MyEnum _iter58 : this.my_enumlist) - { - oprot.writeI32(_iter58.getValue()); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_stringset != null) { - if (isSetMy_stringset()) { - oprot.writeFieldBegin(MY_STRINGSET_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, this.my_stringset.size())); - for (String _iter59 : this.my_stringset) - { - oprot.writeString(_iter59); - } - oprot.writeSetEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_enumset != null) { - if (isSetMy_enumset()) { - oprot.writeFieldBegin(MY_ENUMSET_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, this.my_enumset.size())); - for (MyEnum _iter60 : this.my_enumset) - { - oprot.writeI32(_iter60.getValue()); - } - oprot.writeSetEnd(); - } - oprot.writeFieldEnd(); - } - } - if (this.my_structset != null) { - if (isSetMy_structset()) { - oprot.writeFieldBegin(MY_STRUCTSET_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, this.my_structset.size())); - for (MiniStruct _iter61 : this.my_structset) - { - _iter61.write(oprot); - } - oprot.writeSetEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -2516,6 +1978,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -2529,12 +1992,1051 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class MegaStructStandardSchemeFactory implements SchemeFactory { + public MegaStructStandardScheme getScheme() { + return new MegaStructStandardScheme(); + } + } + + private static class MegaStructStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, MegaStruct struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MY_BOOL + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.my_bool = iprot.readBool(); + struct.setMy_boolIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MY_BYTE + if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { + struct.my_byte = iprot.readByte(); + struct.setMy_byteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MY_16BIT_INT + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.my_16bit_int = iprot.readI16(); + struct.setMy_16bit_intIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MY_32BIT_INT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.my_32bit_int = iprot.readI32(); + struct.setMy_32bit_intIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // MY_64BIT_INT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.my_64bit_int = iprot.readI64(); + struct.setMy_64bit_intIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // MY_DOUBLE + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.my_double = iprot.readDouble(); + struct.setMy_doubleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // MY_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.my_string = iprot.readString(); + struct.setMy_stringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // MY_BINARY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.my_binary = iprot.readBinary(); + struct.setMy_binaryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // MY_STRING_STRING_MAP + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); + struct.my_string_string_map = new HashMap(2*_map0.size); + for (int _i1 = 0; _i1 < _map0.size; ++_i1) + { + String _key2; // required + String _val3; // required + _key2 = iprot.readString(); + _val3 = iprot.readString(); + struct.my_string_string_map.put(_key2, _val3); + } + iprot.readMapEnd(); + } + struct.setMy_string_string_mapIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // MY_STRING_ENUM_MAP + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin(); + struct.my_string_enum_map = new HashMap(2*_map4.size); + for (int _i5 = 0; _i5 < _map4.size; ++_i5) + { + String _key6; // required + MyEnum _val7; // required + _key6 = iprot.readString(); + _val7 = MyEnum.findByValue(iprot.readI32()); + struct.my_string_enum_map.put(_key6, _val7); + } + iprot.readMapEnd(); + } + struct.setMy_string_enum_mapIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // MY_ENUM_STRING_MAP + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin(); + struct.my_enum_string_map = new HashMap(2*_map8.size); + for (int _i9 = 0; _i9 < _map8.size; ++_i9) + { + MyEnum _key10; // required + String _val11; // required + _key10 = MyEnum.findByValue(iprot.readI32()); + _val11 = iprot.readString(); + struct.my_enum_string_map.put(_key10, _val11); + } + iprot.readMapEnd(); + } + struct.setMy_enum_string_mapIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // MY_ENUM_STRUCT_MAP + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(); + struct.my_enum_struct_map = new HashMap(2*_map12.size); + for (int _i13 = 0; _i13 < _map12.size; ++_i13) + { + MyEnum _key14; // required + MiniStruct _val15; // required + _key14 = MyEnum.findByValue(iprot.readI32()); + _val15 = new MiniStruct(); + _val15.read(iprot); + struct.my_enum_struct_map.put(_key14, _val15); + } + iprot.readMapEnd(); + } + struct.setMy_enum_struct_mapIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // MY_ENUM_STRINGLIST_MAP + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin(); + struct.my_enum_stringlist_map = new HashMap>(2*_map16.size); + for (int _i17 = 0; _i17 < _map16.size; ++_i17) + { + MyEnum _key18; // required + List _val19; // required + _key18 = MyEnum.findByValue(iprot.readI32()); + { + org.apache.thrift.protocol.TList _list20 = iprot.readListBegin(); + _val19 = new ArrayList(_list20.size); + for (int _i21 = 0; _i21 < _list20.size; ++_i21) + { + String _elem22; // required + _elem22 = iprot.readString(); + _val19.add(_elem22); + } + iprot.readListEnd(); + } + struct.my_enum_stringlist_map.put(_key18, _val19); + } + iprot.readMapEnd(); + } + struct.setMy_enum_stringlist_mapIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // MY_ENUM_STRUCTLIST_MAP + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map23 = iprot.readMapBegin(); + struct.my_enum_structlist_map = new HashMap>(2*_map23.size); + for (int _i24 = 0; _i24 < _map23.size; ++_i24) + { + MyEnum _key25; // required + List _val26; // required + _key25 = MyEnum.findByValue(iprot.readI32()); + { + org.apache.thrift.protocol.TList _list27 = iprot.readListBegin(); + _val26 = new ArrayList(_list27.size); + for (int _i28 = 0; _i28 < _list27.size; ++_i28) + { + MiniStruct _elem29; // required + _elem29 = new MiniStruct(); + _elem29.read(iprot); + _val26.add(_elem29); + } + iprot.readListEnd(); + } + struct.my_enum_structlist_map.put(_key25, _val26); + } + iprot.readMapEnd(); + } + struct.setMy_enum_structlist_mapIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // MY_STRINGLIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); + struct.my_stringlist = new ArrayList(_list30.size); + for (int _i31 = 0; _i31 < _list30.size; ++_i31) + { + String _elem32; // required + _elem32 = iprot.readString(); + struct.my_stringlist.add(_elem32); + } + iprot.readListEnd(); + } + struct.setMy_stringlistIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // MY_STRUCTLIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list33 = iprot.readListBegin(); + struct.my_structlist = new ArrayList(_list33.size); + for (int _i34 = 0; _i34 < _list33.size; ++_i34) + { + MiniStruct _elem35; // required + _elem35 = new MiniStruct(); + _elem35.read(iprot); + struct.my_structlist.add(_elem35); + } + iprot.readListEnd(); + } + struct.setMy_structlistIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // MY_ENUMLIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(); + struct.my_enumlist = new ArrayList(_list36.size); + for (int _i37 = 0; _i37 < _list36.size; ++_i37) + { + MyEnum _elem38; // required + _elem38 = MyEnum.findByValue(iprot.readI32()); + struct.my_enumlist.add(_elem38); + } + iprot.readListEnd(); + } + struct.setMy_enumlistIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 18: // MY_STRINGSET + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set39 = iprot.readSetBegin(); + struct.my_stringset = new HashSet(2*_set39.size); + for (int _i40 = 0; _i40 < _set39.size; ++_i40) + { + String _elem41; // required + _elem41 = iprot.readString(); + struct.my_stringset.add(_elem41); + } + iprot.readSetEnd(); + } + struct.setMy_stringsetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 19: // MY_ENUMSET + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set42 = iprot.readSetBegin(); + struct.my_enumset = new HashSet(2*_set42.size); + for (int _i43 = 0; _i43 < _set42.size; ++_i43) + { + MyEnum _elem44; // required + _elem44 = MyEnum.findByValue(iprot.readI32()); + struct.my_enumset.add(_elem44); + } + iprot.readSetEnd(); + } + struct.setMy_enumsetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 20: // MY_STRUCTSET + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set45 = iprot.readSetBegin(); + struct.my_structset = new HashSet(2*_set45.size); + for (int _i46 = 0; _i46 < _set45.size; ++_i46) + { + MiniStruct _elem47; // required + _elem47 = new MiniStruct(); + _elem47.read(iprot); + struct.my_structset.add(_elem47); + } + iprot.readSetEnd(); + } + struct.setMy_structsetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, MegaStruct struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetMy_bool()) { + oprot.writeFieldBegin(MY_BOOL_FIELD_DESC); + oprot.writeBool(struct.my_bool); + oprot.writeFieldEnd(); + } + if (struct.isSetMy_byte()) { + oprot.writeFieldBegin(MY_BYTE_FIELD_DESC); + oprot.writeByte(struct.my_byte); + oprot.writeFieldEnd(); + } + if (struct.isSetMy_16bit_int()) { + oprot.writeFieldBegin(MY_16BIT_INT_FIELD_DESC); + oprot.writeI16(struct.my_16bit_int); + oprot.writeFieldEnd(); + } + if (struct.isSetMy_32bit_int()) { + oprot.writeFieldBegin(MY_32BIT_INT_FIELD_DESC); + oprot.writeI32(struct.my_32bit_int); + oprot.writeFieldEnd(); + } + if (struct.isSetMy_64bit_int()) { + oprot.writeFieldBegin(MY_64BIT_INT_FIELD_DESC); + oprot.writeI64(struct.my_64bit_int); + oprot.writeFieldEnd(); + } + if (struct.isSetMy_double()) { + oprot.writeFieldBegin(MY_DOUBLE_FIELD_DESC); + oprot.writeDouble(struct.my_double); + oprot.writeFieldEnd(); + } + if (struct.my_string != null) { + if (struct.isSetMy_string()) { + oprot.writeFieldBegin(MY_STRING_FIELD_DESC); + oprot.writeString(struct.my_string); + oprot.writeFieldEnd(); + } + } + if (struct.my_binary != null) { + if (struct.isSetMy_binary()) { + oprot.writeFieldBegin(MY_BINARY_FIELD_DESC); + oprot.writeBinary(struct.my_binary); + oprot.writeFieldEnd(); + } + } + if (struct.my_string_string_map != null) { + if (struct.isSetMy_string_string_map()) { + oprot.writeFieldBegin(MY_STRING_STRING_MAP_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.my_string_string_map.size())); + for (Map.Entry _iter48 : struct.my_string_string_map.entrySet()) + { + oprot.writeString(_iter48.getKey()); + oprot.writeString(_iter48.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_string_enum_map != null) { + if (struct.isSetMy_string_enum_map()) { + oprot.writeFieldBegin(MY_STRING_ENUM_MAP_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.my_string_enum_map.size())); + for (Map.Entry _iter49 : struct.my_string_enum_map.entrySet()) + { + oprot.writeString(_iter49.getKey()); + oprot.writeI32(_iter49.getValue().getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_enum_string_map != null) { + if (struct.isSetMy_enum_string_map()) { + oprot.writeFieldBegin(MY_ENUM_STRING_MAP_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, struct.my_enum_string_map.size())); + for (Map.Entry _iter50 : struct.my_enum_string_map.entrySet()) + { + oprot.writeI32(_iter50.getKey().getValue()); + oprot.writeString(_iter50.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_enum_struct_map != null) { + if (struct.isSetMy_enum_struct_map()) { + oprot.writeFieldBegin(MY_ENUM_STRUCT_MAP_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, struct.my_enum_struct_map.size())); + for (Map.Entry _iter51 : struct.my_enum_struct_map.entrySet()) + { + oprot.writeI32(_iter51.getKey().getValue()); + _iter51.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_enum_stringlist_map != null) { + if (struct.isSetMy_enum_stringlist_map()) { + oprot.writeFieldBegin(MY_ENUM_STRINGLIST_MAP_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, struct.my_enum_stringlist_map.size())); + for (Map.Entry> _iter52 : struct.my_enum_stringlist_map.entrySet()) + { + oprot.writeI32(_iter52.getKey().getValue()); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter52.getValue().size())); + for (String _iter53 : _iter52.getValue()) + { + oprot.writeString(_iter53); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_enum_structlist_map != null) { + if (struct.isSetMy_enum_structlist_map()) { + oprot.writeFieldBegin(MY_ENUM_STRUCTLIST_MAP_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, struct.my_enum_structlist_map.size())); + for (Map.Entry> _iter54 : struct.my_enum_structlist_map.entrySet()) + { + oprot.writeI32(_iter54.getKey().getValue()); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter54.getValue().size())); + for (MiniStruct _iter55 : _iter54.getValue()) + { + _iter55.write(oprot); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_stringlist != null) { + if (struct.isSetMy_stringlist()) { + oprot.writeFieldBegin(MY_STRINGLIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.my_stringlist.size())); + for (String _iter56 : struct.my_stringlist) + { + oprot.writeString(_iter56); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_structlist != null) { + if (struct.isSetMy_structlist()) { + oprot.writeFieldBegin(MY_STRUCTLIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.my_structlist.size())); + for (MiniStruct _iter57 : struct.my_structlist) + { + _iter57.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_enumlist != null) { + if (struct.isSetMy_enumlist()) { + oprot.writeFieldBegin(MY_ENUMLIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.my_enumlist.size())); + for (MyEnum _iter58 : struct.my_enumlist) + { + oprot.writeI32(_iter58.getValue()); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_stringset != null) { + if (struct.isSetMy_stringset()) { + oprot.writeFieldBegin(MY_STRINGSET_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.my_stringset.size())); + for (String _iter59 : struct.my_stringset) + { + oprot.writeString(_iter59); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_enumset != null) { + if (struct.isSetMy_enumset()) { + oprot.writeFieldBegin(MY_ENUMSET_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.my_enumset.size())); + for (MyEnum _iter60 : struct.my_enumset) + { + oprot.writeI32(_iter60.getValue()); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.my_structset != null) { + if (struct.isSetMy_structset()) { + oprot.writeFieldBegin(MY_STRUCTSET_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.my_structset.size())); + for (MiniStruct _iter61 : struct.my_structset) + { + _iter61.write(oprot); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MegaStructTupleSchemeFactory implements SchemeFactory { + public MegaStructTupleScheme getScheme() { + return new MegaStructTupleScheme(); + } + } + + private static class MegaStructTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, MegaStruct struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMy_bool()) { + optionals.set(0); + } + if (struct.isSetMy_byte()) { + optionals.set(1); + } + if (struct.isSetMy_16bit_int()) { + optionals.set(2); + } + if (struct.isSetMy_32bit_int()) { + optionals.set(3); + } + if (struct.isSetMy_64bit_int()) { + optionals.set(4); + } + if (struct.isSetMy_double()) { + optionals.set(5); + } + if (struct.isSetMy_string()) { + optionals.set(6); + } + if (struct.isSetMy_binary()) { + optionals.set(7); + } + if (struct.isSetMy_string_string_map()) { + optionals.set(8); + } + if (struct.isSetMy_string_enum_map()) { + optionals.set(9); + } + if (struct.isSetMy_enum_string_map()) { + optionals.set(10); + } + if (struct.isSetMy_enum_struct_map()) { + optionals.set(11); + } + if (struct.isSetMy_enum_stringlist_map()) { + optionals.set(12); + } + if (struct.isSetMy_enum_structlist_map()) { + optionals.set(13); + } + if (struct.isSetMy_stringlist()) { + optionals.set(14); + } + if (struct.isSetMy_structlist()) { + optionals.set(15); + } + if (struct.isSetMy_enumlist()) { + optionals.set(16); + } + if (struct.isSetMy_stringset()) { + optionals.set(17); + } + if (struct.isSetMy_enumset()) { + optionals.set(18); + } + if (struct.isSetMy_structset()) { + optionals.set(19); + } + oprot.writeBitSet(optionals, 20); + if (struct.isSetMy_bool()) { + oprot.writeBool(struct.my_bool); + } + if (struct.isSetMy_byte()) { + oprot.writeByte(struct.my_byte); + } + if (struct.isSetMy_16bit_int()) { + oprot.writeI16(struct.my_16bit_int); + } + if (struct.isSetMy_32bit_int()) { + oprot.writeI32(struct.my_32bit_int); + } + if (struct.isSetMy_64bit_int()) { + oprot.writeI64(struct.my_64bit_int); + } + if (struct.isSetMy_double()) { + oprot.writeDouble(struct.my_double); + } + if (struct.isSetMy_string()) { + oprot.writeString(struct.my_string); + } + if (struct.isSetMy_binary()) { + oprot.writeBinary(struct.my_binary); + } + if (struct.isSetMy_string_string_map()) { + { + oprot.writeI32(struct.my_string_string_map.size()); + for (Map.Entry _iter62 : struct.my_string_string_map.entrySet()) + { + oprot.writeString(_iter62.getKey()); + oprot.writeString(_iter62.getValue()); + } + } + } + if (struct.isSetMy_string_enum_map()) { + { + oprot.writeI32(struct.my_string_enum_map.size()); + for (Map.Entry _iter63 : struct.my_string_enum_map.entrySet()) + { + oprot.writeString(_iter63.getKey()); + oprot.writeI32(_iter63.getValue().getValue()); + } + } + } + if (struct.isSetMy_enum_string_map()) { + { + oprot.writeI32(struct.my_enum_string_map.size()); + for (Map.Entry _iter64 : struct.my_enum_string_map.entrySet()) + { + oprot.writeI32(_iter64.getKey().getValue()); + oprot.writeString(_iter64.getValue()); + } + } + } + if (struct.isSetMy_enum_struct_map()) { + { + oprot.writeI32(struct.my_enum_struct_map.size()); + for (Map.Entry _iter65 : struct.my_enum_struct_map.entrySet()) + { + oprot.writeI32(_iter65.getKey().getValue()); + _iter65.getValue().write(oprot); + } + } + } + if (struct.isSetMy_enum_stringlist_map()) { + { + oprot.writeI32(struct.my_enum_stringlist_map.size()); + for (Map.Entry> _iter66 : struct.my_enum_stringlist_map.entrySet()) + { + oprot.writeI32(_iter66.getKey().getValue()); + { + oprot.writeI32(_iter66.getValue().size()); + for (String _iter67 : _iter66.getValue()) + { + oprot.writeString(_iter67); + } + } + } + } + } + if (struct.isSetMy_enum_structlist_map()) { + { + oprot.writeI32(struct.my_enum_structlist_map.size()); + for (Map.Entry> _iter68 : struct.my_enum_structlist_map.entrySet()) + { + oprot.writeI32(_iter68.getKey().getValue()); + { + oprot.writeI32(_iter68.getValue().size()); + for (MiniStruct _iter69 : _iter68.getValue()) + { + _iter69.write(oprot); + } + } + } + } + } + if (struct.isSetMy_stringlist()) { + { + oprot.writeI32(struct.my_stringlist.size()); + for (String _iter70 : struct.my_stringlist) + { + oprot.writeString(_iter70); + } + } + } + if (struct.isSetMy_structlist()) { + { + oprot.writeI32(struct.my_structlist.size()); + for (MiniStruct _iter71 : struct.my_structlist) + { + _iter71.write(oprot); + } + } + } + if (struct.isSetMy_enumlist()) { + { + oprot.writeI32(struct.my_enumlist.size()); + for (MyEnum _iter72 : struct.my_enumlist) + { + oprot.writeI32(_iter72.getValue()); + } + } + } + if (struct.isSetMy_stringset()) { + { + oprot.writeI32(struct.my_stringset.size()); + for (String _iter73 : struct.my_stringset) + { + oprot.writeString(_iter73); + } + } + } + if (struct.isSetMy_enumset()) { + { + oprot.writeI32(struct.my_enumset.size()); + for (MyEnum _iter74 : struct.my_enumset) + { + oprot.writeI32(_iter74.getValue()); + } + } + } + if (struct.isSetMy_structset()) { + { + oprot.writeI32(struct.my_structset.size()); + for (MiniStruct _iter75 : struct.my_structset) + { + _iter75.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, MegaStruct struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(20); + if (incoming.get(0)) { + struct.my_bool = iprot.readBool(); + struct.setMy_boolIsSet(true); + } + if (incoming.get(1)) { + struct.my_byte = iprot.readByte(); + struct.setMy_byteIsSet(true); + } + if (incoming.get(2)) { + struct.my_16bit_int = iprot.readI16(); + struct.setMy_16bit_intIsSet(true); + } + if (incoming.get(3)) { + struct.my_32bit_int = iprot.readI32(); + struct.setMy_32bit_intIsSet(true); + } + if (incoming.get(4)) { + struct.my_64bit_int = iprot.readI64(); + struct.setMy_64bit_intIsSet(true); + } + if (incoming.get(5)) { + struct.my_double = iprot.readDouble(); + struct.setMy_doubleIsSet(true); + } + if (incoming.get(6)) { + struct.my_string = iprot.readString(); + struct.setMy_stringIsSet(true); + } + if (incoming.get(7)) { + struct.my_binary = iprot.readBinary(); + struct.setMy_binaryIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TMap _map76 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.my_string_string_map = new HashMap(2*_map76.size); + for (int _i77 = 0; _i77 < _map76.size; ++_i77) + { + String _key78; // required + String _val79; // required + _key78 = iprot.readString(); + _val79 = iprot.readString(); + struct.my_string_string_map.put(_key78, _val79); + } + } + struct.setMy_string_string_mapIsSet(true); + } + if (incoming.get(9)) { + { + org.apache.thrift.protocol.TMap _map80 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.my_string_enum_map = new HashMap(2*_map80.size); + for (int _i81 = 0; _i81 < _map80.size; ++_i81) + { + String _key82; // required + MyEnum _val83; // required + _key82 = iprot.readString(); + _val83 = MyEnum.findByValue(iprot.readI32()); + struct.my_string_enum_map.put(_key82, _val83); + } + } + struct.setMy_string_enum_mapIsSet(true); + } + if (incoming.get(10)) { + { + org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.my_enum_string_map = new HashMap(2*_map84.size); + for (int _i85 = 0; _i85 < _map84.size; ++_i85) + { + MyEnum _key86; // required + String _val87; // required + _key86 = MyEnum.findByValue(iprot.readI32()); + _val87 = iprot.readString(); + struct.my_enum_string_map.put(_key86, _val87); + } + } + struct.setMy_enum_string_mapIsSet(true); + } + if (incoming.get(11)) { + { + org.apache.thrift.protocol.TMap _map88 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.my_enum_struct_map = new HashMap(2*_map88.size); + for (int _i89 = 0; _i89 < _map88.size; ++_i89) + { + MyEnum _key90; // required + MiniStruct _val91; // required + _key90 = MyEnum.findByValue(iprot.readI32()); + _val91 = new MiniStruct(); + _val91.read(iprot); + struct.my_enum_struct_map.put(_key90, _val91); + } + } + struct.setMy_enum_struct_mapIsSet(true); + } + if (incoming.get(12)) { + { + org.apache.thrift.protocol.TMap _map92 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.my_enum_stringlist_map = new HashMap>(2*_map92.size); + for (int _i93 = 0; _i93 < _map92.size; ++_i93) + { + MyEnum _key94; // required + List _val95; // required + _key94 = MyEnum.findByValue(iprot.readI32()); + { + org.apache.thrift.protocol.TList _list96 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _val95 = new ArrayList(_list96.size); + for (int _i97 = 0; _i97 < _list96.size; ++_i97) + { + String _elem98; // required + _elem98 = iprot.readString(); + _val95.add(_elem98); + } + } + struct.my_enum_stringlist_map.put(_key94, _val95); + } + } + struct.setMy_enum_stringlist_mapIsSet(true); + } + if (incoming.get(13)) { + { + org.apache.thrift.protocol.TMap _map99 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.my_enum_structlist_map = new HashMap>(2*_map99.size); + for (int _i100 = 0; _i100 < _map99.size; ++_i100) + { + MyEnum _key101; // required + List _val102; // required + _key101 = MyEnum.findByValue(iprot.readI32()); + { + org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val102 = new ArrayList(_list103.size); + for (int _i104 = 0; _i104 < _list103.size; ++_i104) + { + MiniStruct _elem105; // required + _elem105 = new MiniStruct(); + _elem105.read(iprot); + _val102.add(_elem105); + } + } + struct.my_enum_structlist_map.put(_key101, _val102); + } + } + struct.setMy_enum_structlist_mapIsSet(true); + } + if (incoming.get(14)) { + { + org.apache.thrift.protocol.TList _list106 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.my_stringlist = new ArrayList(_list106.size); + for (int _i107 = 0; _i107 < _list106.size; ++_i107) + { + String _elem108; // required + _elem108 = iprot.readString(); + struct.my_stringlist.add(_elem108); + } + } + struct.setMy_stringlistIsSet(true); + } + if (incoming.get(15)) { + { + org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.my_structlist = new ArrayList(_list109.size); + for (int _i110 = 0; _i110 < _list109.size; ++_i110) + { + MiniStruct _elem111; // required + _elem111 = new MiniStruct(); + _elem111.read(iprot); + struct.my_structlist.add(_elem111); + } + } + struct.setMy_structlistIsSet(true); + } + if (incoming.get(16)) { + { + org.apache.thrift.protocol.TList _list112 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.my_enumlist = new ArrayList(_list112.size); + for (int _i113 = 0; _i113 < _list112.size; ++_i113) + { + MyEnum _elem114; // required + _elem114 = MyEnum.findByValue(iprot.readI32()); + struct.my_enumlist.add(_elem114); + } + } + struct.setMy_enumlistIsSet(true); + } + if (incoming.get(17)) { + { + org.apache.thrift.protocol.TSet _set115 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.my_stringset = new HashSet(2*_set115.size); + for (int _i116 = 0; _i116 < _set115.size; ++_i116) + { + String _elem117; // required + _elem117 = iprot.readString(); + struct.my_stringset.add(_elem117); + } + } + struct.setMy_stringsetIsSet(true); + } + if (incoming.get(18)) { + { + org.apache.thrift.protocol.TSet _set118 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.my_enumset = new HashSet(2*_set118.size); + for (int _i119 = 0; _i119 < _set118.size; ++_i119) + { + MyEnum _elem120; // required + _elem120 = MyEnum.findByValue(iprot.readI32()); + struct.my_enumset.add(_elem120); + } + } + struct.setMy_enumsetIsSet(true); + } + if (incoming.get(19)) { + { + org.apache.thrift.protocol.TSet _set121 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.my_structset = new HashSet(2*_set121.size); + for (int _i122 = 0; _i122 < _set121.size; ++_i122) + { + MiniStruct _elem123; // required + _elem123 = new MiniStruct(); + _elem123.read(iprot); + struct.my_structset.add(_elem123); + } + } + struct.setMy_structsetIsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php =================================================================== --- serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php (revision 0) +++ serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php (revision 0) @@ -0,0 +1,106 @@ + true, + "boolean" => true, + "tinyint" => true, + "smallint" => true, + "int" => true, + "bigint" => true, + "float" => true, + "double" => true, + "string" => true, + "date" => true, + "datetime" => true, + "timestamp" => true, + "binary" => true, +); + +$GLOBALS['serde_CONSTANTS']['CollectionTypes'] = array( + "array" => true, + "map" => true, +); + + Index: serde/build.xml =================================================================== --- serde/build.xml (revision 1406838) +++ serde/build.xml (working copy) @@ -66,6 +66,10 @@ + Executing ${thrift.home}/bin/thrift to build megastruct.thrift classes... + + + Index: ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreChecker.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreChecker.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreChecker.java (working copy) @@ -33,7 +33,7 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.mapred.TextInputFormat; import org.apache.thrift.TException; @@ -63,8 +63,8 @@ checker = new HiveMetaStoreChecker(hive); partCols = new ArrayList(); - partCols.add(new FieldSchema(partDateName, Constants.STRING_TYPE_NAME, "")); - partCols.add(new FieldSchema(partCityName, Constants.STRING_TYPE_NAME, "")); + partCols.add(new FieldSchema(partDateName, serdeConstants.STRING_TYPE_NAME, "")); + partCols.add(new FieldSchema(partCityName, serdeConstants.STRING_TYPE_NAME, "")); parts = new ArrayList>(); Map part1 = new HashMap(); Index: ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java (working copy) @@ -34,7 +34,7 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.hive.serde2.thrift.ThriftDeserializer; import org.apache.hadoop.hive.serde2.thrift.test.Complex; @@ -94,9 +94,9 @@ Table tbl = new Table(MetaStoreUtils.DEFAULT_DATABASE_NAME, tableName); List fields = tbl.getCols(); - fields.add(new FieldSchema("col1", Constants.INT_TYPE_NAME, "int -- first column")); - fields.add(new FieldSchema("col2", Constants.STRING_TYPE_NAME, "string -- second column")); - fields.add(new FieldSchema("col3", Constants.DOUBLE_TYPE_NAME, "double -- thrift column")); + fields.add(new FieldSchema("col1", serdeConstants.INT_TYPE_NAME, "int -- first column")); + fields.add(new FieldSchema("col2", serdeConstants.STRING_TYPE_NAME, "string -- second column")); + fields.add(new FieldSchema("col3", serdeConstants.DOUBLE_TYPE_NAME, "double -- thrift column")); tbl.setFields(fields); tbl.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class); @@ -117,7 +117,7 @@ partCols .add(new FieldSchema( "ds", - Constants.STRING_TYPE_NAME, + serdeConstants.STRING_TYPE_NAME, "partition column, date but in string format as date type is not yet supported in QL")); tbl.setPartCols(partCols); @@ -127,12 +127,12 @@ // set output format parameters (these are not supported by QL but only // for demo purposes) - tbl.setSerdeParam(Constants.FIELD_DELIM, "1"); - tbl.setSerdeParam(Constants.LINE_DELIM, "\n"); - tbl.setSerdeParam(Constants.MAPKEY_DELIM, "3"); - tbl.setSerdeParam(Constants.COLLECTION_DELIM, "2"); + tbl.setSerdeParam(serdeConstants.FIELD_DELIM, "1"); + tbl.setSerdeParam(serdeConstants.LINE_DELIM, "\n"); + tbl.setSerdeParam(serdeConstants.MAPKEY_DELIM, "3"); + tbl.setSerdeParam(serdeConstants.COLLECTION_DELIM, "2"); - tbl.setSerdeParam(Constants.FIELD_DELIM, "1"); + tbl.setSerdeParam(serdeConstants.FIELD_DELIM, "1"); tbl.setSerializationLib(LazySimpleSerDe.class.getName()); // create table @@ -206,8 +206,8 @@ tbl.setInputFormatClass(SequenceFileInputFormat.class.getName()); tbl.setOutputFormatClass(SequenceFileOutputFormat.class.getName()); tbl.setSerializationLib(ThriftDeserializer.class.getName()); - tbl.setSerdeParam(Constants.SERIALIZATION_CLASS, Complex.class.getName()); - tbl.setSerdeParam(Constants.SERIALIZATION_FORMAT, TBinaryProtocol.class + tbl.setSerdeParam(serdeConstants.SERIALIZATION_CLASS, Complex.class.getName()); + tbl.setSerdeParam(serdeConstants.SERIALIZATION_FORMAT, TBinaryProtocol.class .getName()); try { hm.createTable(tbl); @@ -257,8 +257,8 @@ tbl.setInputFormatClass(SequenceFileInputFormat.class.getName()); tbl.setOutputFormatClass(SequenceFileOutputFormat.class.getName()); tbl.setSerializationLib(ThriftDeserializer.class.getName()); - tbl.setSerdeParam(Constants.SERIALIZATION_CLASS, Complex.class.getName()); - tbl.setSerdeParam(Constants.SERIALIZATION_FORMAT, TBinaryProtocol.class + tbl.setSerdeParam(serdeConstants.SERIALIZATION_CLASS, Complex.class.getName()); + tbl.setSerdeParam(serdeConstants.SERIALIZATION_FORMAT, TBinaryProtocol.class .getName()); return tbl; } Index: ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java (working copy) @@ -48,7 +48,7 @@ import org.apache.hadoop.hive.ql.plan.ReduceSinkDesc; import org.apache.hadoop.hive.ql.plan.ScriptDesc; import org.apache.hadoop.hive.ql.plan.SelectDesc; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; import org.apache.hadoop.mapred.TextInputFormat; @@ -161,14 +161,14 @@ column, "", false)); ExprNodeDesc lhs = new ExprNodeGenericFuncDesc( TypeInfoFactory.doubleTypeInfo, FunctionRegistry.getFunctionInfo( - Constants.DOUBLE_TYPE_NAME).getGenericUDF(), children1); + serdeConstants.DOUBLE_TYPE_NAME).getGenericUDF(), children1); ArrayList children2 = new ArrayList(); children2.add(new ExprNodeConstantDesc(TypeInfoFactory.longTypeInfo, Long .valueOf(100))); ExprNodeDesc rhs = new ExprNodeGenericFuncDesc( TypeInfoFactory.doubleTypeInfo, FunctionRegistry.getFunctionInfo( - Constants.DOUBLE_TYPE_NAME).getGenericUDF(), children2); + serdeConstants.DOUBLE_TYPE_NAME).getGenericUDF(), children2); ArrayList children3 = new ArrayList(); children3.add(lhs); Index: ql/src/test/org/apache/hadoop/hive/ql/exec/TestExpressionEvaluator.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/exec/TestExpressionEvaluator.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/exec/TestExpressionEvaluator.java (working copy) @@ -28,7 +28,7 @@ import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.InspectableObject; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils; @@ -162,7 +162,7 @@ false); ExprNodeDesc col11desc = getListIndexNode(col1desc, 1); ExprNodeDesc func1 = TypeCheckProcFactory.DefaultExprProcessor - .getFuncExprNodeDesc(Constants.DOUBLE_TYPE_NAME, col11desc); + .getFuncExprNodeDesc(serdeConstants.DOUBLE_TYPE_NAME, col11desc); ExprNodeEvaluator eval = ExprNodeEvaluatorFactory.get(func1); // evaluate on row Index: ql/src/test/org/apache/hadoop/hive/ql/io/TestRCFile.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/io/TestRCFile.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/io/TestRCFile.java (working copy) @@ -37,7 +37,7 @@ import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.ColumnProjectionUtils; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.columnar.BytesRefArrayWritable; @@ -380,12 +380,12 @@ Properties tbl = new Properties(); // Set the configuration parameters - tbl.setProperty(Constants.SERIALIZATION_FORMAT, "9"); + tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "abyte,ashort,aint,along,adouble,astring,anullint,anullstring"); tbl.setProperty("columns.types", "tinyint:smallint:int:bigint:double:string:int:string"); - tbl.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "NULL"); + tbl.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL"); return tbl; } Index: ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEvaluateNPE.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEvaluateNPE.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEvaluateNPE.java (working copy) @@ -25,7 +25,7 @@ import org.apache.hadoop.hive.ql.exec.UDFArgumentLengthException; import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException; import org.apache.hadoop.hive.ql.metadata.HiveException; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory; @@ -54,10 +54,10 @@ + "needs only one argument."); } - if (!arguments[0].getTypeName().equals(Constants.STRING_TYPE_NAME)) { + if (!arguments[0].getTypeName().equals(serdeConstants.STRING_TYPE_NAME)) { throw new UDFArgumentTypeException(0, "Argument 1 of function evaluate_npe must be \"" - + Constants.STRING_TYPE_NAME + "but \"" + + serdeConstants.STRING_TYPE_NAME + "but \"" + arguments[0].getTypeName() + "\" was found."); } Index: ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTestTranslate.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTestTranslate.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTestTranslate.java (working copy) @@ -25,7 +25,7 @@ import org.apache.hadoop.hive.ql.exec.UDFArgumentLengthException; import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException; import org.apache.hadoop.hive.ql.metadata.HiveException; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory; import org.apache.hadoop.hive.serde2.objectinspector.primitive.StringObjectInspector; @@ -56,11 +56,11 @@ } for (int i = 0; i < 3; i++) { - if (arguments[i].getTypeName() != Constants.STRING_TYPE_NAME - && arguments[i].getTypeName() != Constants.VOID_TYPE_NAME) { + if (arguments[i].getTypeName() != serdeConstants.STRING_TYPE_NAME + && arguments[i].getTypeName() != serdeConstants.VOID_TYPE_NAME) { throw new UDFArgumentTypeException(i, "The " + getOrdinal(i + 1) + " argument of function TRANSLATE is expected to \"" - + Constants.STRING_TYPE_NAME + "\", but \"" + + serdeConstants.STRING_TYPE_NAME + "\", but \"" + arguments[i].getTypeName() + "\" is found"); } } Index: ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (revision 1406838) +++ ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (working copy) @@ -71,7 +71,7 @@ import org.apache.hadoop.hive.ql.parse.SemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.SemanticException; import org.apache.hadoop.hive.ql.session.SessionState; -import org.apache.hadoop.hive.serde.Constants; +import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.thrift.ThriftDeserializer; import org.apache.hadoop.hive.serde2.thrift.test.Complex; import org.apache.hadoop.hive.shims.HadoopShims; @@ -593,9 +593,9 @@ srcThrift.setInputFormatClass(SequenceFileInputFormat.class.getName()); srcThrift.setOutputFormatClass(SequenceFileOutputFormat.class.getName()); srcThrift.setSerializationLib(ThriftDeserializer.class.getName()); - srcThrift.setSerdeParam(Constants.SERIALIZATION_CLASS, Complex.class + srcThrift.setSerdeParam(serdeConstants.SERIALIZATION_CLASS, Complex.class .getName()); - srcThrift.setSerdeParam(Constants.SERIALIZATION_FORMAT, + srcThrift.setSerdeParam(serdeConstants.SERIALIZATION_FORMAT, TBinaryProtocol.class.getName()); db.createTable(srcThrift); Index: ql/src/gen/thrift/gen-py/queryplan/ttypes.py =================================================================== --- ql/src/gen/thrift/gen-py/queryplan/ttypes.py (revision 1406838) +++ ql/src/gen/thrift/gen-py/queryplan/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol Index: ql/src/gen/thrift/gen-py/queryplan/constants.py =================================================================== --- ql/src/gen/thrift/gen-py/queryplan/constants.py (revision 1406838) +++ ql/src/gen/thrift/gen-py/queryplan/constants.py (working copy) @@ -1,9 +1,11 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * Index: ql/src/gen/thrift/gen-py/__init__.py =================================================================== Index: ql/src/gen/thrift/gen-cpp/queryplan_constants.h =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_constants.h (revision 1406838) +++ ql/src/gen/thrift/gen-cpp/queryplan_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef queryplan_CONSTANTS_H #define queryplan_CONSTANTS_H Index: ql/src/gen/thrift/gen-cpp/queryplan_types.cpp =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_types.cpp (revision 1406838) +++ ql/src/gen/thrift/gen-cpp/queryplan_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "queryplan_types.h" +#include + namespace Apache { namespace Hadoop { namespace Hive { int _kAdjacencyTypeValues[] = { @@ -148,14 +151,14 @@ this->children.clear(); uint32_t _size0; ::apache::thrift::protocol::TType _etype3; - iprot->readListBegin(_etype3, _size0); + xfer += iprot->readListBegin(_etype3, _size0); this->children.resize(_size0); uint32_t _i4; for (_i4 = 0; _i4 < _size0; ++_i4) { xfer += iprot->readString(this->children[_i4]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.children = true; } else { @@ -187,9 +190,11 @@ uint32_t Adjacency::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Adjacency"); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->node); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("children", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->children.size())); @@ -201,14 +206,24 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyType", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->adjacencyType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Adjacency &a, Adjacency &b) { + using ::std::swap; + swap(a.node, b.node); + swap(a.children, b.children); + swap(a.adjacencyType, b.adjacencyType); + swap(a.__isset, b.__isset); +} + const char* Graph::ascii_fingerprint = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; const uint8_t Graph::binary_fingerprint[16] = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; @@ -248,14 +263,14 @@ this->roots.clear(); uint32_t _size8; ::apache::thrift::protocol::TType _etype11; - iprot->readListBegin(_etype11, _size8); + xfer += iprot->readListBegin(_etype11, _size8); this->roots.resize(_size8); uint32_t _i12; for (_i12 = 0; _i12 < _size8; ++_i12) { xfer += iprot->readString(this->roots[_i12]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.roots = true; } else { @@ -268,14 +283,14 @@ this->adjacencyList.clear(); uint32_t _size13; ::apache::thrift::protocol::TType _etype16; - iprot->readListBegin(_etype16, _size13); + xfer += iprot->readListBegin(_etype16, _size13); this->adjacencyList.resize(_size13); uint32_t _i17; for (_i17 = 0; _i17 < _size13; ++_i17) { xfer += this->adjacencyList[_i17].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.adjacencyList = true; } else { @@ -297,9 +312,11 @@ uint32_t Graph::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Graph"); + xfer += oprot->writeFieldBegin("nodeType", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->nodeType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("roots", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->roots.size())); @@ -311,6 +328,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyList", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->adjacencyList.size())); @@ -322,11 +340,20 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Graph &a, Graph &b) { + using ::std::swap; + swap(a.nodeType, b.nodeType); + swap(a.roots, b.roots); + swap(a.adjacencyList, b.adjacencyList); + swap(a.__isset, b.__isset); +} + const char* Operator::ascii_fingerprint = "30917C758A752485AF223B697479DE6C"; const uint8_t Operator::binary_fingerprint[16] = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; @@ -375,7 +402,7 @@ uint32_t _size21; ::apache::thrift::protocol::TType _ktype22; ::apache::thrift::protocol::TType _vtype23; - iprot->readMapBegin(_ktype22, _vtype23, _size21); + xfer += iprot->readMapBegin(_ktype22, _vtype23, _size21); uint32_t _i25; for (_i25 = 0; _i25 < _size21; ++_i25) { @@ -384,7 +411,7 @@ std::string& _val27 = this->operatorAttributes[_key26]; xfer += iprot->readString(_val27); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.operatorAttributes = true; } else { @@ -398,7 +425,7 @@ uint32_t _size28; ::apache::thrift::protocol::TType _ktype29; ::apache::thrift::protocol::TType _vtype30; - iprot->readMapBegin(_ktype29, _vtype30, _size28); + xfer += iprot->readMapBegin(_ktype29, _vtype30, _size28); uint32_t _i32; for (_i32 = 0; _i32 < _size28; ++_i32) { @@ -407,7 +434,7 @@ int64_t& _val34 = this->operatorCounters[_key33]; xfer += iprot->readI64(_val34); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.operatorCounters = true; } else { @@ -445,12 +472,15 @@ uint32_t Operator::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Operator"); + xfer += oprot->writeFieldBegin("operatorId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->operatorId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorType", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->operatorType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->operatorAttributes.size())); @@ -463,6 +493,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->operatorCounters.size())); @@ -475,17 +506,31 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 5); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Operator &a, Operator &b) { + using ::std::swap; + swap(a.operatorId, b.operatorId); + swap(a.operatorType, b.operatorType); + swap(a.operatorAttributes, b.operatorAttributes); + swap(a.operatorCounters, b.operatorCounters); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* Task::ascii_fingerprint = "AC741A136EFA51843AFC3A12F6A793D1"; const uint8_t Task::binary_fingerprint[16] = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; @@ -534,7 +579,7 @@ uint32_t _size38; ::apache::thrift::protocol::TType _ktype39; ::apache::thrift::protocol::TType _vtype40; - iprot->readMapBegin(_ktype39, _vtype40, _size38); + xfer += iprot->readMapBegin(_ktype39, _vtype40, _size38); uint32_t _i42; for (_i42 = 0; _i42 < _size38; ++_i42) { @@ -543,7 +588,7 @@ std::string& _val44 = this->taskAttributes[_key43]; xfer += iprot->readString(_val44); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.taskAttributes = true; } else { @@ -557,7 +602,7 @@ uint32_t _size45; ::apache::thrift::protocol::TType _ktype46; ::apache::thrift::protocol::TType _vtype47; - iprot->readMapBegin(_ktype46, _vtype47, _size45); + xfer += iprot->readMapBegin(_ktype46, _vtype47, _size45); uint32_t _i49; for (_i49 = 0; _i49 < _size45; ++_i49) { @@ -566,7 +611,7 @@ int64_t& _val51 = this->taskCounters[_key50]; xfer += iprot->readI64(_val51); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.taskCounters = true; } else { @@ -587,14 +632,14 @@ this->operatorList.clear(); uint32_t _size52; ::apache::thrift::protocol::TType _etype55; - iprot->readListBegin(_etype55, _size52); + xfer += iprot->readListBegin(_etype55, _size52); this->operatorList.resize(_size52); uint32_t _i56; for (_i56 = 0; _i56 < _size52; ++_i56) { xfer += this->operatorList[_i56].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.operatorList = true; } else { @@ -632,12 +677,15 @@ uint32_t Task::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Task"); + xfer += oprot->writeFieldBegin("taskId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->taskId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskType", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->taskType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->taskAttributes.size())); @@ -650,6 +698,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->taskCounters.size())); @@ -662,6 +711,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.operatorGraph) { xfer += oprot->writeFieldBegin("operatorGraph", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->operatorGraph.write(oprot); @@ -683,14 +733,29 @@ xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Task &a, Task &b) { + using ::std::swap; + swap(a.taskId, b.taskId); + swap(a.taskType, b.taskType); + swap(a.taskAttributes, b.taskAttributes); + swap(a.taskCounters, b.taskCounters); + swap(a.operatorGraph, b.operatorGraph); + swap(a.operatorList, b.operatorList); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* Stage::ascii_fingerprint = "86EA3C7B0690AFED21A3D479E2B32378"; const uint8_t Stage::binary_fingerprint[16] = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; @@ -739,7 +804,7 @@ uint32_t _size61; ::apache::thrift::protocol::TType _ktype62; ::apache::thrift::protocol::TType _vtype63; - iprot->readMapBegin(_ktype62, _vtype63, _size61); + xfer += iprot->readMapBegin(_ktype62, _vtype63, _size61); uint32_t _i65; for (_i65 = 0; _i65 < _size61; ++_i65) { @@ -748,7 +813,7 @@ std::string& _val67 = this->stageAttributes[_key66]; xfer += iprot->readString(_val67); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.stageAttributes = true; } else { @@ -762,7 +827,7 @@ uint32_t _size68; ::apache::thrift::protocol::TType _ktype69; ::apache::thrift::protocol::TType _vtype70; - iprot->readMapBegin(_ktype69, _vtype70, _size68); + xfer += iprot->readMapBegin(_ktype69, _vtype70, _size68); uint32_t _i72; for (_i72 = 0; _i72 < _size68; ++_i72) { @@ -771,7 +836,7 @@ int64_t& _val74 = this->stageCounters[_key73]; xfer += iprot->readI64(_val74); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.stageCounters = true; } else { @@ -784,14 +849,14 @@ this->taskList.clear(); uint32_t _size75; ::apache::thrift::protocol::TType _etype78; - iprot->readListBegin(_etype78, _size75); + xfer += iprot->readListBegin(_etype78, _size75); this->taskList.resize(_size75); uint32_t _i79; for (_i79 = 0; _i79 < _size75; ++_i79) { xfer += this->taskList[_i79].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.taskList = true; } else { @@ -829,12 +894,15 @@ uint32_t Stage::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Stage"); + xfer += oprot->writeFieldBegin("stageId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->stageId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageType", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->stageType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->stageAttributes.size())); @@ -847,6 +915,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->stageCounters.size())); @@ -859,6 +928,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskList", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->taskList.size())); @@ -870,17 +940,32 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 7); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Stage &a, Stage &b) { + using ::std::swap; + swap(a.stageId, b.stageId); + swap(a.stageType, b.stageType); + swap(a.stageAttributes, b.stageAttributes); + swap(a.stageCounters, b.stageCounters); + swap(a.taskList, b.taskList); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* Query::ascii_fingerprint = "68300D63A5D40F2D17B9A9440FF626C1"; const uint8_t Query::binary_fingerprint[16] = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; @@ -927,7 +1012,7 @@ uint32_t _size83; ::apache::thrift::protocol::TType _ktype84; ::apache::thrift::protocol::TType _vtype85; - iprot->readMapBegin(_ktype84, _vtype85, _size83); + xfer += iprot->readMapBegin(_ktype84, _vtype85, _size83); uint32_t _i87; for (_i87 = 0; _i87 < _size83; ++_i87) { @@ -936,7 +1021,7 @@ std::string& _val89 = this->queryAttributes[_key88]; xfer += iprot->readString(_val89); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.queryAttributes = true; } else { @@ -950,7 +1035,7 @@ uint32_t _size90; ::apache::thrift::protocol::TType _ktype91; ::apache::thrift::protocol::TType _vtype92; - iprot->readMapBegin(_ktype91, _vtype92, _size90); + xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); uint32_t _i94; for (_i94 = 0; _i94 < _size90; ++_i94) { @@ -959,7 +1044,7 @@ int64_t& _val96 = this->queryCounters[_key95]; xfer += iprot->readI64(_val96); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.queryCounters = true; } else { @@ -980,14 +1065,14 @@ this->stageList.clear(); uint32_t _size97; ::apache::thrift::protocol::TType _etype100; - iprot->readListBegin(_etype100, _size97); + xfer += iprot->readListBegin(_etype100, _size97); this->stageList.resize(_size97); uint32_t _i101; for (_i101 = 0; _i101 < _size97; ++_i101) { xfer += this->stageList[_i101].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.stageList = true; } else { @@ -1025,12 +1110,15 @@ uint32_t Query::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Query"); + xfer += oprot->writeFieldBegin("queryId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->queryId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryType", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->queryType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->queryAttributes.size())); @@ -1043,6 +1131,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->queryCounters.size())); @@ -1055,9 +1144,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageGraph", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->stageGraph.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageList", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->stageList.size())); @@ -1069,17 +1160,33 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Query &a, Query &b) { + using ::std::swap; + swap(a.queryId, b.queryId); + swap(a.queryType, b.queryType); + swap(a.queryAttributes, b.queryAttributes); + swap(a.queryCounters, b.queryCounters); + swap(a.stageGraph, b.stageGraph); + swap(a.stageList, b.stageList); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* QueryPlan::ascii_fingerprint = "3418D1B0C20C288C8406186700B772E3"; const uint8_t QueryPlan::binary_fingerprint[16] = {0x34,0x18,0xD1,0xB0,0xC2,0x0C,0x28,0x8C,0x84,0x06,0x18,0x67,0x00,0xB7,0x72,0xE3}; @@ -1109,14 +1216,14 @@ this->queries.clear(); uint32_t _size105; ::apache::thrift::protocol::TType _etype108; - iprot->readListBegin(_etype108, _size105); + xfer += iprot->readListBegin(_etype108, _size105); this->queries.resize(_size105); uint32_t _i109; for (_i109 = 0; _i109 < _size105; ++_i109) { xfer += this->queries[_i109].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.queries = true; } else { @@ -1154,6 +1261,7 @@ uint32_t QueryPlan::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("QueryPlan"); + xfer += oprot->writeFieldBegin("queries", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->queries.size())); @@ -1165,15 +1273,26 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(QueryPlan &a, QueryPlan &b) { + using ::std::swap; + swap(a.queries, b.queries); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + }}} // namespace Index: ql/src/gen/thrift/gen-cpp/queryplan_types.h =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_types.h (revision 1406838) +++ ql/src/gen/thrift/gen-cpp/queryplan_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef queryplan_TYPES_H #define queryplan_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include @@ -100,7 +101,7 @@ static const char* ascii_fingerprint; // = "BC4F8C394677A1003AA9F56ED26D8204"; static const uint8_t binary_fingerprint[16]; // = {0xBC,0x4F,0x8C,0x39,0x46,0x77,0xA1,0x00,0x3A,0xA9,0xF5,0x6E,0xD2,0x6D,0x82,0x04}; - Adjacency() : node("") { + Adjacency() : node(), adjacencyType((AdjacencyType::type)0) { } virtual ~Adjacency() throw() {} @@ -144,6 +145,8 @@ }; +void swap(Adjacency &a, Adjacency &b); + typedef struct _Graph__isset { _Graph__isset() : nodeType(false), roots(false), adjacencyList(false) {} bool nodeType; @@ -157,7 +160,7 @@ static const char* ascii_fingerprint; // = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; static const uint8_t binary_fingerprint[16]; // = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; - Graph() { + Graph() : nodeType((NodeType::type)0) { } virtual ~Graph() throw() {} @@ -201,6 +204,8 @@ }; +void swap(Graph &a, Graph &b); + typedef struct _Operator__isset { _Operator__isset() : operatorId(false), operatorType(false), operatorAttributes(false), operatorCounters(false), done(false), started(false) {} bool operatorId; @@ -217,7 +222,7 @@ static const char* ascii_fingerprint; // = "30917C758A752485AF223B697479DE6C"; static const uint8_t binary_fingerprint[16]; // = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; - Operator() : operatorId(""), done(0), started(0) { + Operator() : operatorId(), operatorType((OperatorType::type)0), done(0), started(0) { } virtual ~Operator() throw() {} @@ -282,6 +287,8 @@ }; +void swap(Operator &a, Operator &b); + typedef struct _Task__isset { _Task__isset() : taskId(false), taskType(false), taskAttributes(false), taskCounters(false), operatorGraph(false), operatorList(false), done(false), started(false) {} bool taskId; @@ -300,7 +307,7 @@ static const char* ascii_fingerprint; // = "AC741A136EFA51843AFC3A12F6A793D1"; static const uint8_t binary_fingerprint[16]; // = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; - Task() : taskId(""), done(0), started(0) { + Task() : taskId(), taskType((TaskType::type)0), done(0), started(0) { } virtual ~Task() throw() {} @@ -385,6 +392,8 @@ }; +void swap(Task &a, Task &b); + typedef struct _Stage__isset { _Stage__isset() : stageId(false), stageType(false), stageAttributes(false), stageCounters(false), taskList(false), done(false), started(false) {} bool stageId; @@ -402,7 +411,7 @@ static const char* ascii_fingerprint; // = "86EA3C7B0690AFED21A3D479E2B32378"; static const uint8_t binary_fingerprint[16]; // = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; - Stage() : stageId(""), done(0), started(0) { + Stage() : stageId(), stageType((StageType::type)0), done(0), started(0) { } virtual ~Stage() throw() {} @@ -474,6 +483,8 @@ }; +void swap(Stage &a, Stage &b); + typedef struct _Query__isset { _Query__isset() : queryId(false), queryType(false), queryAttributes(false), queryCounters(false), stageGraph(false), stageList(false), done(false), started(false) {} bool queryId; @@ -492,7 +503,7 @@ static const char* ascii_fingerprint; // = "68300D63A5D40F2D17B9A9440FF626C1"; static const uint8_t binary_fingerprint[16]; // = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; - Query() : queryId(""), queryType(""), done(0), started(0) { + Query() : queryId(), queryType(), done(0), started(0) { } virtual ~Query() throw() {} @@ -571,6 +582,8 @@ }; +void swap(Query &a, Query &b); + typedef struct _QueryPlan__isset { _QueryPlan__isset() : queries(false), done(false), started(false) {} bool queries; @@ -628,6 +641,8 @@ }; +void swap(QueryPlan &a, QueryPlan &b); + }}} // namespace #endif Index: ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp (revision 1406838) +++ ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "queryplan_constants.h" Index: ql/src/gen/thrift/gen-rb/queryplan_types.rb =================================================================== --- ql/src/gen/thrift/gen-rb/queryplan_types.rb (revision 1406838) +++ ql/src/gen/thrift/gen-rb/queryplan_types.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' module AdjacencyType CONJUNCTIVE = 0 @@ -76,13 +77,13 @@ FIELDS = { NODE => {:type => ::Thrift::Types::STRING, :name => 'node'}, CHILDREN => {:type => ::Thrift::Types::LIST, :name => 'children', :element => {:type => ::Thrift::Types::STRING}}, - ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => AdjacencyType} + ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => ::AdjacencyType} } def struct_fields; FIELDS; end def validate - unless @adjacencyType.nil? || AdjacencyType::VALID_VALUES.include?(@adjacencyType) + unless @adjacencyType.nil? || ::AdjacencyType::VALID_VALUES.include?(@adjacencyType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field adjacencyType!') end end @@ -97,15 +98,15 @@ ADJACENCYLIST = 3 FIELDS = { - NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => NodeType}, + NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => ::NodeType}, ROOTS => {:type => ::Thrift::Types::LIST, :name => 'roots', :element => {:type => ::Thrift::Types::STRING}}, - ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => Adjacency}} + ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Adjacency}} } def struct_fields; FIELDS; end def validate - unless @nodeType.nil? || NodeType::VALID_VALUES.include?(@nodeType) + unless @nodeType.nil? || ::NodeType::VALID_VALUES.include?(@nodeType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field nodeType!') end end @@ -124,7 +125,7 @@ FIELDS = { OPERATORID => {:type => ::Thrift::Types::STRING, :name => 'operatorId'}, - OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => OperatorType}, + OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => ::OperatorType}, OPERATORATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'operatorAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, OPERATORCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'operatorCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, @@ -134,7 +135,7 @@ def struct_fields; FIELDS; end def validate - unless @operatorType.nil? || OperatorType::VALID_VALUES.include?(@operatorType) + unless @operatorType.nil? || ::OperatorType::VALID_VALUES.include?(@operatorType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operatorType!') end end @@ -155,11 +156,11 @@ FIELDS = { TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId'}, - TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => TaskType}, + TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => ::TaskType}, TASKATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'taskAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, TASKCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'taskCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, - OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => Graph, :optional => true}, - OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => Operator}, :optional => true}, + OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => ::Graph, :optional => true}, + OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Operator}, :optional => true}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } @@ -167,7 +168,7 @@ def struct_fields; FIELDS; end def validate - unless @taskType.nil? || TaskType::VALID_VALUES.include?(@taskType) + unless @taskType.nil? || ::TaskType::VALID_VALUES.include?(@taskType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!') end end @@ -187,10 +188,10 @@ FIELDS = { STAGEID => {:type => ::Thrift::Types::STRING, :name => 'stageId'}, - STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => StageType}, + STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => ::StageType}, STAGEATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'stageAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, STAGECOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'stageCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, - TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => Task}}, + TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Task}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } @@ -198,7 +199,7 @@ def struct_fields; FIELDS; end def validate - unless @stageType.nil? || StageType::VALID_VALUES.include?(@stageType) + unless @stageType.nil? || ::StageType::VALID_VALUES.include?(@stageType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stageType!') end end @@ -222,8 +223,8 @@ QUERYTYPE => {:type => ::Thrift::Types::STRING, :name => 'queryType'}, QUERYATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'queryAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, QUERYCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'queryCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, - STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => Graph}, - STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => Stage}}, + STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => ::Graph}, + STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Stage}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } @@ -243,7 +244,7 @@ STARTED = 3 FIELDS = { - QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Query}}, + QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Query}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } Index: ql/src/gen/thrift/gen-rb/queryplan_constants.rb =================================================================== --- ql/src/gen/thrift/gen-rb/queryplan_constants.rb (revision 1406838) +++ ql/src/gen/thrift/gen-rb/queryplan_constants.rb (working copy) @@ -1,8 +1,9 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'queryplan_types' Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new QueryPlanStandardSchemeFactory()); + schemes.put(TupleScheme.class, new QueryPlanTupleSchemeFactory()); + } + private List queries; // required private boolean done; // required private boolean started; // required @@ -99,8 +115,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -135,8 +150,7 @@ * Performs a deep copy on other. */ public QueryPlan(QueryPlan other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetQueries()) { List __this__queries = new ArrayList(); for (Query other_element : other.queries) { @@ -209,16 +223,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -231,16 +245,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -415,82 +429,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // QUERIES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - this.queries = new ArrayList(_list64.size); - for (int _i65 = 0; _i65 < _list64.size; ++_i65) - { - Query _elem66; // required - _elem66 = new Query(); - _elem66.read(iprot); - this.queries.add(_elem66); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.queries != null) { - oprot.writeFieldBegin(QUERIES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.queries.size())); - for (Query _iter67 : this.queries) - { - _iter67.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -519,6 +462,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -532,12 +476,170 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class QueryPlanStandardSchemeFactory implements SchemeFactory { + public QueryPlanStandardScheme getScheme() { + return new QueryPlanStandardScheme(); + } + } + + private static class QueryPlanStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, QueryPlan struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // QUERIES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); + struct.queries = new ArrayList(_list128.size); + for (int _i129 = 0; _i129 < _list128.size; ++_i129) + { + Query _elem130; // required + _elem130 = new Query(); + _elem130.read(iprot); + struct.queries.add(_elem130); + } + iprot.readListEnd(); + } + struct.setQueriesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, QueryPlan struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.queries != null) { + oprot.writeFieldBegin(QUERIES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.queries.size())); + for (Query _iter131 : struct.queries) + { + _iter131.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class QueryPlanTupleSchemeFactory implements SchemeFactory { + public QueryPlanTupleScheme getScheme() { + return new QueryPlanTupleScheme(); + } + } + + private static class QueryPlanTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, QueryPlan struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetQueries()) { + optionals.set(0); + } + if (struct.isSetDone()) { + optionals.set(1); + } + if (struct.isSetStarted()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetQueries()) { + { + oprot.writeI32(struct.queries.size()); + for (Query _iter132 : struct.queries) + { + _iter132.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, QueryPlan struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list133 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.queries = new ArrayList(_list133.size); + for (int _i134 = 0; _i134 < _list133.size; ++_i134) + { + Query _elem135; // required + _elem135 = new Query(); + _elem135.read(iprot); + struct.queries.add(_elem135); + } + } + struct.setQueriesIsSet(true); + } + if (incoming.get(1)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(2)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("children", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField ADJACENCY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("adjacencyType", org.apache.thrift.protocol.TType.I32, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AdjacencyStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AdjacencyTupleSchemeFactory()); + } + private String node; // required private List children; // required private AdjacencyType adjacencyType; // required @@ -101,7 +117,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -424,83 +439,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NODE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.node = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // CHILDREN - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.children = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; // required - _elem2 = iprot.readString(); - this.children.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // ADJACENCY_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.node != null) { - oprot.writeFieldBegin(NODE_FIELD_DESC); - oprot.writeString(this.node); - oprot.writeFieldEnd(); - } - if (this.children != null) { - oprot.writeFieldBegin(CHILDREN_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.children.size())); - for (String _iter3 : this.children) - { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.adjacencyType != null) { - oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); - oprot.writeI32(this.adjacencyType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -537,6 +480,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -555,5 +499,165 @@ } } + private static class AdjacencyStandardSchemeFactory implements SchemeFactory { + public AdjacencyStandardScheme getScheme() { + return new AdjacencyStandardScheme(); + } + } + + private static class AdjacencyStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Adjacency struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.node = iprot.readString(); + struct.setNodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CHILDREN + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.children = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + String _elem2; // required + _elem2 = iprot.readString(); + struct.children.add(_elem2); + } + iprot.readListEnd(); + } + struct.setChildrenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ADJACENCY_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); + struct.setAdjacencyTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Adjacency struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.node != null) { + oprot.writeFieldBegin(NODE_FIELD_DESC); + oprot.writeString(struct.node); + oprot.writeFieldEnd(); + } + if (struct.children != null) { + oprot.writeFieldBegin(CHILDREN_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.children.size())); + for (String _iter3 : struct.children) + { + oprot.writeString(_iter3); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.adjacencyType != null) { + oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); + oprot.writeI32(struct.adjacencyType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AdjacencyTupleSchemeFactory implements SchemeFactory { + public AdjacencyTupleScheme getScheme() { + return new AdjacencyTupleScheme(); + } + } + + private static class AdjacencyTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Adjacency struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNode()) { + optionals.set(0); + } + if (struct.isSetChildren()) { + optionals.set(1); + } + if (struct.isSetAdjacencyType()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetNode()) { + oprot.writeString(struct.node); + } + if (struct.isSetChildren()) { + { + oprot.writeI32(struct.children.size()); + for (String _iter4 : struct.children) + { + oprot.writeString(_iter4); + } + } + } + if (struct.isSetAdjacencyType()) { + oprot.writeI32(struct.adjacencyType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Adjacency struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.node = iprot.readString(); + struct.setNodeIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.children = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + String _elem7; // required + _elem7 = iprot.readString(); + struct.children.add(_elem7); + } + } + struct.setChildrenIsSet(true); + } + if (incoming.get(2)) { + struct.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); + struct.setAdjacencyTypeIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField ROOTS_FIELD_DESC = new org.apache.thrift.protocol.TField("roots", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField ADJACENCY_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("adjacencyList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GraphStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GraphTupleSchemeFactory()); + } + private NodeType nodeType; // required private List roots; // required private List adjacencyList; // required @@ -101,7 +117,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -444,101 +459,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NODE_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.nodeType = NodeType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ROOTS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); - this.roots = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; // required - _elem6 = iprot.readString(); - this.roots.add(_elem6); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // ADJACENCY_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list7 = iprot.readListBegin(); - this.adjacencyList = new ArrayList(_list7.size); - for (int _i8 = 0; _i8 < _list7.size; ++_i8) - { - Adjacency _elem9; // required - _elem9 = new Adjacency(); - _elem9.read(iprot); - this.adjacencyList.add(_elem9); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.nodeType != null) { - oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC); - oprot.writeI32(this.nodeType.getValue()); - oprot.writeFieldEnd(); - } - if (this.roots != null) { - oprot.writeFieldBegin(ROOTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.roots.size())); - for (String _iter10 : this.roots) - { - oprot.writeString(_iter10); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.adjacencyList != null) { - oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.adjacencyList.size())); - for (Adjacency _iter11 : this.adjacencyList) - { - _iter11.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -575,6 +500,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -593,5 +519,199 @@ } } + private static class GraphStandardSchemeFactory implements SchemeFactory { + public GraphStandardScheme getScheme() { + return new GraphStandardScheme(); + } + } + + private static class GraphStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Graph struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NODE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.nodeType = NodeType.findByValue(iprot.readI32()); + struct.setNodeTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROOTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.roots = new ArrayList(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + String _elem10; // required + _elem10 = iprot.readString(); + struct.roots.add(_elem10); + } + iprot.readListEnd(); + } + struct.setRootsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ADJACENCY_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); + struct.adjacencyList = new ArrayList(_list11.size); + for (int _i12 = 0; _i12 < _list11.size; ++_i12) + { + Adjacency _elem13; // required + _elem13 = new Adjacency(); + _elem13.read(iprot); + struct.adjacencyList.add(_elem13); + } + iprot.readListEnd(); + } + struct.setAdjacencyListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Graph struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.nodeType != null) { + oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC); + oprot.writeI32(struct.nodeType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.roots != null) { + oprot.writeFieldBegin(ROOTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.roots.size())); + for (String _iter14 : struct.roots) + { + oprot.writeString(_iter14); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.adjacencyList != null) { + oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.adjacencyList.size())); + for (Adjacency _iter15 : struct.adjacencyList) + { + _iter15.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GraphTupleSchemeFactory implements SchemeFactory { + public GraphTupleScheme getScheme() { + return new GraphTupleScheme(); + } + } + + private static class GraphTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Graph struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNodeType()) { + optionals.set(0); + } + if (struct.isSetRoots()) { + optionals.set(1); + } + if (struct.isSetAdjacencyList()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetNodeType()) { + oprot.writeI32(struct.nodeType.getValue()); + } + if (struct.isSetRoots()) { + { + oprot.writeI32(struct.roots.size()); + for (String _iter16 : struct.roots) + { + oprot.writeString(_iter16); + } + } + } + if (struct.isSetAdjacencyList()) { + { + oprot.writeI32(struct.adjacencyList.size()); + for (Adjacency _iter17 : struct.adjacencyList) + { + _iter17.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Graph struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.nodeType = NodeType.findByValue(iprot.readI32()); + struct.setNodeTypeIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.roots = new ArrayList(_list18.size); + for (int _i19 = 0; _i19 < _list18.size; ++_i19) + { + String _elem20; // required + _elem20 = iprot.readString(); + struct.roots.add(_elem20); + } + } + struct.setRootsIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.adjacencyList = new ArrayList(_list21.size); + for (int _i22 = 0; _i22 < _list21.size; ++_i22) + { + Adjacency _elem23; // required + _elem23 = new Adjacency(); + _elem23.read(iprot); + struct.adjacencyList.add(_elem23); + } + } + struct.setAdjacencyListIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -33,12 +43,18 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)7); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TaskStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TaskTupleSchemeFactory()); + } + private String taskId; // required private TaskType taskType; // required private Map taskAttributes; // required private Map taskCounters; // required - private Graph operatorGraph; // required - private List operatorList; // required + private Graph operatorGraph; // optional + private List operatorList; // optional private boolean done; // required private boolean started; // required @@ -128,8 +144,8 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.OPERATOR_GRAPH,_Fields.OPERATOR_LIST}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -184,8 +200,7 @@ * Performs a deep copy on other. */ public Task(Task other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetTaskId()) { this.taskId = other.taskId; } @@ -447,16 +462,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -469,16 +484,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -838,187 +853,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TASK_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.taskId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TASK_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.taskType = TaskType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // TASK_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map22 = iprot.readMapBegin(); - this.taskAttributes = new HashMap(2*_map22.size); - for (int _i23 = 0; _i23 < _map22.size; ++_i23) - { - String _key24; // required - String _val25; // required - _key24 = iprot.readString(); - _val25 = iprot.readString(); - this.taskAttributes.put(_key24, _val25); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // TASK_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin(); - this.taskCounters = new HashMap(2*_map26.size); - for (int _i27 = 0; _i27 < _map26.size; ++_i27) - { - String _key28; // required - long _val29; // required - _key28 = iprot.readString(); - _val29 = iprot.readI64(); - this.taskCounters.put(_key28, _val29); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // OPERATOR_GRAPH - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.operatorGraph = new Graph(); - this.operatorGraph.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // OPERATOR_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); - this.operatorList = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) - { - Operator _elem32; // required - _elem32 = new Operator(); - _elem32.read(iprot); - this.operatorList.add(_elem32); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.taskId != null) { - oprot.writeFieldBegin(TASK_ID_FIELD_DESC); - oprot.writeString(this.taskId); - oprot.writeFieldEnd(); - } - if (this.taskType != null) { - oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); - oprot.writeI32(this.taskType.getValue()); - oprot.writeFieldEnd(); - } - if (this.taskAttributes != null) { - oprot.writeFieldBegin(TASK_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.taskAttributes.size())); - for (Map.Entry _iter33 : this.taskAttributes.entrySet()) - { - oprot.writeString(_iter33.getKey()); - oprot.writeString(_iter33.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.taskCounters != null) { - oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.taskCounters.size())); - for (Map.Entry _iter34 : this.taskCounters.entrySet()) - { - oprot.writeString(_iter34.getKey()); - oprot.writeI64(_iter34.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.operatorGraph != null) { - if (isSetOperatorGraph()) { - oprot.writeFieldBegin(OPERATOR_GRAPH_FIELD_DESC); - this.operatorGraph.write(oprot); - oprot.writeFieldEnd(); - } - } - if (this.operatorList != null) { - if (isSetOperatorList()) { - oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.operatorList.size())); - for (Operator _iter35 : this.operatorList) - { - _iter35.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1091,6 +930,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (operatorGraph != null) { + operatorGraph.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1104,12 +947,367 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class TaskStandardSchemeFactory implements SchemeFactory { + public TaskStandardScheme getScheme() { + return new TaskStandardScheme(); + } + } + + private static class TaskStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Task struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TASK_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.taskId = iprot.readString(); + struct.setTaskIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TASK_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.taskType = TaskType.findByValue(iprot.readI32()); + struct.setTaskTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TASK_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin(); + struct.taskAttributes = new HashMap(2*_map44.size); + for (int _i45 = 0; _i45 < _map44.size; ++_i45) + { + String _key46; // required + String _val47; // required + _key46 = iprot.readString(); + _val47 = iprot.readString(); + struct.taskAttributes.put(_key46, _val47); + } + iprot.readMapEnd(); + } + struct.setTaskAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TASK_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map48 = iprot.readMapBegin(); + struct.taskCounters = new HashMap(2*_map48.size); + for (int _i49 = 0; _i49 < _map48.size; ++_i49) + { + String _key50; // required + long _val51; // required + _key50 = iprot.readString(); + _val51 = iprot.readI64(); + struct.taskCounters.put(_key50, _val51); + } + iprot.readMapEnd(); + } + struct.setTaskCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // OPERATOR_GRAPH + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.operatorGraph = new Graph(); + struct.operatorGraph.read(iprot); + struct.setOperatorGraphIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // OPERATOR_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list52 = iprot.readListBegin(); + struct.operatorList = new ArrayList(_list52.size); + for (int _i53 = 0; _i53 < _list52.size; ++_i53) + { + Operator _elem54; // required + _elem54 = new Operator(); + _elem54.read(iprot); + struct.operatorList.add(_elem54); + } + iprot.readListEnd(); + } + struct.setOperatorListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Task struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.taskId != null) { + oprot.writeFieldBegin(TASK_ID_FIELD_DESC); + oprot.writeString(struct.taskId); + oprot.writeFieldEnd(); + } + if (struct.taskType != null) { + oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); + oprot.writeI32(struct.taskType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.taskAttributes != null) { + oprot.writeFieldBegin(TASK_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.taskAttributes.size())); + for (Map.Entry _iter55 : struct.taskAttributes.entrySet()) + { + oprot.writeString(_iter55.getKey()); + oprot.writeString(_iter55.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.taskCounters != null) { + oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.taskCounters.size())); + for (Map.Entry _iter56 : struct.taskCounters.entrySet()) + { + oprot.writeString(_iter56.getKey()); + oprot.writeI64(_iter56.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.operatorGraph != null) { + if (struct.isSetOperatorGraph()) { + oprot.writeFieldBegin(OPERATOR_GRAPH_FIELD_DESC); + struct.operatorGraph.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.operatorList != null) { + if (struct.isSetOperatorList()) { + oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.operatorList.size())); + for (Operator _iter57 : struct.operatorList) + { + _iter57.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TaskTupleSchemeFactory implements SchemeFactory { + public TaskTupleScheme getScheme() { + return new TaskTupleScheme(); + } + } + + private static class TaskTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Task struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTaskId()) { + optionals.set(0); + } + if (struct.isSetTaskType()) { + optionals.set(1); + } + if (struct.isSetTaskAttributes()) { + optionals.set(2); + } + if (struct.isSetTaskCounters()) { + optionals.set(3); + } + if (struct.isSetOperatorGraph()) { + optionals.set(4); + } + if (struct.isSetOperatorList()) { + optionals.set(5); + } + if (struct.isSetDone()) { + optionals.set(6); + } + if (struct.isSetStarted()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetTaskId()) { + oprot.writeString(struct.taskId); + } + if (struct.isSetTaskType()) { + oprot.writeI32(struct.taskType.getValue()); + } + if (struct.isSetTaskAttributes()) { + { + oprot.writeI32(struct.taskAttributes.size()); + for (Map.Entry _iter58 : struct.taskAttributes.entrySet()) + { + oprot.writeString(_iter58.getKey()); + oprot.writeString(_iter58.getValue()); + } + } + } + if (struct.isSetTaskCounters()) { + { + oprot.writeI32(struct.taskCounters.size()); + for (Map.Entry _iter59 : struct.taskCounters.entrySet()) + { + oprot.writeString(_iter59.getKey()); + oprot.writeI64(_iter59.getValue()); + } + } + } + if (struct.isSetOperatorGraph()) { + struct.operatorGraph.write(oprot); + } + if (struct.isSetOperatorList()) { + { + oprot.writeI32(struct.operatorList.size()); + for (Operator _iter60 : struct.operatorList) + { + _iter60.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Task struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + struct.taskId = iprot.readString(); + struct.setTaskIdIsSet(true); + } + if (incoming.get(1)) { + struct.taskType = TaskType.findByValue(iprot.readI32()); + struct.setTaskTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map61 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.taskAttributes = new HashMap(2*_map61.size); + for (int _i62 = 0; _i62 < _map61.size; ++_i62) + { + String _key63; // required + String _val64; // required + _key63 = iprot.readString(); + _val64 = iprot.readString(); + struct.taskAttributes.put(_key63, _val64); + } + } + struct.setTaskAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map65 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.taskCounters = new HashMap(2*_map65.size); + for (int _i66 = 0; _i66 < _map65.size; ++_i66) + { + String _key67; // required + long _val68; // required + _key67 = iprot.readString(); + _val68 = iprot.readI64(); + struct.taskCounters.put(_key67, _val68); + } + } + struct.setTaskCountersIsSet(true); + } + if (incoming.get(4)) { + struct.operatorGraph = new Graph(); + struct.operatorGraph.read(iprot); + struct.setOperatorGraphIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.operatorList = new ArrayList(_list69.size); + for (int _i70 = 0; _i70 < _list69.size; ++_i70) + { + Operator _elem71; // required + _elem71 = new Operator(); + _elem71.read(iprot); + struct.operatorList.add(_elem71); + } + } + struct.setOperatorListIsSet(true); + } + if (incoming.get(6)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(7)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,6 +42,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)6); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new StageStandardSchemeFactory()); + schemes.put(TupleScheme.class, new StageTupleSchemeFactory()); + } + private String stageId; // required private StageType stageType; // required private Map stageAttributes; // required @@ -123,8 +139,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -179,8 +194,7 @@ * Performs a deep copy on other. */ public Stage(Stage other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetStageId()) { this.stageId = other.stageId; } @@ -415,16 +429,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -437,16 +451,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -769,170 +783,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // STAGE_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.stageId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // STAGE_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.stageType = StageType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // STAGE_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map36 = iprot.readMapBegin(); - this.stageAttributes = new HashMap(2*_map36.size); - for (int _i37 = 0; _i37 < _map36.size; ++_i37) - { - String _key38; // required - String _val39; // required - _key38 = iprot.readString(); - _val39 = iprot.readString(); - this.stageAttributes.put(_key38, _val39); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // STAGE_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map40 = iprot.readMapBegin(); - this.stageCounters = new HashMap(2*_map40.size); - for (int _i41 = 0; _i41 < _map40.size; ++_i41) - { - String _key42; // required - long _val43; // required - _key42 = iprot.readString(); - _val43 = iprot.readI64(); - this.stageCounters.put(_key42, _val43); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // TASK_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(); - this.taskList = new ArrayList(_list44.size); - for (int _i45 = 0; _i45 < _list44.size; ++_i45) - { - Task _elem46; // required - _elem46 = new Task(); - _elem46.read(iprot); - this.taskList.add(_elem46); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.stageId != null) { - oprot.writeFieldBegin(STAGE_ID_FIELD_DESC); - oprot.writeString(this.stageId); - oprot.writeFieldEnd(); - } - if (this.stageType != null) { - oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC); - oprot.writeI32(this.stageType.getValue()); - oprot.writeFieldEnd(); - } - if (this.stageAttributes != null) { - oprot.writeFieldBegin(STAGE_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.stageAttributes.size())); - for (Map.Entry _iter47 : this.stageAttributes.entrySet()) - { - oprot.writeString(_iter47.getKey()); - oprot.writeString(_iter47.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.stageCounters != null) { - oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.stageCounters.size())); - for (Map.Entry _iter48 : this.stageCounters.entrySet()) - { - oprot.writeString(_iter48.getKey()); - oprot.writeI64(_iter48.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.taskList != null) { - oprot.writeFieldBegin(TASK_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.taskList.size())); - for (Task _iter49 : this.taskList) - { - _iter49.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -993,6 +848,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1006,12 +862,338 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class StageStandardSchemeFactory implements SchemeFactory { + public StageStandardScheme getScheme() { + return new StageStandardScheme(); + } + } + + private static class StageStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Stage struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STAGE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.stageId = iprot.readString(); + struct.setStageIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STAGE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.stageType = StageType.findByValue(iprot.readI32()); + struct.setStageTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STAGE_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map72 = iprot.readMapBegin(); + struct.stageAttributes = new HashMap(2*_map72.size); + for (int _i73 = 0; _i73 < _map72.size; ++_i73) + { + String _key74; // required + String _val75; // required + _key74 = iprot.readString(); + _val75 = iprot.readString(); + struct.stageAttributes.put(_key74, _val75); + } + iprot.readMapEnd(); + } + struct.setStageAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // STAGE_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map76 = iprot.readMapBegin(); + struct.stageCounters = new HashMap(2*_map76.size); + for (int _i77 = 0; _i77 < _map76.size; ++_i77) + { + String _key78; // required + long _val79; // required + _key78 = iprot.readString(); + _val79 = iprot.readI64(); + struct.stageCounters.put(_key78, _val79); + } + iprot.readMapEnd(); + } + struct.setStageCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TASK_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list80 = iprot.readListBegin(); + struct.taskList = new ArrayList(_list80.size); + for (int _i81 = 0; _i81 < _list80.size; ++_i81) + { + Task _elem82; // required + _elem82 = new Task(); + _elem82.read(iprot); + struct.taskList.add(_elem82); + } + iprot.readListEnd(); + } + struct.setTaskListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Stage struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.stageId != null) { + oprot.writeFieldBegin(STAGE_ID_FIELD_DESC); + oprot.writeString(struct.stageId); + oprot.writeFieldEnd(); + } + if (struct.stageType != null) { + oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC); + oprot.writeI32(struct.stageType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.stageAttributes != null) { + oprot.writeFieldBegin(STAGE_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.stageAttributes.size())); + for (Map.Entry _iter83 : struct.stageAttributes.entrySet()) + { + oprot.writeString(_iter83.getKey()); + oprot.writeString(_iter83.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.stageCounters != null) { + oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.stageCounters.size())); + for (Map.Entry _iter84 : struct.stageCounters.entrySet()) + { + oprot.writeString(_iter84.getKey()); + oprot.writeI64(_iter84.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.taskList != null) { + oprot.writeFieldBegin(TASK_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.taskList.size())); + for (Task _iter85 : struct.taskList) + { + _iter85.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class StageTupleSchemeFactory implements SchemeFactory { + public StageTupleScheme getScheme() { + return new StageTupleScheme(); + } + } + + private static class StageTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Stage struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStageId()) { + optionals.set(0); + } + if (struct.isSetStageType()) { + optionals.set(1); + } + if (struct.isSetStageAttributes()) { + optionals.set(2); + } + if (struct.isSetStageCounters()) { + optionals.set(3); + } + if (struct.isSetTaskList()) { + optionals.set(4); + } + if (struct.isSetDone()) { + optionals.set(5); + } + if (struct.isSetStarted()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetStageId()) { + oprot.writeString(struct.stageId); + } + if (struct.isSetStageType()) { + oprot.writeI32(struct.stageType.getValue()); + } + if (struct.isSetStageAttributes()) { + { + oprot.writeI32(struct.stageAttributes.size()); + for (Map.Entry _iter86 : struct.stageAttributes.entrySet()) + { + oprot.writeString(_iter86.getKey()); + oprot.writeString(_iter86.getValue()); + } + } + } + if (struct.isSetStageCounters()) { + { + oprot.writeI32(struct.stageCounters.size()); + for (Map.Entry _iter87 : struct.stageCounters.entrySet()) + { + oprot.writeString(_iter87.getKey()); + oprot.writeI64(_iter87.getValue()); + } + } + } + if (struct.isSetTaskList()) { + { + oprot.writeI32(struct.taskList.size()); + for (Task _iter88 : struct.taskList) + { + _iter88.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Stage struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.stageId = iprot.readString(); + struct.setStageIdIsSet(true); + } + if (incoming.get(1)) { + struct.stageType = StageType.findByValue(iprot.readI32()); + struct.setStageTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map89 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.stageAttributes = new HashMap(2*_map89.size); + for (int _i90 = 0; _i90 < _map89.size; ++_i90) + { + String _key91; // required + String _val92; // required + _key91 = iprot.readString(); + _val92 = iprot.readString(); + struct.stageAttributes.put(_key91, _val92); + } + } + struct.setStageAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map93 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.stageCounters = new HashMap(2*_map93.size); + for (int _i94 = 0; _i94 < _map93.size; ++_i94) + { + String _key95; // required + long _val96; // required + _key95 = iprot.readString(); + _val96 = iprot.readI64(); + struct.stageCounters.put(_key95, _val96); + } + } + struct.setStageCountersIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.taskList = new ArrayList(_list97.size); + for (int _i98 = 0; _i98 < _list97.size; ++_i98) + { + Task _elem99; // required + _elem99 = new Task(); + _elem99.read(iprot); + struct.taskList.add(_elem99); + } + } + struct.setTaskListIsSet(true); + } + if (incoming.get(5)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(6)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -33,6 +43,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)7); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new QueryStandardSchemeFactory()); + schemes.put(TupleScheme.class, new QueryTupleSchemeFactory()); + } + private String queryId; // required private String queryType; // required private Map queryAttributes; // required @@ -124,8 +140,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -184,8 +199,7 @@ * Performs a deep copy on other. */ public Query(Query other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetQueryId()) { this.queryId = other.queryId; } @@ -439,16 +453,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -461,16 +475,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -830,183 +844,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // QUERY_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.queryId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // QUERY_TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.queryType = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // QUERY_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map50 = iprot.readMapBegin(); - this.queryAttributes = new HashMap(2*_map50.size); - for (int _i51 = 0; _i51 < _map50.size; ++_i51) - { - String _key52; // required - String _val53; // required - _key52 = iprot.readString(); - _val53 = iprot.readString(); - this.queryAttributes.put(_key52, _val53); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // QUERY_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map54 = iprot.readMapBegin(); - this.queryCounters = new HashMap(2*_map54.size); - for (int _i55 = 0; _i55 < _map54.size; ++_i55) - { - String _key56; // required - long _val57; // required - _key56 = iprot.readString(); - _val57 = iprot.readI64(); - this.queryCounters.put(_key56, _val57); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // STAGE_GRAPH - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.stageGraph = new Graph(); - this.stageGraph.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // STAGE_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); - this.stageList = new ArrayList(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) - { - Stage _elem60; // required - _elem60 = new Stage(); - _elem60.read(iprot); - this.stageList.add(_elem60); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.queryId != null) { - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeString(this.queryId); - oprot.writeFieldEnd(); - } - if (this.queryType != null) { - oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); - oprot.writeString(this.queryType); - oprot.writeFieldEnd(); - } - if (this.queryAttributes != null) { - oprot.writeFieldBegin(QUERY_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.queryAttributes.size())); - for (Map.Entry _iter61 : this.queryAttributes.entrySet()) - { - oprot.writeString(_iter61.getKey()); - oprot.writeString(_iter61.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.queryCounters != null) { - oprot.writeFieldBegin(QUERY_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.queryCounters.size())); - for (Map.Entry _iter62 : this.queryCounters.entrySet()) - { - oprot.writeString(_iter62.getKey()); - oprot.writeI64(_iter62.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.stageGraph != null) { - oprot.writeFieldBegin(STAGE_GRAPH_FIELD_DESC); - this.stageGraph.write(oprot); - oprot.writeFieldEnd(); - } - if (this.stageList != null) { - oprot.writeFieldBegin(STAGE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.stageList.size())); - for (Stage _iter63 : this.stageList) - { - _iter63.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1075,6 +917,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (stageGraph != null) { + stageGraph.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1088,12 +934,363 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class QueryStandardSchemeFactory implements SchemeFactory { + public QueryStandardScheme getScheme() { + return new QueryStandardScheme(); + } + } + + private static class QueryStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Query struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.queryId = iprot.readString(); + struct.setQueryIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUERY_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.queryType = iprot.readString(); + struct.setQueryTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // QUERY_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map100 = iprot.readMapBegin(); + struct.queryAttributes = new HashMap(2*_map100.size); + for (int _i101 = 0; _i101 < _map100.size; ++_i101) + { + String _key102; // required + String _val103; // required + _key102 = iprot.readString(); + _val103 = iprot.readString(); + struct.queryAttributes.put(_key102, _val103); + } + iprot.readMapEnd(); + } + struct.setQueryAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // QUERY_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map104 = iprot.readMapBegin(); + struct.queryCounters = new HashMap(2*_map104.size); + for (int _i105 = 0; _i105 < _map104.size; ++_i105) + { + String _key106; // required + long _val107; // required + _key106 = iprot.readString(); + _val107 = iprot.readI64(); + struct.queryCounters.put(_key106, _val107); + } + iprot.readMapEnd(); + } + struct.setQueryCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // STAGE_GRAPH + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.stageGraph = new Graph(); + struct.stageGraph.read(iprot); + struct.setStageGraphIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STAGE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list108 = iprot.readListBegin(); + struct.stageList = new ArrayList(_list108.size); + for (int _i109 = 0; _i109 < _list108.size; ++_i109) + { + Stage _elem110; // required + _elem110 = new Stage(); + _elem110.read(iprot); + struct.stageList.add(_elem110); + } + iprot.readListEnd(); + } + struct.setStageListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Query struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.queryId != null) { + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeString(struct.queryId); + oprot.writeFieldEnd(); + } + if (struct.queryType != null) { + oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); + oprot.writeString(struct.queryType); + oprot.writeFieldEnd(); + } + if (struct.queryAttributes != null) { + oprot.writeFieldBegin(QUERY_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.queryAttributes.size())); + for (Map.Entry _iter111 : struct.queryAttributes.entrySet()) + { + oprot.writeString(_iter111.getKey()); + oprot.writeString(_iter111.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.queryCounters != null) { + oprot.writeFieldBegin(QUERY_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.queryCounters.size())); + for (Map.Entry _iter112 : struct.queryCounters.entrySet()) + { + oprot.writeString(_iter112.getKey()); + oprot.writeI64(_iter112.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.stageGraph != null) { + oprot.writeFieldBegin(STAGE_GRAPH_FIELD_DESC); + struct.stageGraph.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.stageList != null) { + oprot.writeFieldBegin(STAGE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.stageList.size())); + for (Stage _iter113 : struct.stageList) + { + _iter113.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class QueryTupleSchemeFactory implements SchemeFactory { + public QueryTupleScheme getScheme() { + return new QueryTupleScheme(); + } + } + + private static class QueryTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Query struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetQueryId()) { + optionals.set(0); + } + if (struct.isSetQueryType()) { + optionals.set(1); + } + if (struct.isSetQueryAttributes()) { + optionals.set(2); + } + if (struct.isSetQueryCounters()) { + optionals.set(3); + } + if (struct.isSetStageGraph()) { + optionals.set(4); + } + if (struct.isSetStageList()) { + optionals.set(5); + } + if (struct.isSetDone()) { + optionals.set(6); + } + if (struct.isSetStarted()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetQueryId()) { + oprot.writeString(struct.queryId); + } + if (struct.isSetQueryType()) { + oprot.writeString(struct.queryType); + } + if (struct.isSetQueryAttributes()) { + { + oprot.writeI32(struct.queryAttributes.size()); + for (Map.Entry _iter114 : struct.queryAttributes.entrySet()) + { + oprot.writeString(_iter114.getKey()); + oprot.writeString(_iter114.getValue()); + } + } + } + if (struct.isSetQueryCounters()) { + { + oprot.writeI32(struct.queryCounters.size()); + for (Map.Entry _iter115 : struct.queryCounters.entrySet()) + { + oprot.writeString(_iter115.getKey()); + oprot.writeI64(_iter115.getValue()); + } + } + } + if (struct.isSetStageGraph()) { + struct.stageGraph.write(oprot); + } + if (struct.isSetStageList()) { + { + oprot.writeI32(struct.stageList.size()); + for (Stage _iter116 : struct.stageList) + { + _iter116.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Query struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + struct.queryId = iprot.readString(); + struct.setQueryIdIsSet(true); + } + if (incoming.get(1)) { + struct.queryType = iprot.readString(); + struct.setQueryTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map117 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.queryAttributes = new HashMap(2*_map117.size); + for (int _i118 = 0; _i118 < _map117.size; ++_i118) + { + String _key119; // required + String _val120; // required + _key119 = iprot.readString(); + _val120 = iprot.readString(); + struct.queryAttributes.put(_key119, _val120); + } + } + struct.setQueryAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map121 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.queryCounters = new HashMap(2*_map121.size); + for (int _i122 = 0; _i122 < _map121.size; ++_i122) + { + String _key123; // required + long _val124; // required + _key123 = iprot.readString(); + _val124 = iprot.readI64(); + struct.queryCounters.put(_key123, _val124); + } + } + struct.setQueryCountersIsSet(true); + } + if (incoming.get(4)) { + struct.stageGraph = new Graph(); + struct.stageGraph.read(iprot); + struct.setStageGraphIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.stageList = new ArrayList(_list125.size); + for (int _i126 = 0; _i126 < _list125.size; ++_i126) + { + Stage _elem127; // required + _elem127 = new Stage(); + _elem127.read(iprot); + struct.stageList.add(_elem127); + } + } + struct.setStageListIsSet(true); + } + if (incoming.get(6)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(7)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -31,6 +41,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new OperatorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OperatorTupleSchemeFactory()); + } + private String operatorId; // required private OperatorType operatorType; // required private Map operatorAttributes; // required @@ -118,8 +134,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -169,8 +184,7 @@ * Performs a deep copy on other. */ public Operator(Operator other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetOperatorId()) { this.operatorId = other.operatorId; } @@ -359,16 +373,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -381,16 +395,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -676,140 +690,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // OPERATOR_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.operatorId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // OPERATOR_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.operatorType = OperatorType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OPERATOR_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(); - this.operatorAttributes = new HashMap(2*_map12.size); - for (int _i13 = 0; _i13 < _map12.size; ++_i13) - { - String _key14; // required - String _val15; // required - _key14 = iprot.readString(); - _val15 = iprot.readString(); - this.operatorAttributes.put(_key14, _val15); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // OPERATOR_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin(); - this.operatorCounters = new HashMap(2*_map16.size); - for (int _i17 = 0; _i17 < _map16.size; ++_i17) - { - String _key18; // required - long _val19; // required - _key18 = iprot.readString(); - _val19 = iprot.readI64(); - this.operatorCounters.put(_key18, _val19); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.operatorId != null) { - oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC); - oprot.writeString(this.operatorId); - oprot.writeFieldEnd(); - } - if (this.operatorType != null) { - oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC); - oprot.writeI32(this.operatorType.getValue()); - oprot.writeFieldEnd(); - } - if (this.operatorAttributes != null) { - oprot.writeFieldBegin(OPERATOR_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.operatorAttributes.size())); - for (Map.Entry _iter20 : this.operatorAttributes.entrySet()) - { - oprot.writeString(_iter20.getKey()); - oprot.writeString(_iter20.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.operatorCounters != null) { - oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.operatorCounters.size())); - for (Map.Entry _iter21 : this.operatorCounters.entrySet()) - { - oprot.writeString(_iter21.getKey()); - oprot.writeI64(_iter21.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -862,6 +747,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -875,12 +761,281 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class OperatorStandardSchemeFactory implements SchemeFactory { + public OperatorStandardScheme getScheme() { + return new OperatorStandardScheme(); + } + } + + private static class OperatorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Operator struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // OPERATOR_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.operatorId = iprot.readString(); + struct.setOperatorIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OPERATOR_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.operatorType = OperatorType.findByValue(iprot.readI32()); + struct.setOperatorTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OPERATOR_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin(); + struct.operatorAttributes = new HashMap(2*_map24.size); + for (int _i25 = 0; _i25 < _map24.size; ++_i25) + { + String _key26; // required + String _val27; // required + _key26 = iprot.readString(); + _val27 = iprot.readString(); + struct.operatorAttributes.put(_key26, _val27); + } + iprot.readMapEnd(); + } + struct.setOperatorAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // OPERATOR_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map28 = iprot.readMapBegin(); + struct.operatorCounters = new HashMap(2*_map28.size); + for (int _i29 = 0; _i29 < _map28.size; ++_i29) + { + String _key30; // required + long _val31; // required + _key30 = iprot.readString(); + _val31 = iprot.readI64(); + struct.operatorCounters.put(_key30, _val31); + } + iprot.readMapEnd(); + } + struct.setOperatorCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Operator struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.operatorId != null) { + oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC); + oprot.writeString(struct.operatorId); + oprot.writeFieldEnd(); + } + if (struct.operatorType != null) { + oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC); + oprot.writeI32(struct.operatorType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.operatorAttributes != null) { + oprot.writeFieldBegin(OPERATOR_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.operatorAttributes.size())); + for (Map.Entry _iter32 : struct.operatorAttributes.entrySet()) + { + oprot.writeString(_iter32.getKey()); + oprot.writeString(_iter32.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.operatorCounters != null) { + oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.operatorCounters.size())); + for (Map.Entry _iter33 : struct.operatorCounters.entrySet()) + { + oprot.writeString(_iter33.getKey()); + oprot.writeI64(_iter33.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class OperatorTupleSchemeFactory implements SchemeFactory { + public OperatorTupleScheme getScheme() { + return new OperatorTupleScheme(); + } + } + + private static class OperatorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Operator struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetOperatorId()) { + optionals.set(0); + } + if (struct.isSetOperatorType()) { + optionals.set(1); + } + if (struct.isSetOperatorAttributes()) { + optionals.set(2); + } + if (struct.isSetOperatorCounters()) { + optionals.set(3); + } + if (struct.isSetDone()) { + optionals.set(4); + } + if (struct.isSetStarted()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetOperatorId()) { + oprot.writeString(struct.operatorId); + } + if (struct.isSetOperatorType()) { + oprot.writeI32(struct.operatorType.getValue()); + } + if (struct.isSetOperatorAttributes()) { + { + oprot.writeI32(struct.operatorAttributes.size()); + for (Map.Entry _iter34 : struct.operatorAttributes.entrySet()) + { + oprot.writeString(_iter34.getKey()); + oprot.writeString(_iter34.getValue()); + } + } + } + if (struct.isSetOperatorCounters()) { + { + oprot.writeI32(struct.operatorCounters.size()); + for (Map.Entry _iter35 : struct.operatorCounters.entrySet()) + { + oprot.writeString(_iter35.getKey()); + oprot.writeI64(_iter35.getValue()); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Operator struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.operatorId = iprot.readString(); + struct.setOperatorIdIsSet(true); + } + if (incoming.get(1)) { + struct.operatorType = OperatorType.findByValue(iprot.readI32()); + struct.setOperatorTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map36 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.operatorAttributes = new HashMap(2*_map36.size); + for (int _i37 = 0; _i37 < _map36.size; ++_i37) + { + String _key38; // required + String _val39; // required + _key38 = iprot.readString(); + _val39 = iprot.readString(); + struct.operatorAttributes.put(_key38, _val39); + } + } + struct.setOperatorAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.operatorCounters = new HashMap(2*_map40.size); + for (int _i41 = 0; _i41 < _map40.size; ++_i41) + { + String _key42; // required + long _val43; // required + _key42 = iprot.readString(); + _val43 = iprot.readI64(); + struct.operatorCounters.put(_key42, _val43); + } + } + struct.setOperatorCountersIsSet(true); + } + if (incoming.get(4)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(5)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java (revision 1406838) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-php/Types.php =================================================================== --- ql/src/gen/thrift/gen-php/Types.php (revision 0) +++ ql/src/gen/thrift/gen-php/Types.php (revision 0) @@ -0,0 +1,1716 @@ + 'CONJUNCTIVE', + 1 => 'DISJUNCTIVE', + ); +} + +final class NodeType { + const OPERATOR = 0; + const STAGE = 1; + static public $__names = array( + 0 => 'OPERATOR', + 1 => 'STAGE', + ); +} + +final class OperatorType { + const JOIN = 0; + const MAPJOIN = 1; + const EXTRACT = 2; + const FILTER = 3; + const FORWARD = 4; + const GROUPBY = 5; + const LIMIT = 6; + const SCRIPT = 7; + const SELECT = 8; + const TABLESCAN = 9; + const FILESINK = 10; + const REDUCESINK = 11; + const UNION = 12; + const UDTF = 13; + const LATERALVIEWJOIN = 14; + const LATERALVIEWFORWARD = 15; + const HASHTABLESINK = 16; + const HASHTABLEDUMMY = 17; + static public $__names = array( + 0 => 'JOIN', + 1 => 'MAPJOIN', + 2 => 'EXTRACT', + 3 => 'FILTER', + 4 => 'FORWARD', + 5 => 'GROUPBY', + 6 => 'LIMIT', + 7 => 'SCRIPT', + 8 => 'SELECT', + 9 => 'TABLESCAN', + 10 => 'FILESINK', + 11 => 'REDUCESINK', + 12 => 'UNION', + 13 => 'UDTF', + 14 => 'LATERALVIEWJOIN', + 15 => 'LATERALVIEWFORWARD', + 16 => 'HASHTABLESINK', + 17 => 'HASHTABLEDUMMY', + ); +} + +final class TaskType { + const MAP = 0; + const REDUCE = 1; + const OTHER = 2; + static public $__names = array( + 0 => 'MAP', + 1 => 'REDUCE', + 2 => 'OTHER', + ); +} + +final class StageType { + const CONDITIONAL = 0; + const COPY = 1; + const DDL = 2; + const MAPRED = 3; + const EXPLAIN = 4; + const FETCH = 5; + const FUNC = 6; + const MAPREDLOCAL = 7; + const MOVE = 8; + const STATS = 9; + const DEPENDENCY_COLLECTION = 10; + const COLUMNSTATS = 11; + static public $__names = array( + 0 => 'CONDITIONAL', + 1 => 'COPY', + 2 => 'DDL', + 3 => 'MAPRED', + 4 => 'EXPLAIN', + 5 => 'FETCH', + 6 => 'FUNC', + 7 => 'MAPREDLOCAL', + 8 => 'MOVE', + 9 => 'STATS', + 10 => 'DEPENDENCY_COLLECTION', + 11 => 'COLUMNSTATS', + ); +} + +class Adjacency { + static $_TSPEC; + + public $node = null; + public $children = null; + public $adjacencyType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'node', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'children', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['node'])) { + $this->node = $vals['node']; + } + if (isset($vals['children'])) { + $this->children = $vals['children']; + } + if (isset($vals['adjacencyType'])) { + $this->adjacencyType = $vals['adjacencyType']; + } + } + } + + public function getName() { + return 'Adjacency'; + } + + 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->node); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->children = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $xfer += $input->readString($elem5); + $this->children []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->adjacencyType); + } 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('Adjacency'); + if ($this->node !== null) { + $xfer += $output->writeFieldBegin('node', TType::STRING, 1); + $xfer += $output->writeString($this->node); + $xfer += $output->writeFieldEnd(); + } + if ($this->children !== null) { + if (!is_array($this->children)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('children', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->children)); + { + foreach ($this->children as $iter6) + { + $xfer += $output->writeString($iter6); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyType !== null) { + $xfer += $output->writeFieldBegin('adjacencyType', TType::I32, 3); + $xfer += $output->writeI32($this->adjacencyType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Graph { + static $_TSPEC; + + public $nodeType = null; + public $roots = null; + public $adjacencyList = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'nodeType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'roots', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Adjacency', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['nodeType'])) { + $this->nodeType = $vals['nodeType']; + } + if (isset($vals['roots'])) { + $this->roots = $vals['roots']; + } + if (isset($vals['adjacencyList'])) { + $this->adjacencyList = $vals['adjacencyList']; + } + } + } + + public function getName() { + return 'Graph'; + } + + 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::I32) { + $xfer += $input->readI32($this->nodeType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->roots = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->roots []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->adjacencyList = array(); + $_size13 = 0; + $_etype16 = 0; + $xfer += $input->readListBegin($_etype16, $_size13); + for ($_i17 = 0; $_i17 < $_size13; ++$_i17) + { + $elem18 = null; + $elem18 = new \Adjacency(); + $xfer += $elem18->read($input); + $this->adjacencyList []= $elem18; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Graph'); + if ($this->nodeType !== null) { + $xfer += $output->writeFieldBegin('nodeType', TType::I32, 1); + $xfer += $output->writeI32($this->nodeType); + $xfer += $output->writeFieldEnd(); + } + if ($this->roots !== null) { + if (!is_array($this->roots)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('roots', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->roots)); + { + foreach ($this->roots as $iter19) + { + $xfer += $output->writeString($iter19); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyList !== null) { + if (!is_array($this->adjacencyList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('adjacencyList', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->adjacencyList)); + { + foreach ($this->adjacencyList as $iter20) + { + $xfer += $iter20->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Operator { + static $_TSPEC; + + public $operatorId = null; + public $operatorType = null; + public $operatorAttributes = null; + public $operatorCounters = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'operatorId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'operatorType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'operatorAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'operatorCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['operatorId'])) { + $this->operatorId = $vals['operatorId']; + } + if (isset($vals['operatorType'])) { + $this->operatorType = $vals['operatorType']; + } + if (isset($vals['operatorAttributes'])) { + $this->operatorAttributes = $vals['operatorAttributes']; + } + if (isset($vals['operatorCounters'])) { + $this->operatorCounters = $vals['operatorCounters']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Operator'; + } + + 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->operatorId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->operatorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->operatorAttributes = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = ''; + $xfer += $input->readString($key26); + $xfer += $input->readString($val27); + $this->operatorAttributes[$key26] = $val27; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->operatorCounters = array(); + $_size28 = 0; + $_ktype29 = 0; + $_vtype30 = 0; + $xfer += $input->readMapBegin($_ktype29, $_vtype30, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $key33 = ''; + $val34 = 0; + $xfer += $input->readString($key33); + $xfer += $input->readI64($val34); + $this->operatorCounters[$key33] = $val34; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Operator'); + if ($this->operatorId !== null) { + $xfer += $output->writeFieldBegin('operatorId', TType::STRING, 1); + $xfer += $output->writeString($this->operatorId); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorType !== null) { + $xfer += $output->writeFieldBegin('operatorType', TType::I32, 2); + $xfer += $output->writeI32($this->operatorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorAttributes !== null) { + if (!is_array($this->operatorAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->operatorAttributes)); + { + foreach ($this->operatorAttributes as $kiter35 => $viter36) + { + $xfer += $output->writeString($kiter35); + $xfer += $output->writeString($viter36); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorCounters !== null) { + if (!is_array($this->operatorCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->operatorCounters)); + { + foreach ($this->operatorCounters as $kiter37 => $viter38) + { + $xfer += $output->writeString($kiter37); + $xfer += $output->writeI64($viter38); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 5); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 6); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Task { + static $_TSPEC; + + public $taskId = null; + public $taskType = null; + public $taskAttributes = null; + public $taskCounters = null; + public $operatorGraph = null; + public $operatorList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'taskId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'taskType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'taskAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'taskCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'operatorGraph', + 'type' => TType::STRUCT, + 'class' => '\Graph', + ), + 6 => array( + 'var' => 'operatorList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Operator', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['taskId'])) { + $this->taskId = $vals['taskId']; + } + if (isset($vals['taskType'])) { + $this->taskType = $vals['taskType']; + } + if (isset($vals['taskAttributes'])) { + $this->taskAttributes = $vals['taskAttributes']; + } + if (isset($vals['taskCounters'])) { + $this->taskCounters = $vals['taskCounters']; + } + if (isset($vals['operatorGraph'])) { + $this->operatorGraph = $vals['operatorGraph']; + } + if (isset($vals['operatorList'])) { + $this->operatorList = $vals['operatorList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Task'; + } + + 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->taskId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->taskType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->taskAttributes = array(); + $_size39 = 0; + $_ktype40 = 0; + $_vtype41 = 0; + $xfer += $input->readMapBegin($_ktype40, $_vtype41, $_size39); + for ($_i43 = 0; $_i43 < $_size39; ++$_i43) + { + $key44 = ''; + $val45 = ''; + $xfer += $input->readString($key44); + $xfer += $input->readString($val45); + $this->taskAttributes[$key44] = $val45; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->taskCounters = array(); + $_size46 = 0; + $_ktype47 = 0; + $_vtype48 = 0; + $xfer += $input->readMapBegin($_ktype47, $_vtype48, $_size46); + for ($_i50 = 0; $_i50 < $_size46; ++$_i50) + { + $key51 = ''; + $val52 = 0; + $xfer += $input->readString($key51); + $xfer += $input->readI64($val52); + $this->taskCounters[$key51] = $val52; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->operatorGraph = new \Graph(); + $xfer += $this->operatorGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->operatorList = array(); + $_size53 = 0; + $_etype56 = 0; + $xfer += $input->readListBegin($_etype56, $_size53); + for ($_i57 = 0; $_i57 < $_size53; ++$_i57) + { + $elem58 = null; + $elem58 = new \Operator(); + $xfer += $elem58->read($input); + $this->operatorList []= $elem58; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Task'); + if ($this->taskId !== null) { + $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1); + $xfer += $output->writeString($this->taskId); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskType !== null) { + $xfer += $output->writeFieldBegin('taskType', TType::I32, 2); + $xfer += $output->writeI32($this->taskType); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskAttributes !== null) { + if (!is_array($this->taskAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->taskAttributes)); + { + foreach ($this->taskAttributes as $kiter59 => $viter60) + { + $xfer += $output->writeString($kiter59); + $xfer += $output->writeString($viter60); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskCounters !== null) { + if (!is_array($this->taskCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->taskCounters)); + { + foreach ($this->taskCounters as $kiter61 => $viter62) + { + $xfer += $output->writeString($kiter61); + $xfer += $output->writeI64($viter62); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorGraph !== null) { + if (!is_object($this->operatorGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorGraph', TType::STRUCT, 5); + $xfer += $this->operatorGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorList !== null) { + if (!is_array($this->operatorList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->operatorList)); + { + foreach ($this->operatorList as $iter63) + { + $xfer += $iter63->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Stage { + static $_TSPEC; + + public $stageId = null; + public $stageType = null; + public $stageAttributes = null; + public $stageCounters = null; + public $taskList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stageId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'stageType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'stageAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'stageCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'taskList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Task', + ), + ), + 6 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stageId'])) { + $this->stageId = $vals['stageId']; + } + if (isset($vals['stageType'])) { + $this->stageType = $vals['stageType']; + } + if (isset($vals['stageAttributes'])) { + $this->stageAttributes = $vals['stageAttributes']; + } + if (isset($vals['stageCounters'])) { + $this->stageCounters = $vals['stageCounters']; + } + if (isset($vals['taskList'])) { + $this->taskList = $vals['taskList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Stage'; + } + + 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->stageId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->stageType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->stageAttributes = array(); + $_size64 = 0; + $_ktype65 = 0; + $_vtype66 = 0; + $xfer += $input->readMapBegin($_ktype65, $_vtype66, $_size64); + for ($_i68 = 0; $_i68 < $_size64; ++$_i68) + { + $key69 = ''; + $val70 = ''; + $xfer += $input->readString($key69); + $xfer += $input->readString($val70); + $this->stageAttributes[$key69] = $val70; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->stageCounters = array(); + $_size71 = 0; + $_ktype72 = 0; + $_vtype73 = 0; + $xfer += $input->readMapBegin($_ktype72, $_vtype73, $_size71); + for ($_i75 = 0; $_i75 < $_size71; ++$_i75) + { + $key76 = ''; + $val77 = 0; + $xfer += $input->readString($key76); + $xfer += $input->readI64($val77); + $this->stageCounters[$key76] = $val77; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->taskList = array(); + $_size78 = 0; + $_etype81 = 0; + $xfer += $input->readListBegin($_etype81, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $elem83 = null; + $elem83 = new \Task(); + $xfer += $elem83->read($input); + $this->taskList []= $elem83; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Stage'); + if ($this->stageId !== null) { + $xfer += $output->writeFieldBegin('stageId', TType::STRING, 1); + $xfer += $output->writeString($this->stageId); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageType !== null) { + $xfer += $output->writeFieldBegin('stageType', TType::I32, 2); + $xfer += $output->writeI32($this->stageType); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageAttributes !== null) { + if (!is_array($this->stageAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->stageAttributes)); + { + foreach ($this->stageAttributes as $kiter84 => $viter85) + { + $xfer += $output->writeString($kiter84); + $xfer += $output->writeString($viter85); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageCounters !== null) { + if (!is_array($this->stageCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->stageCounters)); + { + foreach ($this->stageCounters as $kiter86 => $viter87) + { + $xfer += $output->writeString($kiter86); + $xfer += $output->writeI64($viter87); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskList !== null) { + if (!is_array($this->taskList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskList', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->taskList)); + { + foreach ($this->taskList as $iter88) + { + $xfer += $iter88->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 6); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 7); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Query { + static $_TSPEC; + + public $queryId = null; + public $queryType = null; + public $queryAttributes = null; + public $queryCounters = null; + public $stageGraph = null; + public $stageList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queryId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'queryType', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'queryAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'queryCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'stageGraph', + 'type' => TType::STRUCT, + 'class' => '\Graph', + ), + 6 => array( + 'var' => 'stageList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Stage', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queryId'])) { + $this->queryId = $vals['queryId']; + } + if (isset($vals['queryType'])) { + $this->queryType = $vals['queryType']; + } + if (isset($vals['queryAttributes'])) { + $this->queryAttributes = $vals['queryAttributes']; + } + if (isset($vals['queryCounters'])) { + $this->queryCounters = $vals['queryCounters']; + } + if (isset($vals['stageGraph'])) { + $this->stageGraph = $vals['stageGraph']; + } + if (isset($vals['stageList'])) { + $this->stageList = $vals['stageList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Query'; + } + + 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->queryId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->queryType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->queryAttributes = array(); + $_size89 = 0; + $_ktype90 = 0; + $_vtype91 = 0; + $xfer += $input->readMapBegin($_ktype90, $_vtype91, $_size89); + for ($_i93 = 0; $_i93 < $_size89; ++$_i93) + { + $key94 = ''; + $val95 = ''; + $xfer += $input->readString($key94); + $xfer += $input->readString($val95); + $this->queryAttributes[$key94] = $val95; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->queryCounters = array(); + $_size96 = 0; + $_ktype97 = 0; + $_vtype98 = 0; + $xfer += $input->readMapBegin($_ktype97, $_vtype98, $_size96); + for ($_i100 = 0; $_i100 < $_size96; ++$_i100) + { + $key101 = ''; + $val102 = 0; + $xfer += $input->readString($key101); + $xfer += $input->readI64($val102); + $this->queryCounters[$key101] = $val102; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->stageGraph = new \Graph(); + $xfer += $this->stageGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->stageList = array(); + $_size103 = 0; + $_etype106 = 0; + $xfer += $input->readListBegin($_etype106, $_size103); + for ($_i107 = 0; $_i107 < $_size103; ++$_i107) + { + $elem108 = null; + $elem108 = new \Stage(); + $xfer += $elem108->read($input); + $this->stageList []= $elem108; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Query'); + if ($this->queryId !== null) { + $xfer += $output->writeFieldBegin('queryId', TType::STRING, 1); + $xfer += $output->writeString($this->queryId); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryType !== null) { + $xfer += $output->writeFieldBegin('queryType', TType::STRING, 2); + $xfer += $output->writeString($this->queryType); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryAttributes !== null) { + if (!is_array($this->queryAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->queryAttributes)); + { + foreach ($this->queryAttributes as $kiter109 => $viter110) + { + $xfer += $output->writeString($kiter109); + $xfer += $output->writeString($viter110); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->queryCounters !== null) { + if (!is_array($this->queryCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->queryCounters)); + { + foreach ($this->queryCounters as $kiter111 => $viter112) + { + $xfer += $output->writeString($kiter111); + $xfer += $output->writeI64($viter112); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageGraph !== null) { + if (!is_object($this->stageGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageGraph', TType::STRUCT, 5); + $xfer += $this->stageGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageList !== null) { + if (!is_array($this->stageList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->stageList)); + { + foreach ($this->stageList as $iter113) + { + $xfer += $iter113->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class QueryPlan { + static $_TSPEC; + + public $queries = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queries', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Query', + ), + ), + 2 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queries'])) { + $this->queries = $vals['queries']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'QueryPlan'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->queries = array(); + $_size114 = 0; + $_etype117 = 0; + $xfer += $input->readListBegin($_etype117, $_size114); + for ($_i118 = 0; $_i118 < $_size114; ++$_i118) + { + $elem119 = null; + $elem119 = new \Query(); + $xfer += $elem119->read($input); + $this->queries []= $elem119; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('QueryPlan'); + if ($this->queries !== null) { + if (!is_array($this->queries)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queries', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->queries)); + { + foreach ($this->queries as $iter120) + { + $xfer += $iter120->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 2); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 3); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +