diff --git itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java index 1b01238..b3a1a15 100644 --- itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java +++ itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java @@ -48,6 +48,7 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.MetaException; @@ -61,6 +62,7 @@ import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.api.UnknownDBException; +import org.apache.hadoop.hive.ql.exec.FunctionUtils.FunctionType; import org.apache.hadoop.hive.ql.exec.Utilities; import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.util.StringUtils; @@ -2502,6 +2504,70 @@ public void testConcurrentMetastores() throws Exception { } } + public void testSimpleFunction() throws Exception { + String dbName = "test_db"; + String funcName = "test_func"; + String className = "org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper"; + String owner = "test_owner"; + int createTime = (int) (System.currentTimeMillis() / 1000); + String funcType = FunctionType.JAVA.toString(); + + try { + cleanUp(dbName, null, null); + + createDb(dbName); + + createFunction(dbName, funcName, className, owner, createTime, funcType); + + // Try the different getters + + // getFunction() + Function func = client.getFunction(dbName, funcName); + assertEquals(dbName, func.getDbName()); + assertEquals(funcName, func.getFunctionName()); + assertEquals(className, func.getClassName()); + assertEquals(owner, func.getOwner()); + assertEquals(createTime, func.getCreateTime()); + assertEquals(funcType, func.getFunctionType()); + + boolean gotException = false; + try { + func = client.getFunction(dbName, "nonexistent_func"); + } catch (MetaException e) { + // expected failure + gotException = true; + } + assertEquals(true, gotException); + + // getAllFunctions() + List funcs = client.getAllFunctions(dbName); + assertEquals(1, funcs.size()); + assertEquals(funcName, funcs.get(0)); + + // getFunctions() + funcs = client.getFunctions(dbName, "*_func"); + assertEquals(1, funcs.size()); + assertEquals(funcName, funcs.get(0)); + + funcs = client.getFunctions(dbName, "nonexistent_func"); + assertEquals(0, funcs.size()); + + // dropFunction() + client.dropFunction(dbName, funcName); + + // Confirm that the function is now gone + funcs = client.getFunctions(dbName, funcName); + assertEquals(0, funcs.size()); + + } catch (Exception e) { + System.err.println(StringUtils.stringifyException(e)); + System.err.println("testConcurrentMetastores() failed."); + throw e; + } finally { + silentDropDatabase(dbName); + } + } + /** @@ -2678,4 +2744,10 @@ private void createMultiPartitionTableSchema(String dbName, String tblName, createPartitions(dbName, tbl, values); } + + private void createFunction(String dbName, String funcName, String className, + String owner, int createTime, String functionType) throws Exception { + Function func = new Function(funcName, dbName, className, owner, createTime, functionType); + client.createFunction(func); + } } diff --git itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java index 9ad5986..6218f0a 100644 --- itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java +++ itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java @@ -582,7 +582,8 @@ public void clearTestSideEffects() throws Exception { } } if (!DEFAULT_DATABASE_NAME.equals(dbName)) { - db.dropDatabase(dbName); + // Drop cascade, may need to drop functions + db.dropDatabase(dbName, true, true, true); } } SessionState.get().setCurrentDatabase(DEFAULT_DATABASE_NAME); @@ -648,6 +649,17 @@ private void runCreateTableCmd(String createTableCmd) throws Exception { return; } + private void runCmd(String cmd) throws Exception { + int ecode = 0; + ecode = drv.run(cmd).getResponseCode(); + drv.close(); + if (ecode != 0) { + throw new Exception("command: " + cmd + + " failed with exit code= " + ecode); + } + return; + } + public void createSources() throws Exception { startSessionState(); @@ -756,6 +768,9 @@ public void createSources() throws Exception { runLoadCmd("LOAD DATA LOCAL INPATH '" + fpath.toUri().getPath() + "' INTO TABLE "+AllVectorTypesRecord.TABLE_NAME); + runCmd("CREATE FUNCTION qtest_get_java_boolean " + + " AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestGetJavaBoolean'"); + conf.setBoolean("hive.test.init.phase", false); } diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index e4e816d..93f41cf 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -300,6 +300,16 @@ struct AddPartitionsRequest { 5: optional bool needResult=true } +// User-defined function +struct Function { + 1: string functionName, + 2: string dbName, + 3: string className, + 4: string owner, + 5: i32 createTime, + 6: string functionType, +} + exception MetaException { 1: string message } @@ -630,6 +640,29 @@ service ThriftHiveMetastore extends fb303.FacebookService (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidObjectException o3, 4:InvalidInputException o4) + // + // user-defined functions + // + + void create_function(1:Function func) + throws (1:AlreadyExistsException o1, + 2:InvalidObjectException o2, + 3:MetaException o3, + 4:NoSuchObjectException o4) + + void drop_function(1:string dbName, 2:string funcName) + throws (1:NoSuchObjectException o1, 2:MetaException o3) + + void alter_function(1:string dbName, 2:string funcName, 3:Function newFunc) + throws (1:InvalidOperationException o1, 2:MetaException o2) + + list get_functions(1:string dbName, 2:string pattern) + throws (1:MetaException o1) + list get_all_functions(1: string dbName) + throws (1: MetaException o1) + Function get_function(1:string dbName, 2:string funcName) + throws (1:MetaException o1, 2:NoSuchObjectException o2) + //authorization privileges bool create_role(1:Role role) throws(1:MetaException o1) diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp index c2e0238..2959b71 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -17708,7 +17708,7 @@ uint32_t ThriftHiveMetastore_delete_table_column_statistics_presult::read(::apac return xfer; } -uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -17730,8 +17730,8 @@ uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol:: { case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->role.read(iprot); - this->__isset.role = true; + xfer += this->func.read(iprot); + this->__isset.func = true; } else { xfer += iprot->skip(ftype); } @@ -17748,12 +17748,12 @@ uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_args"); - xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->role.write(oprot); + xfer += oprot->writeFieldBegin("func", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->func.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -17761,12 +17761,12 @@ uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_pargs"); - xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->role)).write(oprot); + xfer += oprot->writeFieldBegin("func", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->func)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -17774,7 +17774,7 @@ uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -17794,18 +17794,34 @@ uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; } else { xfer += iprot->skip(ftype); } @@ -17822,27 +17838,35 @@ uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_result"); - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { + if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -17862,18 +17886,34 @@ uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protoco } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; } else { xfer += iprot->skip(ftype); } @@ -17890,7 +17930,7 @@ uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -17912,8 +17952,16 @@ uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TP { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->funcName); + this->__isset.funcName = true; } else { xfer += iprot->skip(ftype); } @@ -17930,12 +17978,16 @@ uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_args"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->funcName); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -17943,12 +17995,16 @@ uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_pargs"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->funcName))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -17956,7 +18012,7 @@ uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -17976,18 +18032,18 @@ uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol:: } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o3.read(iprot); + this->__isset.o3 = true; } else { xfer += iprot->skip(ftype); } @@ -18004,27 +18060,27 @@ uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_drop_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_result"); - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { + if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18044,18 +18100,18 @@ uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol: } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o3.read(iprot); + this->__isset.o3 = true; } else { xfer += iprot->skip(ftype); } @@ -18072,7 +18128,7 @@ uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18090,7 +18146,36 @@ uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - xfer += iprot->skip(ftype); + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->funcName); + this->__isset.funcName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->newFunc.read(iprot); + this->__isset.newFunc = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } xfer += iprot->readFieldEnd(); } @@ -18099,25 +18184,49 @@ uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_args"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->funcName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("newFunc", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->newFunc.write(oprot); + xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_pargs"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->funcName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("newFunc", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->newFunc)).write(oprot); + xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18137,30 +18246,18 @@ uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::proto } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size613; - ::apache::thrift::protocol::TType _etype616; - xfer += iprot->readListBegin(_etype616, _size613); - this->success.resize(_size613); - uint32_t _i617; - for (_i617 = 0; _i617 < _size613; ++_i617) - { - xfer += iprot->readString(this->success[_i617]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -18177,35 +18274,27 @@ uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_result"); - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter618; - for (_iter618 = this->success.begin(); _iter618 != this->success.end(); ++_iter618) - { - xfer += oprot->writeString((*_iter618)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { + if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18225,30 +18314,18 @@ uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::prot } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size619; - ::apache::thrift::protocol::TType _etype622; - xfer += iprot->readListBegin(_etype622, _size619); - (*(this->success)).resize(_size619); - uint32_t _i623; - for (_i623 = 0; _i623 < _size619; ++_i623) - { - xfer += iprot->readString((*(this->success))[_i623]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -18265,7 +18342,7 @@ uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_functions_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18287,52 +18364,16 @@ uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::T { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast624; - xfer += iprot->readI32(ecast624); - this->principal_type = (PrincipalType::type)ecast624; - this->__isset.principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->grantor); - this->__isset.grantor = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast625; - xfer += iprot->readI32(ecast625); - this->grantorType = (PrincipalType::type)ecast625; - this->__isset.grantorType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->grant_option); - this->__isset.grant_option = true; + xfer += iprot->readString(this->pattern); + this->__isset.pattern = true; } else { xfer += iprot->skip(ftype); } @@ -18349,32 +18390,16 @@ uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_functions_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->writeStructBegin("ThriftHiveMetastore_get_functions_args"); - xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->grantorType); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->grant_option); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->pattern); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -18382,32 +18407,16 @@ uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_functions_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->writeStructBegin("ThriftHiveMetastore_get_functions_pargs"); - xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)(*(this->grantorType))); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool((*(this->grant_option))); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->pattern))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -18415,7 +18424,7 @@ uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_functions_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18436,8 +18445,20 @@ uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol: switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size613; + ::apache::thrift::protocol::TType _etype616; + xfer += iprot->readListBegin(_etype616, _size613); + this->success.resize(_size613); + uint32_t _i617; + for (_i617 = 0; _i617 < _size613; ++_i617) + { + xfer += iprot->readString(this->success[_i617]); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -18463,15 +18484,23 @@ uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_functions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_functions_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter618; + for (_iter618 = this->success.begin(); _iter618 != this->success.end(); ++_iter618) + { + xfer += oprot->writeString((*_iter618)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -18483,7 +18512,7 @@ uint32_t ThriftHiveMetastore_grant_role_result::write(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_functions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18504,8 +18533,20 @@ uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size619; + ::apache::thrift::protocol::TType _etype622; + xfer += iprot->readListBegin(_etype622, _size619); + (*(this->success)).resize(_size619); + uint32_t _i623; + for (_i623 = 0; _i623 < _size619; ++_i623) + { + xfer += iprot->readString((*(this->success))[_i623]); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -18531,7 +18572,7 @@ uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_functions_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18553,26 +18594,8 @@ uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol:: { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast626; - xfer += iprot->readI32(ecast626); - this->principal_type = (PrincipalType::type)ecast626; - this->__isset.principal_type = true; + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; } else { xfer += iprot->skip(ftype); } @@ -18589,20 +18612,12 @@ uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_functions_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->writeStructBegin("ThriftHiveMetastore_get_all_functions_args"); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -18610,20 +18625,12 @@ uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_functions_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->writeStructBegin("ThriftHiveMetastore_get_all_functions_pargs"); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -18631,7 +18638,7 @@ uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_functions_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18652,8 +18659,20 @@ uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size624; + ::apache::thrift::protocol::TType _etype627; + xfer += iprot->readListBegin(_etype627, _size624); + this->success.resize(_size624); + uint32_t _i628; + for (_i628 = 0; _i628 < _size624; ++_i628) + { + xfer += iprot->readString(this->success[_i628]); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -18679,15 +18698,23 @@ uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_functions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_functions_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter629; + for (_iter629 = this->success.begin(); _iter629 != this->success.end(); ++_iter629) + { + xfer += oprot->writeString((*_iter629)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -18699,7 +18726,7 @@ uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_functions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18720,8 +18747,20 @@ uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protoco switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size630; + ::apache::thrift::protocol::TType _etype633; + xfer += iprot->readListBegin(_etype633, _size630); + (*(this->success)).resize(_size630); + uint32_t _i634; + for (_i634 = 0; _i634 < _size630; ++_i634) + { + xfer += iprot->readString((*(this->success))[_i634]); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -18747,7 +18786,7 @@ uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18769,18 +18808,16 @@ uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::T { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast627; - xfer += iprot->readI32(ecast627); - this->principal_type = (PrincipalType::type)ecast627; - this->__isset.principal_type = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->funcName); + this->__isset.funcName = true; } else { xfer += iprot->skip(ftype); } @@ -18797,16 +18834,16 @@ uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_args"); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->funcName); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -18814,16 +18851,16 @@ uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_pargs"); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->funcName))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -18831,7 +18868,7 @@ uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18852,20 +18889,8 @@ uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol: switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size628; - ::apache::thrift::protocol::TType _etype631; - xfer += iprot->readListBegin(_etype631, _size628); - this->success.resize(_size628); - uint32_t _i632; - for (_i632 = 0; _i632 < _size628; ++_i632) - { - xfer += this->success[_i632].read(iprot); - } - xfer += iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -18879,47 +18904,51 @@ uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol: xfer += iprot->skip(ftype); } break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } xfer += iprot->readStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter633; - for (_iter633 = this->success.begin(); _iter633 != this->success.end(); ++_iter633) - { - xfer += (*_iter633).write(oprot); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -18940,20 +18969,8 @@ uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size634; - ::apache::thrift::protocol::TType _etype637; - xfer += iprot->readListBegin(_etype637, _size634); - (*(this->success)).resize(_size634); - uint32_t _i638; - for (_i638 = 0; _i638 < _size634; ++_i638) - { - xfer += (*(this->success))[_i638].read(iprot); - } - xfer += iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -18967,6 +18984,14 @@ uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -18979,7 +19004,7 @@ uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19001,36 +19026,8 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::prot { case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->hiveObject.read(iprot); - this->__isset.hiveObject = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size639; - ::apache::thrift::protocol::TType _etype642; - xfer += iprot->readListBegin(_etype642, _size639); - this->group_names.resize(_size639); - uint32_t _i643; - for (_i643 = 0; _i643 < _size639; ++_i643) - { - xfer += iprot->readString(this->group_names[_i643]); - } - xfer += iprot->readListEnd(); - } - this->__isset.group_names = true; + xfer += this->role.read(iprot); + this->__isset.role = true; } else { xfer += iprot->skip(ftype); } @@ -19047,28 +19044,12 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_role_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->writeStructBegin("ThriftHiveMetastore_create_role_args"); - 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())); - std::vector ::const_iterator _iter644; - for (_iter644 = this->group_names.begin(); _iter644 != this->group_names.end(); ++_iter644) - { - xfer += oprot->writeString((*_iter644)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->role.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -19076,28 +19057,12 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_role_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->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); - 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())); - std::vector ::const_iterator _iter645; - for (_iter645 = (*(this->group_names)).begin(); _iter645 != (*(this->group_names)).end(); ++_iter645) - { - xfer += oprot->writeString((*_iter645)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->role)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -19105,7 +19070,7 @@ uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19126,8 +19091,8 @@ uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::pr switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -19153,15 +19118,15 @@ uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -19173,7 +19138,7 @@ uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19194,8 +19159,8 @@ uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::p switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -19221,7 +19186,7 @@ uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19243,26 +19208,8 @@ uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protoc { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast646; - xfer += iprot->readI32(ecast646); - this->principal_type = (PrincipalType::type)ecast646; - this->__isset.principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->hiveObject.read(iprot); - this->__isset.hiveObject = true; + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; } else { xfer += iprot->skip(ftype); } @@ -19279,20 +19226,12 @@ uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_role_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->writeStructBegin("ThriftHiveMetastore_drop_role_args"); - xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->hiveObject.write(oprot); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -19300,20 +19239,12 @@ uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_role_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->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); - xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->hiveObject)).write(oprot); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -19321,7 +19252,7 @@ uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19342,20 +19273,8 @@ uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::prot switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size647; - ::apache::thrift::protocol::TType _etype650; - xfer += iprot->readListBegin(_etype650, _size647); - this->success.resize(_size647); - uint32_t _i651; - for (_i651 = 0; _i651 < _size647; ++_i651) - { - xfer += this->success[_i651].read(iprot); - } - xfer += iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -19381,23 +19300,15 @@ uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter652; - for (_iter652 = this->success.begin(); _iter652 != this->success.end(); ++_iter652) - { - xfer += (*_iter652).write(oprot); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -19409,7 +19320,7 @@ uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19430,20 +19341,8 @@ uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::pro switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size653; - ::apache::thrift::protocol::TType _etype656; - xfer += iprot->readListBegin(_etype656, _size653); - (*(this->success)).resize(_size653); - uint32_t _i657; - for (_i657 = 0; _i657 < _size653; ++_i657) - { - xfer += (*(this->success))[_i657].read(iprot); - } - xfer += iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -19469,7 +19368,7 @@ uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19487,20 +19386,7 @@ uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -19509,33 +19395,25 @@ uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_role_names_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->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_role_names_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->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19556,8 +19434,20 @@ uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::pro switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size635; + ::apache::thrift::protocol::TType _etype638; + xfer += iprot->readListBegin(_etype638, _size635); + this->success.resize(_size635); + uint32_t _i639; + for (_i639 = 0; _i639 < _size635; ++_i639) + { + xfer += iprot->readString(this->success[_i639]); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -19583,15 +19473,23 @@ uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_role_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter640; + for (_iter640 = this->success.begin(); _iter640 != this->success.end(); ++_iter640) + { + xfer += oprot->writeString((*_iter640)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -19603,7 +19501,7 @@ uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19624,8 +19522,20 @@ uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::pr switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size641; + ::apache::thrift::protocol::TType _etype644; + xfer += iprot->readListBegin(_etype644, _size641); + (*(this->success)).resize(_size641); + uint32_t _i645; + for (_i645 = 0; _i645 < _size641; ++_i645) + { + xfer += iprot->readString((*(this->success))[_i645]); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -19651,7 +19561,7 @@ uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19672,9 +19582,53 @@ uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::prot switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast646; + xfer += iprot->readI32(ecast646); + this->principal_type = (PrincipalType::type)ecast646; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast647; + xfer += iprot->readI32(ecast647); + this->grantorType = (PrincipalType::type)ecast647; + this->__isset.grantorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grant_option); + this->__isset.grant_option = true; } else { xfer += iprot->skip(ftype); } @@ -19691,12 +19645,32 @@ uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_args"); - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->privileges.write(oprot); + 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(); @@ -19704,12 +19678,32 @@ uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_pargs"); - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->privileges)).write(oprot); + 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(); @@ -19717,7 +19711,7 @@ uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19765,11 +19759,11 @@ uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -19785,7 +19779,7 @@ uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19833,7 +19827,7 @@ uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19855,28 +19849,26 @@ uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TPro { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size658; - ::apache::thrift::protocol::TType _etype661; - xfer += iprot->readListBegin(_etype661, _size658); - this->group_names.resize(_size658); - uint32_t _i662; - for (_i662 = 0; _i662 < _size658; ++_i662) - { - xfer += iprot->readString(this->group_names[_i662]); - } - xfer += iprot->readListEnd(); - } - this->__isset.group_names = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast648; + xfer += iprot->readI32(ecast648); + this->principal_type = (PrincipalType::type)ecast648; + this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); } @@ -19893,24 +19885,20 @@ uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_args"); - xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_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())); - std::vector ::const_iterator _iter663; - for (_iter663 = this->group_names.begin(); _iter663 != this->group_names.end(); ++_iter663) - { - xfer += oprot->writeString((*_iter663)); - } - xfer += oprot->writeListEnd(); - } + 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(); @@ -19918,24 +19906,20 @@ uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_pargs"); - xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_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())); - std::vector ::const_iterator _iter664; - for (_iter664 = (*(this->group_names)).begin(); _iter664 != (*(this->group_names)).end(); ++_iter664) - { - xfer += oprot->writeString((*_iter664)); - } - xfer += oprot->writeListEnd(); - } + 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(); @@ -19943,7 +19927,7 @@ uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -19964,20 +19948,8 @@ uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TP switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size665; - ::apache::thrift::protocol::TType _etype668; - xfer += iprot->readListBegin(_etype668, _size665); - this->success.resize(_size665); - uint32_t _i669; - for (_i669 = 0; _i669 < _size665; ++_i669) - { - xfer += iprot->readString(this->success[_i669]); - } - xfer += iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -20003,23 +19975,15 @@ uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter670; - for (_iter670 = this->success.begin(); _iter670 != this->success.end(); ++_iter670) - { - xfer += oprot->writeString((*_iter670)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -20031,7 +19995,7 @@ uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20052,20 +20016,8 @@ uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::T switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size671; - ::apache::thrift::protocol::TType _etype674; - xfer += iprot->readListBegin(_etype674, _size671); - (*(this->success)).resize(_size671); - uint32_t _i675; - for (_i675 = 0; _i675 < _size671; ++_i675) - { - xfer += iprot->readString((*(this->success))[_i675]); - } - xfer += iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -20091,7 +20043,7 @@ uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20113,16 +20065,18 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::p { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_owner); - this->__isset.token_owner = true; + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->renewer_kerberos_principal_name); - this->__isset.renewer_kerberos_principal_name = true; + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast649; + xfer += iprot->readI32(ecast649); + this->principal_type = (PrincipalType::type)ecast649; + this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); } @@ -20139,16 +20093,16 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); - xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_owner); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); 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->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -20156,16 +20110,16 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift:: return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); - xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_owner))); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); 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->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -20173,7 +20127,7 @@ uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20194,8 +20148,20 @@ uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift: switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size650; + ::apache::thrift::protocol::TType _etype653; + xfer += iprot->readListBegin(_etype653, _size650); + this->success.resize(_size650); + uint32_t _i654; + for (_i654 = 0; _i654 < _size650; ++_i654) + { + xfer += this->success[_i654].read(iprot); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -20221,15 +20187,23 @@ uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter655; + for (_iter655 = this->success.begin(); _iter655 != this->success.end(); ++_iter655) + { + xfer += (*_iter655).write(oprot); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -20241,7 +20215,7 @@ uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20262,8 +20236,20 @@ uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size656; + ::apache::thrift::protocol::TType _etype659; + xfer += iprot->readListBegin(_etype659, _size656); + (*(this->success)).resize(_size656); + uint32_t _i660; + for (_i660 = 0; _i660 < _size656; ++_i660) + { + xfer += (*(this->success))[_i660].read(iprot); + } + xfer += iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -20289,7 +20275,7 @@ uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20310,9 +20296,37 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift: switch (fid) { case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_str_form); - this->__isset.token_str_form = true; + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size661; + ::apache::thrift::protocol::TType _etype664; + xfer += iprot->readListBegin(_etype664, _size661); + this->group_names.resize(_size661); + uint32_t _i665; + for (_i665 = 0; _i665 < _size661; ++_i665) + { + xfer += iprot->readString(this->group_names[_i665]); + } + xfer += iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -20329,12 +20343,28 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_args"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_str_form); + 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())); + std::vector ::const_iterator _iter666; + for (_iter666 = this->group_names.begin(); _iter666 != this->group_names.end(); ++_iter666) + { + xfer += oprot->writeString((*_iter666)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -20342,12 +20372,28 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_pargs"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_str_form))); + 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())); + std::vector ::const_iterator _iter667; + for (_iter667 = (*(this->group_names)).begin(); _iter667 != (*(this->group_names)).end(); ++_iter667) + { + xfer += oprot->writeString((*_iter667)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -20355,7 +20401,7 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20376,8 +20422,8 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrif switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->success); + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -20403,15 +20449,15 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); - xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -20423,7 +20469,7 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thri return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20444,8 +20490,8 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thri switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -20471,7 +20517,7 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thri return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20493,8 +20539,26 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_str_form); - this->__isset.token_str_form = true; + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast668; + xfer += iprot->readI32(ecast668); + this->principal_type = (PrincipalType::type)ecast668; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; } else { xfer += iprot->skip(ftype); } @@ -20511,12 +20575,20 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_args"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_str_form); + 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(); @@ -20524,12 +20596,20 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_pargs"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_str_form))); + 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(); @@ -20537,7 +20617,7 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thri return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20557,6 +20637,26 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thri } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size669; + ::apache::thrift::protocol::TType _etype672; + xfer += iprot->readListBegin(_etype672, _size669); + this->success.resize(_size669); + uint32_t _i673; + for (_i673 = 0; _i673 < _size669; ++_i673) + { + xfer += this->success[_i673].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -20577,13 +20677,25 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thri return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_result"); - if (this->__isset.o1) { + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter674; + for (_iter674 = this->success.begin(); _iter674 != this->success.end(); ++_iter674) + { + xfer += (*_iter674).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); @@ -20593,7 +20705,7 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thr return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -20613,6 +20725,26 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thr } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size675; + ::apache::thrift::protocol::TType _etype678; + xfer += iprot->readListBegin(_etype678, _size675); + (*(this->success)).resize(_size675); + uint32_t _i679; + for (_i679 = 0; _i679 < _size675; ++_i679) + { + xfer += (*(this->success))[_i679].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -20633,19 +20765,1495 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thr return xfer; } -void ThriftHiveMetastoreClient::create_database(const Database& database) -{ +uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; +} + +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; +} + +uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; +} + +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; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size680; + ::apache::thrift::protocol::TType _etype683; + xfer += iprot->readListBegin(_etype683, _size680); + this->group_names.resize(_size680); + uint32_t _i684; + for (_i684 = 0; _i684 < _size680; ++_i684) + { + xfer += iprot->readString(this->group_names[_i684]); + } + xfer += iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_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())); + std::vector ::const_iterator _iter685; + for (_iter685 = this->group_names.begin(); _iter685 != this->group_names.end(); ++_iter685) + { + xfer += oprot->writeString((*_iter685)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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())); + std::vector ::const_iterator _iter686; + for (_iter686 = (*(this->group_names)).begin(); _iter686 != (*(this->group_names)).end(); ++_iter686) + { + xfer += oprot->writeString((*_iter686)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size687; + ::apache::thrift::protocol::TType _etype690; + xfer += iprot->readListBegin(_etype690, _size687); + this->success.resize(_size687); + uint32_t _i691; + for (_i691 = 0; _i691 < _size687; ++_i691) + { + xfer += iprot->readString(this->success[_i691]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter692; + for (_iter692 = this->success.begin(); _iter692 != this->success.end(); ++_iter692) + { + xfer += oprot->writeString((*_iter692)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size693; + ::apache::thrift::protocol::TType _etype696; + xfer += iprot->readListBegin(_etype696, _size693); + (*(this->success)).resize(_size693); + uint32_t _i697; + for (_i697 = 0; _i697 < _size693; ++_i697) + { + xfer += iprot->readString((*(this->success))[_i697]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_owner); + this->__isset.token_owner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->renewer_kerberos_principal_name); + this->__isset.renewer_kerberos_principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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; +} + +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; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_str_form); + this->__isset.token_str_form = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; +} + +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; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_str_form); + this->__isset.token_str_form = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; +} + +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; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void ThriftHiveMetastoreClient::create_database(const Database& database) +{ send_create_database(database); recv_create_database(); } -void ThriftHiveMetastoreClient::send_create_database(const Database& database) +void ThriftHiveMetastoreClient::send_create_database(const Database& database) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_database_pargs args; + args.database = &database; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +{ + send_get_database(name); + recv_get_database(_return); +} + +void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_database_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_database_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); +} + +void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + send_drop_database(name, deleteData, cascade); + recv_drop_database(); +} + +void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_database_pargs args; + args.name = &name; + args.deleteData = &deleteData; + args.cascade = &cascade; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +{ + send_get_databases(pattern); + recv_get_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_databases_pargs args; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +{ + send_get_all_databases(); + recv_get_all_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_databases() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_databases_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_all_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) +{ + send_alter_database(dbname, db); + recv_alter_database(); +} + +void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; + ThriftHiveMetastore_alter_database_pargs args; + args.dbname = &dbname; + args.db = &db; args.write(oprot_); oprot_->writeMessageEnd(); @@ -20653,7 +22261,7 @@ void ThriftHiveMetastoreClient::send_create_database(const Database& database) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_create_database() +void ThriftHiveMetastoreClient::recv_alter_database() { int32_t rseqid = 0; @@ -20673,12 +22281,12 @@ void ThriftHiveMetastoreClient::recv_create_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_database") != 0) { + if (fname.compare("alter_database") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_database_presult result; + ThriftHiveMetastore_alter_database_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -20689,24 +22297,21 @@ void ThriftHiveMetastoreClient::recv_create_database() if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } return; } -void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) { - send_get_database(name); - recv_get_database(_return); + send_get_type(name); + recv_get_type(_return); } -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +void ThriftHiveMetastoreClient::send_get_type(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_database_pargs args; + ThriftHiveMetastore_get_type_pargs args; args.name = &name; args.write(oprot_); @@ -20715,7 +22320,7 @@ void ThriftHiveMetastoreClient::send_get_database(const std::string& name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +void ThriftHiveMetastoreClient::recv_get_type(Type& _return) { int32_t rseqid = 0; @@ -20735,12 +22340,12 @@ void ThriftHiveMetastoreClient::recv_get_database(Database& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_database") != 0) { + if (fname.compare("get_type") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_database_presult result; + ThriftHiveMetastore_get_type_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -20756,24 +22361,22 @@ void ThriftHiveMetastoreClient::recv_get_database(Database& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) +bool ThriftHiveMetastoreClient::create_type(const Type& type) { - send_drop_database(name, deleteData, cascade); - recv_drop_database(); + send_create_type(type); + return recv_create_type(); } -void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) +void ThriftHiveMetastoreClient::send_create_type(const Type& type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; - args.cascade = &cascade; + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; args.write(oprot_); oprot_->writeMessageEnd(); @@ -20781,7 +22384,7 @@ void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_drop_database() +bool ThriftHiveMetastoreClient::recv_create_type() { int32_t rseqid = 0; @@ -20801,16 +22404,21 @@ void ThriftHiveMetastoreClient::recv_drop_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_database") != 0) { + if (fname.compare("create_type") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_drop_database_presult result; + bool _return; + ThriftHiveMetastore_create_type_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } @@ -20820,22 +22428,22 @@ void ThriftHiveMetastoreClient::recv_drop_database() if (result.__isset.o3) { throw result.o3; } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); } -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +bool ThriftHiveMetastoreClient::drop_type(const std::string& type) { - send_get_databases(pattern); - recv_get_databases(_return); + send_drop_type(type); + return recv_drop_type(); } -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; args.write(oprot_); oprot_->writeMessageEnd(); @@ -20843,7 +22451,7 @@ void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_drop_type() { int32_t rseqid = 0; @@ -20863,39 +22471,43 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_databases") != 0) { + if (fname.compare("drop_type") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_databases_presult result; + bool _return; + ThriftHiveMetastore_drop_type_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) { - send_get_all_databases(); - recv_get_all_databases(_return); + send_get_type_all(name); + recv_get_type_all(_return); } -void ThriftHiveMetastoreClient::send_get_all_databases() +void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_databases_pargs args; + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -20903,7 +22515,7 @@ void ThriftHiveMetastoreClient::send_get_all_databases() oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) { int32_t rseqid = 0; @@ -20923,12 +22535,12 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_all_databases") != 0) { + if (fname.compare("get_type_all") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_all_databases_presult result; + ThriftHiveMetastore_get_type_all_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -20938,26 +22550,26 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector // _return pointer has now been filled return; } - if (result.__isset.o1) { - throw result.o1; + if (result.__isset.o2) { + throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) +void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { - send_alter_database(dbname, db); - recv_alter_database(); + send_get_fields(db_name, table_name); + recv_get_fields(_return); } -void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) +void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_database_pargs args; - args.dbname = &dbname; - args.db = &db; + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -20965,7 +22577,7 @@ void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_database() +void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) { int32_t rseqid = 0; @@ -20985,38 +22597,47 @@ void ThriftHiveMetastoreClient::recv_alter_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_database") != 0) { + if (fname.compare("get_fields") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_database_presult result; + ThriftHiveMetastore_get_fields_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { - send_get_type(name); - recv_get_type(_return); + send_get_schema(db_name, table_name); + recv_get_schema(_return); } -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21024,7 +22645,7 @@ void ThriftHiveMetastoreClient::send_get_type(const std::string& name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) { int32_t rseqid = 0; @@ -21044,12 +22665,12 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_type") != 0) { + if (fname.compare("get_schema") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_type_presult result; + ThriftHiveMetastore_get_schema_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -21065,22 +22686,91 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); +} + +void ThriftHiveMetastoreClient::create_table(const Table& tbl) +{ + send_create_table(tbl); + recv_create_table(); +} + +void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_table() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; } -bool ThriftHiveMetastoreClient::create_type(const Type& type) +void ThriftHiveMetastoreClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { - send_create_type(type); - return recv_create_type(); + send_create_table_with_environment_context(tbl, environment_context); + recv_create_table_with_environment_context(); } -void ThriftHiveMetastoreClient::send_create_type(const Type& type) +void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; + ThriftHiveMetastore_create_table_with_environment_context_pargs args; + args.tbl = &tbl; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21088,7 +22778,7 @@ void ThriftHiveMetastoreClient::send_create_type(const Type& type) oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_create_type() +void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() { int32_t rseqid = 0; @@ -21108,21 +22798,16 @@ bool ThriftHiveMetastoreClient::recv_create_type() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_type") != 0) { + if (fname.compare("create_table_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_create_type_presult result; - result.success = &_return; + ThriftHiveMetastore_create_table_with_environment_context_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } if (result.__isset.o1) { throw result.o1; } @@ -21132,22 +22817,27 @@ bool ThriftHiveMetastoreClient::recv_create_type() if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); + if (result.__isset.o4) { + throw result.o4; + } + return; } -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - send_drop_type(type); - return recv_drop_type(); + send_drop_table(dbname, name, deleteData); + recv_drop_table(); } -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21155,7 +22845,7 @@ void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_type() +void ThriftHiveMetastoreClient::recv_drop_table() { int32_t rseqid = 0; @@ -21175,43 +22865,41 @@ bool ThriftHiveMetastoreClient::recv_drop_type() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_type") != 0) { + if (fname.compare("drop_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_type_presult result; - result.success = &_return; + ThriftHiveMetastore_drop_table_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o3) { + throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +void ThriftHiveMetastoreClient::drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) { - send_get_type_all(name); - recv_get_type_all(_return); + send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); + recv_drop_table_with_environment_context(); } -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +void ThriftHiveMetastoreClient::send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_all_pargs args; + ThriftHiveMetastore_drop_table_with_environment_context_pargs args; + args.dbname = &dbname; args.name = &name; + args.deleteData = &deleteData; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21219,7 +22907,7 @@ void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +void ThriftHiveMetastoreClient::recv_drop_table_with_environment_context() { int32_t rseqid = 0; @@ -21239,41 +22927,39 @@ void ThriftHiveMetastoreClient::recv_get_type_all(std::map & iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_type_all") != 0) { + if (fname.compare("drop_table_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_type_all_presult result; - result.success = &_return; + ThriftHiveMetastore_drop_table_with_environment_context_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; + if (result.__isset.o1) { + throw result.o1; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o3) { + throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { - send_get_fields(db_name, table_name); - recv_get_fields(_return); + send_get_tables(db_name, pattern); + recv_get_tables(_return); } -void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_fields_pargs args; + ThriftHiveMetastore_get_tables_pargs args; args.db_name = &db_name; - args.table_name = &table_name; + args.pattern = &pattern; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21281,7 +22967,7 @@ void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) { int32_t rseqid = 0; @@ -21301,12 +22987,12 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_fields") != 0) { + if (fname.compare("get_tables") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_fields_presult result; + ThriftHiveMetastore_get_tables_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -21319,29 +23005,22 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); } -void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) { - send_get_schema(db_name, table_name); - recv_get_schema(_return); + send_get_all_tables(db_name); + recv_get_all_tables(_return); } -void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_schema_pargs args; + ThriftHiveMetastore_get_all_tables_pargs args; args.db_name = &db_name; - args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21349,7 +23028,7 @@ void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) { int32_t rseqid = 0; @@ -21369,12 +23048,12 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_schema") != 0) { + if (fname.compare("get_all_tables") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_schema_presult result; + ThriftHiveMetastore_get_all_tables_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -21387,28 +23066,23 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table(const Table& tbl) +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { - send_create_table(tbl); - recv_create_table(); + send_get_table(dbname, tbl_name); + recv_get_table(_return); } -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21416,7 +23090,7 @@ void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_create_table() +void ThriftHiveMetastoreClient::recv_get_table(Table& _return) { int32_t rseqid = 0; @@ -21436,45 +23110,44 @@ void ThriftHiveMetastoreClient::recv_create_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_table") != 0) { + if (fname.compare("get_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_table_presult result; + ThriftHiveMetastore_get_table_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector & _return, const std::string& dbname, const std::vector & tbl_names) { - send_create_table_with_environment_context(tbl, environment_context); - recv_create_table_with_environment_context(); + send_get_table_objects_by_name(dbname, tbl_names); + recv_get_table_objects_by_name(_return); } -void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_with_environment_context_pargs args; - args.tbl = &tbl; - args.environment_context = &environment_context; + ThriftHiveMetastore_get_table_objects_by_name_pargs args; + args.dbname = &dbname; + args.tbl_names = &tbl_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21482,7 +23155,7 @@ void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() +void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return) { int32_t rseqid = 0; @@ -21502,16 +23175,21 @@ void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_table_with_environment_context") != 0) { + if (fname.compare("get_table_objects_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_table_with_environment_context_presult result; + ThriftHiveMetastore_get_table_objects_by_name_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } @@ -21521,27 +23199,24 @@ void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() if (result.__isset.o3) { throw result.o3; } - if (result.__isset.o4) { - throw result.o4; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { - send_drop_table(dbname, name, deleteData); - recv_drop_table(); + send_get_table_names_by_filter(dbname, filter, max_tables); + recv_get_table_names_by_filter(_return); } -void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_table_pargs args; + ThriftHiveMetastore_get_table_names_by_filter_pargs args; args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; + args.filter = &filter; + args.max_tables = &max_tables; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21549,7 +23224,7 @@ void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_drop_table() +void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -21569,41 +23244,48 @@ void ThriftHiveMetastoreClient::recv_drop_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_table") != 0) { + if (fname.compare("get_table_names_by_filter") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_drop_table_presult result; + ThriftHiveMetastore_get_table_names_by_filter_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } + if (result.__isset.o2) { + throw result.o2; + } if (result.__isset.o3) { throw result.o3; } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { - send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); - recv_drop_table_with_environment_context(); + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); } -void ThriftHiveMetastoreClient::send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_table_with_environment_context_pargs args; + ThriftHiveMetastore_alter_table_pargs args; args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; - args.environment_context = &environment_context; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21611,7 +23293,7 @@ void ThriftHiveMetastoreClient::send_drop_table_with_environment_context(const s oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_drop_table_with_environment_context() +void ThriftHiveMetastoreClient::recv_alter_table() { int32_t rseqid = 0; @@ -21631,12 +23313,12 @@ void ThriftHiveMetastoreClient::recv_drop_table_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_table_with_environment_context") != 0) { + if (fname.compare("alter_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_drop_table_with_environment_context_presult result; + ThriftHiveMetastore_alter_table_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -21644,26 +23326,28 @@ void ThriftHiveMetastoreClient::recv_drop_table_with_environment_context() if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o3) { - throw result.o3; + if (result.__isset.o2) { + throw result.o2; } return; } -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { - send_get_tables(db_name, pattern); - recv_get_tables(_return); + send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); + recv_alter_table_with_environment_context(); } -void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_tables_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; + ThriftHiveMetastore_alter_table_with_environment_context_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21671,7 +23355,7 @@ void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() { int32_t rseqid = 0; @@ -21691,40 +23375,38 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_tables") != 0) { + if (fname.compare("alter_table_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_tables_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_table_with_environment_context_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + return; } -void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) { - send_get_all_tables(db_name); - recv_get_all_tables(_return); + send_add_partition(new_part); + recv_add_partition(_return); } -void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_tables_pargs args; - args.db_name = &db_name; + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21732,7 +23414,7 @@ void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) { int32_t rseqid = 0; @@ -21752,12 +23434,12 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _ iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_all_tables") != 0) { + if (fname.compare("add_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_all_tables_presult result; + ThriftHiveMetastore_add_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -21770,23 +23452,29 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) { - send_get_table(dbname, tbl_name); - recv_get_table(_return); + send_add_partition_with_environment_context(new_part, environment_context); + recv_add_partition_with_environment_context(_return); } -void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; + ThriftHiveMetastore_add_partition_with_environment_context_pargs args; + args.new_part = &new_part; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21794,7 +23482,7 @@ void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) { int32_t rseqid = 0; @@ -21814,12 +23502,12 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table") != 0) { + if (fname.compare("add_partition_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_presult result; + ThriftHiveMetastore_add_partition_with_environment_context_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -21835,23 +23523,25 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) +int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) { - send_get_table_objects_by_name(dbname, tbl_names); - recv_get_table_objects_by_name(_return); + send_add_partitions(new_parts); + return recv_add_partitions(); } -void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) +void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_objects_by_name_pargs args; - args.dbname = &dbname; - args.tbl_names = &tbl_names; + ThriftHiveMetastore_add_partitions_pargs args; + args.new_parts = &new_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21859,7 +23549,7 @@ void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return) +int32_t ThriftHiveMetastoreClient::recv_add_partitions() { int32_t rseqid = 0; @@ -21879,20 +23569,20 @@ void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table_objects_by_name") != 0) { + if (fname.compare("add_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_objects_by_name_presult result; + int32_t _return; + ThriftHiveMetastore_add_partitions_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -21903,24 +23593,24 @@ void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) +void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - send_get_table_names_by_filter(dbname, filter, max_tables); - recv_get_table_names_by_filter(_return); + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); } -void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) +void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_names_by_filter_pargs args; - args.dbname = &dbname; - args.filter = &filter; - args.max_tables = &max_tables; + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21928,7 +23618,7 @@ void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) { int32_t rseqid = 0; @@ -21948,12 +23638,12 @@ void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table_names_by_filter") != 0) { + if (fname.compare("append_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_names_by_filter_presult result; + ThriftHiveMetastore_append_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -21972,24 +23662,22 @@ void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vectorwriteMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; + ThriftHiveMetastore_add_partitions_req_pargs args; + args.request = &request; args.write(oprot_); oprot_->writeMessageEnd(); @@ -21997,7 +23685,7 @@ void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_table() +void ThriftHiveMetastoreClient::recv_add_partitions_req(AddPartitionsResult& _return) { int32_t rseqid = 0; @@ -22017,40 +23705,48 @@ void ThriftHiveMetastoreClient::recv_alter_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_table") != 0) { + if (fname.compare("add_partitions_req") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_table_presult result; + ThriftHiveMetastore_add_partitions_req_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_req failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) { - send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); - recv_alter_table_with_environment_context(); + send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); + recv_append_partition_with_environment_context(_return); } -void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_with_environment_context_pargs args; - args.dbname = &dbname; + ThriftHiveMetastore_append_partition_with_environment_context_pargs args; + args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; + args.part_vals = &part_vals; args.environment_context = &environment_context; args.write(oprot_); @@ -22059,7 +23755,7 @@ void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() +void ThriftHiveMetastoreClient::recv_append_partition_with_environment_context(Partition& _return) { int32_t rseqid = 0; @@ -22079,38 +23775,48 @@ void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_table_with_environment_context") != 0) { + if (fname.compare("append_partition_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_table_with_environment_context_presult result; + ThriftHiveMetastore_append_partition_with_environment_context_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - send_add_partition(new_part); - recv_add_partition(_return); + send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return); } -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; + ThriftHiveMetastore_append_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22118,7 +23824,7 @@ void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -22138,12 +23844,12 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partition") != 0) { + if (fname.compare("append_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_partition_presult result; + ThriftHiveMetastore_append_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -22162,22 +23868,24 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) { - send_add_partition_with_environment_context(new_part, environment_context); - recv_add_partition_with_environment_context(_return); + send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); + recv_append_partition_by_name_with_environment_context(_return); } -void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_with_environment_context_pargs args; - args.new_part = &new_part; + ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; args.environment_context = &environment_context; args.write(oprot_); @@ -22186,7 +23894,7 @@ void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) +void ThriftHiveMetastoreClient::recv_append_partition_by_name_with_environment_context(Partition& _return) { int32_t rseqid = 0; @@ -22206,12 +23914,12 @@ void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Part iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partition_with_environment_context") != 0) { + if (fname.compare("append_partition_by_name_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_partition_with_environment_context_presult result; + ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -22230,22 +23938,25 @@ void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Part if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); } -int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) +bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { - send_add_partitions(new_parts); - return recv_add_partitions(); + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); } -void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) +void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partitions_pargs args; - args.new_parts = &new_parts; + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22253,7 +23964,7 @@ void ThriftHiveMetastoreClient::send_add_partitions(const std::vector oprot_->getTransport()->flush(); } -int32_t ThriftHiveMetastoreClient::recv_add_partitions() +bool ThriftHiveMetastoreClient::recv_drop_partition() { int32_t rseqid = 0; @@ -22273,13 +23984,13 @@ int32_t ThriftHiveMetastoreClient::recv_add_partitions() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partitions") != 0) { + if (fname.compare("drop_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - int32_t _return; - ThriftHiveMetastore_add_partitions_presult result; + bool _return; + ThriftHiveMetastore_drop_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -22294,27 +24005,26 @@ int32_t ThriftHiveMetastoreClient::recv_add_partitions() if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +bool ThriftHiveMetastoreClient::drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) { - send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); + send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); + return recv_drop_partition_with_environment_context(); } -void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_pargs args; + ThriftHiveMetastore_drop_partition_with_environment_context_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22322,7 +24032,7 @@ void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +bool ThriftHiveMetastoreClient::recv_drop_partition_with_environment_context() { int32_t rseqid = 0; @@ -22342,20 +24052,20 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("append_partition") != 0) { + if (fname.compare("drop_partition_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_presult result; + bool _return; + ThriftHiveMetastore_drop_partition_with_environment_context_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -22363,25 +24073,25 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) +bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { - send_add_partitions_req(request); - recv_add_partitions_req(_return); + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); } -void ThriftHiveMetastoreClient::send_add_partitions_req(const AddPartitionsRequest& request) +void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partitions_req_pargs args; - args.request = &request; + ThriftHiveMetastore_drop_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22389,7 +24099,7 @@ void ThriftHiveMetastoreClient::send_add_partitions_req(const AddPartitionsReque oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_partitions_req(AddPartitionsResult& _return) +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() { int32_t rseqid = 0; @@ -22409,20 +24119,20 @@ void ThriftHiveMetastoreClient::recv_add_partitions_req(AddPartitionsResult& _re iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partitions_req") != 0) { + if (fname.compare("drop_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_partitions_req_presult result; + bool _return; + ThriftHiveMetastore_drop_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -22430,27 +24140,25 @@ void ThriftHiveMetastoreClient::recv_add_partitions_req(AddPartitionsResult& _re if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_req failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) +bool ThriftHiveMetastoreClient::drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) { - send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); - recv_append_partition_with_environment_context(_return); + send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); + return recv_drop_partition_by_name_with_environment_context(); } -void ThriftHiveMetastoreClient::send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_with_environment_context_pargs args; + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; + args.part_name = &part_name; + args.deleteData = &deleteData; args.environment_context = &environment_context; args.write(oprot_); @@ -22459,7 +24167,7 @@ void ThriftHiveMetastoreClient::send_append_partition_with_environment_context(c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_append_partition_with_environment_context(Partition& _return) +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name_with_environment_context() { int32_t rseqid = 0; @@ -22479,20 +24187,20 @@ void ThriftHiveMetastoreClient::recv_append_partition_with_environment_context(P iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("append_partition_with_environment_context") != 0) { + if (fname.compare("drop_partition_by_name_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_with_environment_context_presult result; + bool _return; + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -22500,27 +24208,24 @@ void ThriftHiveMetastoreClient::recv_append_partition_with_environment_context(P if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); } -void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_by_name_pargs args; + ThriftHiveMetastore_get_partition_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_name = &part_name; + args.part_vals = &part_vals; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22528,7 +24233,7 @@ void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) { int32_t rseqid = 0; @@ -22548,12 +24253,12 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("append_partition_by_name") != 0) { + if (fname.compare("get_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_by_name_presult result; + ThriftHiveMetastore_get_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -22569,28 +24274,26 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { - send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); - recv_append_partition_by_name_with_environment_context(_return); + send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + recv_exchange_partition(_return); } -void ThriftHiveMetastoreClient::send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.environment_context = &environment_context; + ThriftHiveMetastore_exchange_partition_pargs args; + args.partitionSpecs = &partitionSpecs; + args.source_db = &source_db; + args.source_table_name = &source_table_name; + args.dest_db = &dest_db; + args.dest_table_name = &dest_table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22598,7 +24301,7 @@ void ThriftHiveMetastoreClient::send_append_partition_by_name_with_environment_c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_append_partition_by_name_with_environment_context(Partition& _return) +void ThriftHiveMetastoreClient::recv_exchange_partition(Partition& _return) { int32_t rseqid = 0; @@ -22618,12 +24321,12 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name_with_environment_c iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("append_partition_by_name_with_environment_context") != 0) { + if (fname.compare("exchange_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult result; + ThriftHiveMetastore_exchange_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -22642,25 +24345,29 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name_with_environment_c if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partition failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::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) { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + recv_get_partition_with_auth(_return); } -void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_partition_with_auth(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) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_pargs args; + ThriftHiveMetastore_get_partition_with_auth_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_vals = &part_vals; - args.deleteData = &deleteData; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22668,7 +24375,7 @@ void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_partition() +void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) { int32_t rseqid = 0; @@ -22688,20 +24395,20 @@ bool ThriftHiveMetastoreClient::recv_drop_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition") != 0) { + if (fname.compare("get_partition_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; + ThriftHiveMetastore_get_partition_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -22709,26 +24416,24 @@ bool ThriftHiveMetastoreClient::recv_drop_partition() if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); - return recv_drop_partition_with_environment_context(); + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return); } -void ThriftHiveMetastoreClient::send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_with_environment_context_pargs args; + ThriftHiveMetastore_get_partition_by_name_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; - args.environment_context = &environment_context; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22736,7 +24441,7 @@ void ThriftHiveMetastoreClient::send_drop_partition_with_environment_context(con oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_with_environment_context() +void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -22756,20 +24461,20 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition_with_environment_context") != 0) { + if (fname.compare("get_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_partition_with_environment_context_presult result; + ThriftHiveMetastore_get_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -22777,25 +24482,24 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_with_environment_context() if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_return); } -void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_by_name_pargs args; + ThriftHiveMetastore_get_partitions_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22803,7 +24507,7 @@ void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& d oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) { int32_t rseqid = 0; @@ -22823,20 +24527,20 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition_by_name") != 0) { + if (fname.compare("get_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; + ThriftHiveMetastore_get_partitions_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -22844,26 +24548,26 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::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) { - send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); - return recv_drop_partition_by_name_with_environment_context(); + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + recv_get_partitions_with_auth(_return); } -void ThriftHiveMetastoreClient::send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_get_partitions_with_auth(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) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs args; + ThriftHiveMetastore_get_partitions_with_auth_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; - args.environment_context = &environment_context; + args.max_parts = &max_parts; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22871,7 +24575,7 @@ void ThriftHiveMetastoreClient::send_drop_partition_by_name_with_environment_con oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name_with_environment_context() +void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -22891,20 +24595,20 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name_with_environment_con iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition_by_name_with_environment_context") != 0) { + if (fname.compare("get_partitions_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult result; + ThriftHiveMetastore_get_partitions_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -22912,24 +24616,24 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name_with_environment_con if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); } -void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_pargs args; + ThriftHiveMetastore_get_partition_names_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -22937,7 +24641,7 @@ void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) { int32_t rseqid = 0; @@ -22957,12 +24661,12 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition") != 0) { + if (fname.compare("get_partition_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_presult result; + ThriftHiveMetastore_get_partition_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -22972,32 +24676,28 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) // _return pointer has now been filled return; } - if (result.__isset.o1) { - throw result.o1; - } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); } -void ThriftHiveMetastoreClient::exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +void ThriftHiveMetastoreClient::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) { - send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - recv_exchange_partition(_return); + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); } -void ThriftHiveMetastoreClient::send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_exchange_partition_pargs args; - args.partitionSpecs = &partitionSpecs; - args.source_db = &source_db; - args.source_table_name = &source_table_name; - args.dest_db = &dest_db; - args.dest_table_name = &dest_table_name; + ThriftHiveMetastore_get_partitions_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23005,7 +24705,7 @@ void ThriftHiveMetastoreClient::send_exchange_partition(const std::mapgetTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_exchange_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) { int32_t rseqid = 0; @@ -23025,12 +24725,12 @@ void ThriftHiveMetastoreClient::recv_exchange_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("exchange_partition") != 0) { + if (fname.compare("get_partitions_ps") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_exchange_partition_presult result; + ThriftHiveMetastore_get_partitions_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -23046,30 +24746,25 @@ void ThriftHiveMetastoreClient::recv_exchange_partition(Partition& _return) if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::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) +void ThriftHiveMetastoreClient::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) { - send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); - recv_get_partition_with_auth(_return); + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + recv_get_partitions_ps_with_auth(_return); } -void ThriftHiveMetastoreClient::send_get_partition_with_auth(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) +void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(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) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_with_auth_pargs args; + ThriftHiveMetastore_get_partitions_ps_with_auth_pargs 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; args.write(oprot_); @@ -23079,7 +24774,7 @@ void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -23099,12 +24794,12 @@ void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_with_auth") != 0) { + if (fname.compare("get_partitions_ps_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_with_auth_presult result; + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -23120,24 +24815,25 @@ void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::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) { - send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return); + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return); } -void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_by_name_pargs args; + ThriftHiveMetastore_get_partition_names_ps_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_name = &part_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23145,7 +24841,7 @@ void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) { int32_t rseqid = 0; @@ -23165,12 +24861,12 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_by_name") != 0) { + if (fname.compare("get_partition_names_ps") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_by_name_presult result; + ThriftHiveMetastore_get_partition_names_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -23186,23 +24882,24 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::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) { - send_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return); + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return); } -void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_pargs args; + ThriftHiveMetastore_get_partitions_by_filter_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; + args.filter = &filter; args.max_parts = &max_parts; args.write(oprot_); @@ -23211,7 +24908,7 @@ void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -23231,12 +24928,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions") != 0) { + if (fname.compare("get_partitions_by_filter") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_presult result; + ThriftHiveMetastore_get_partitions_by_filter_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -23252,26 +24949,22 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); } -void ThriftHiveMetastoreClient::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) +void ThriftHiveMetastoreClient::get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) { - send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); - recv_get_partitions_with_auth(_return); + send_get_partitions_by_expr(req); + recv_get_partitions_by_expr(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_with_auth(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) +void ThriftHiveMetastoreClient::send_get_partitions_by_expr(const PartitionsByExprRequest& req) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_with_auth_pargs 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; + ThriftHiveMetastore_get_partitions_by_expr_pargs args; + args.req = &req; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23279,7 +24972,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_by_expr(PartitionsByExprResult& _return) { int32_t rseqid = 0; @@ -23299,12 +24992,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_with_auth") != 0) { + if (fname.compare("get_partitions_by_expr") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_with_auth_presult result; + ThriftHiveMetastore_get_partitions_by_expr_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -23320,24 +25013,24 @@ void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) { - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); + send_get_partitions_by_names(db_name, tbl_name, names); + recv_get_partitions_by_names(_return); } -void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_pargs args; + ThriftHiveMetastore_get_partitions_by_names_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_parts = &max_parts; + args.names = &names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23345,7 +25038,7 @@ void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_n oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return) { int32_t rseqid = 0; @@ -23365,12 +25058,12 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_names") != 0) { + if (fname.compare("get_partitions_by_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_names_presult result; + ThriftHiveMetastore_get_partitions_by_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -23380,28 +25073,30 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); } -void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_pargs args; + ThriftHiveMetastore_alter_partition_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23409,7 +25104,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_nam oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_partition() { int32_t rseqid = 0; @@ -23429,48 +25124,40 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_ps") != 0) { + if (fname.compare("alter_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_ps_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partition_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::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) +void ThriftHiveMetastoreClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { - send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); - recv_get_partitions_ps_with_auth(_return); + send_alter_partitions(db_name, tbl_name, new_parts); + recv_alter_partitions(); } -void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(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) +void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_with_auth_pargs args; + ThriftHiveMetastore_alter_partitions_pargs 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; + args.new_parts = &new_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23478,7 +25165,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::stri oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_partitions() { int32_t rseqid = 0; @@ -23498,46 +25185,41 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_ps_with_auth") != 0) { + if (fname.compare("alter_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partitions_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::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) +void ThriftHiveMetastoreClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return); + send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); + recv_alter_partition_with_environment_context(); } -void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_ps_pargs args; + ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; + args.new_part = &new_part; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23545,7 +25227,7 @@ void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& d oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() { int32_t rseqid = 0; @@ -23565,46 +25247,41 @@ void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_names_ps") != 0) { + if (fname.compare("alter_partition_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_names_ps_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partition_with_environment_context_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::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) +void ThriftHiveMetastoreClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); + send_rename_partition(db_name, tbl_name, part_vals, new_part); + recv_rename_partition(); } -void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_filter_pargs args; + ThriftHiveMetastore_rename_partition_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; + args.part_vals = &part_vals; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23612,7 +25289,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) +void ThriftHiveMetastoreClient::recv_rename_partition() { int32_t rseqid = 0; @@ -23632,43 +25309,39 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_by_filter") != 0) { + if (fname.compare("rename_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_by_filter_presult result; - result.success = &_return; + ThriftHiveMetastore_rename_partition_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) +bool ThriftHiveMetastoreClient::partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) { - send_get_partitions_by_expr(req); - recv_get_partitions_by_expr(_return); + send_partition_name_has_valid_characters(part_vals, throw_exception); + return recv_partition_name_has_valid_characters(); } -void ThriftHiveMetastoreClient::send_get_partitions_by_expr(const PartitionsByExprRequest& req) +void ThriftHiveMetastoreClient::send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_expr_pargs args; - args.req = &req; + ThriftHiveMetastore_partition_name_has_valid_characters_pargs args; + args.part_vals = &part_vals; + args.throw_exception = &throw_exception; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23676,7 +25349,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_by_expr(const PartitionsByEx oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_expr(PartitionsByExprResult& _return) +bool ThriftHiveMetastoreClient::recv_partition_name_has_valid_characters() { int32_t rseqid = 0; @@ -23696,45 +25369,41 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_expr(PartitionsByExprResu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_by_expr") != 0) { + if (fname.compare("partition_name_has_valid_characters") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_by_expr_presult result; + bool _return; + ThriftHiveMetastore_partition_name_has_valid_characters_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) +void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - send_get_partitions_by_names(db_name, tbl_name, names); - recv_get_partitions_by_names(_return); + send_get_config_value(name, defaultValue); + recv_get_config_value(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) +void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.names = &names; + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23742,7 +25411,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) { int32_t rseqid = 0; @@ -23762,12 +25431,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_by_names") != 0) { + if (fname.compare("get_config_value") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_by_names_presult result; + ThriftHiveMetastore_get_config_value_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -23780,27 +25449,22 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return, const std::string& part_name) { - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return); } -void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23808,7 +25472,7 @@ void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_partition() +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) { int32_t rseqid = 0; @@ -23828,40 +25492,40 @@ void ThriftHiveMetastoreClient::recv_alter_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_partition") != 0) { + if (fname.compare("partition_name_to_vals") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_partition_presult result; + ThriftHiveMetastore_partition_name_to_vals_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) { - send_alter_partitions(db_name, tbl_name, new_parts); - recv_alter_partitions(); + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); } -void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partitions_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_parts = &new_parts; + ThriftHiveMetastore_partition_name_to_spec_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23869,7 +25533,7 @@ void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_partitions() +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) { int32_t rseqid = 0; @@ -23889,41 +25553,43 @@ void ThriftHiveMetastoreClient::recv_alter_partitions() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_partitions") != 0) { + if (fname.compare("partition_name_to_spec") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_partitions_presult result; + ThriftHiveMetastore_partition_name_to_spec_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { - send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); - recv_alter_partition_with_environment_context(); + send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); + recv_markPartitionForEvent(); } -void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; + ThriftHiveMetastore_markPartitionForEvent_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_part = &new_part; - args.environment_context = &environment_context; + args.part_vals = &part_vals; + args.eventType = &eventType; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23931,7 +25597,7 @@ void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(co oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() +void ThriftHiveMetastoreClient::recv_markPartitionForEvent() { int32_t rseqid = 0; @@ -23951,12 +25617,12 @@ void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_partition_with_environment_context") != 0) { + if (fname.compare("markPartitionForEvent") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_partition_with_environment_context_presult result; + ThriftHiveMetastore_markPartitionForEvent_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -23967,25 +25633,37 @@ void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() if (result.__isset.o2) { throw result.o2; } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + if (result.__isset.o5) { + throw result.o5; + } + if (result.__isset.o6) { + throw result.o6; + } return; } -void ThriftHiveMetastoreClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +bool ThriftHiveMetastoreClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { - send_rename_partition(db_name, tbl_name, part_vals, new_part); - recv_rename_partition(); + send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); + return recv_isPartitionMarkedForEvent(); } -void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { int32_t cseqid = 0; - oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_rename_partition_pargs args; + ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_vals = &part_vals; - args.new_part = &new_part; + args.eventType = &eventType; args.write(oprot_); oprot_->writeMessageEnd(); @@ -23993,7 +25671,7 @@ void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_rename_partition() +bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() { int32_t rseqid = 0; @@ -24013,39 +25691,56 @@ void ThriftHiveMetastoreClient::recv_rename_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("rename_partition") != 0) { + if (fname.compare("isPartitionMarkedForEvent") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_rename_partition_presult result; + bool _return; + ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + if (result.__isset.o5) { + throw result.o5; + } + if (result.__isset.o6) { + throw result.o6; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); } -bool ThriftHiveMetastoreClient::partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) { - send_partition_name_has_valid_characters(part_vals, throw_exception); - return recv_partition_name_has_valid_characters(); + send_add_index(new_index, index_table); + recv_add_index(_return); } -void ThriftHiveMetastoreClient::send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_has_valid_characters_pargs args; - args.part_vals = &part_vals; - args.throw_exception = &throw_exception; + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24053,7 +25748,7 @@ void ThriftHiveMetastoreClient::send_partition_name_has_valid_characters(const s oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_partition_name_has_valid_characters() +void ThriftHiveMetastoreClient::recv_add_index(Index& _return) { int32_t rseqid = 0; @@ -24073,41 +25768,49 @@ bool ThriftHiveMetastoreClient::recv_partition_name_has_valid_characters() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("partition_name_has_valid_characters") != 0) { + if (fname.compare("add_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_partition_name_has_valid_characters_presult result; + ThriftHiveMetastore_add_index_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); } -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); } -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; + ThriftHiveMetastore_alter_index_pargs args; + args.dbname = &dbname; + args.base_tbl_name = &base_tbl_name; + args.idx_name = &idx_name; + args.new_idx = &new_idx; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24115,7 +25818,7 @@ void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) +void ThriftHiveMetastoreClient::recv_alter_index() { int32_t rseqid = 0; @@ -24135,40 +25838,41 @@ void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_config_value") != 0) { + if (fname.compare("alter_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_config_value_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_index_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + return; } -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); } -void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) +void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_drop_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24176,7 +25880,7 @@ void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& p oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() { int32_t rseqid = 0; @@ -24196,40 +25900,45 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("partition_name_to_vals") != 0) { + if (fname.compare("drop_index_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_partition_name_to_vals_presult result; + bool _return; + ThriftHiveMetastore_drop_index_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return); + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_return); } -void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_get_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24237,7 +25946,7 @@ void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& p oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) { int32_t rseqid = 0; @@ -24257,12 +25966,12 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::mapreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("partition_name_to_spec") != 0) { + if (fname.compare("get_index_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_partition_name_to_spec_presult result; + ThriftHiveMetastore_get_index_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -24275,25 +25984,27 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); - recv_markPartitionForEvent(); + send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_return); } -void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_markPartitionForEvent_pargs args; + ThriftHiveMetastore_get_indexes_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24301,7 +26012,7 @@ void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_markPartitionForEvent() +void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) { int32_t rseqid = 0; @@ -24321,53 +26032,45 @@ void ThriftHiveMetastoreClient::recv_markPartitionForEvent() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("markPartitionForEvent") != 0) { + if (fname.compare("get_indexes") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_markPartitionForEvent_presult result; + ThriftHiveMetastore_get_indexes_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - if (result.__isset.o5) { - throw result.o5; - } - if (result.__isset.o6) { - throw result.o6; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); } -bool ThriftHiveMetastoreClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - return recv_isPartitionMarkedForEvent(); + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return); } -void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; + ThriftHiveMetastore_get_index_names_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24375,7 +26078,7 @@ void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) { int32_t rseqid = 0; @@ -24395,56 +26098,40 @@ bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("isPartitionMarkedForEvent") != 0) { + if (fname.compare("get_index_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; + ThriftHiveMetastore_get_index_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; + // _return pointer has now been filled + return; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - if (result.__isset.o5) { - throw result.o5; - } - if (result.__isset.o6) { - throw result.o6; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); } -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +bool ThriftHiveMetastoreClient::update_table_column_statistics(const ColumnStatistics& stats_obj) { - send_add_index(new_index, index_table); - recv_add_index(_return); + send_update_table_column_statistics(stats_obj); + return recv_update_table_column_statistics(); } -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreClient::send_update_table_column_statistics(const ColumnStatistics& stats_obj) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; + ThriftHiveMetastore_update_table_column_statistics_pargs args; + args.stats_obj = &stats_obj; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24452,7 +26139,7 @@ void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Tab oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +bool ThriftHiveMetastoreClient::recv_update_table_column_statistics() { int32_t rseqid = 0; @@ -24472,20 +26159,20 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_index") != 0) { + if (fname.compare("update_table_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_index_presult result; + bool _return; + ThriftHiveMetastore_update_table_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -24496,25 +26183,25 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_table_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +bool ThriftHiveMetastoreClient::update_partition_column_statistics(const ColumnStatistics& stats_obj) { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); + send_update_partition_column_statistics(stats_obj); + return recv_update_partition_column_statistics(); } -void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +void ThriftHiveMetastoreClient::send_update_partition_column_statistics(const ColumnStatistics& stats_obj) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_index_pargs args; - args.dbname = &dbname; - args.base_tbl_name = &base_tbl_name; - args.idx_name = &idx_name; - args.new_idx = &new_idx; + ThriftHiveMetastore_update_partition_column_statistics_pargs args; + args.stats_obj = &stats_obj; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24522,7 +26209,7 @@ void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_index() +bool ThriftHiveMetastoreClient::recv_update_partition_column_statistics() { int32_t rseqid = 0; @@ -24542,41 +26229,51 @@ void ThriftHiveMetastoreClient::recv_alter_index() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_index") != 0) { + if (fname.compare("update_partition_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_index_presult result; + bool _return; + ThriftHiveMetastore_update_partition_column_statistics_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreClient::get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); + send_get_table_column_statistics(db_name, tbl_name, col_name); + recv_get_table_column_statistics(_return); } -void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_index_by_name_pargs args; + ThriftHiveMetastore_get_table_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.deleteData = &deleteData; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24584,7 +26281,7 @@ void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_na oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +void ThriftHiveMetastoreClient::recv_get_table_column_statistics(ColumnStatistics& _return) { int32_t rseqid = 0; @@ -24604,20 +26301,20 @@ bool ThriftHiveMetastoreClient::recv_drop_index_by_name() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_index_by_name") != 0) { + if (fname.compare("get_table_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; + ThriftHiveMetastore_get_table_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -24625,24 +26322,31 @@ bool ThriftHiveMetastoreClient::recv_drop_index_by_name() if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreClient::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) { - send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return); + send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); + recv_get_partition_column_statistics(_return); } -void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreClient::send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_index_by_name_pargs args; + ThriftHiveMetastore_get_partition_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.index_name = &index_name; + args.part_name = &part_name; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24650,7 +26354,7 @@ void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_nam oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) +void ThriftHiveMetastoreClient::recv_get_partition_column_statistics(ColumnStatistics& _return) { int32_t rseqid = 0; @@ -24670,12 +26374,12 @@ void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_index_by_name") != 0) { + if (fname.compare("get_partition_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_index_by_name_presult result; + ThriftHiveMetastore_get_partition_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -24691,24 +26395,31 @@ void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +bool ThriftHiveMetastoreClient::delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { - send_get_indexes(db_name, tbl_name, max_indexes); - recv_get_indexes(_return); + send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_delete_partition_column_statistics(); } -void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreClient::send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_indexes_pargs args; + ThriftHiveMetastore_delete_partition_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; + args.part_name = &part_name; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24716,7 +26427,7 @@ void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, con oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_delete_partition_column_statistics() { int32_t rseqid = 0; @@ -24736,20 +26447,20 @@ void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_indexes") != 0) { + if (fname.compare("delete_partition_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_indexes_presult result; + bool _return; + ThriftHiveMetastore_delete_partition_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -24757,24 +26468,30 @@ void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +bool ThriftHiveMetastoreClient::delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - send_get_index_names(db_name, tbl_name, max_indexes); - recv_get_index_names(_return); + send_delete_table_column_statistics(db_name, tbl_name, col_name); + return recv_delete_table_column_statistics(); } -void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreClient::send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_index_names_pargs args; + ThriftHiveMetastore_delete_table_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24782,7 +26499,7 @@ void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_delete_table_column_statistics() { int32_t rseqid = 0; @@ -24802,40 +26519,49 @@ void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_index_names") != 0) { + if (fname.compare("delete_table_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_index_names_presult result; + bool _return; + ThriftHiveMetastore_delete_table_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; + } + if (result.__isset.o1) { + throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); } -bool ThriftHiveMetastoreClient::update_table_column_statistics(const ColumnStatistics& stats_obj) +void ThriftHiveMetastoreClient::create_function(const Function& func) { - send_update_table_column_statistics(stats_obj); - return recv_update_table_column_statistics(); + send_create_function(func); + recv_create_function(); } -void ThriftHiveMetastoreClient::send_update_table_column_statistics(const ColumnStatistics& stats_obj) +void ThriftHiveMetastoreClient::send_create_function(const Function& func) { int32_t cseqid = 0; - oprot_->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_function", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_update_table_column_statistics_pargs args; - args.stats_obj = &stats_obj; + ThriftHiveMetastore_create_function_pargs args; + args.func = &func; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24843,7 +26569,7 @@ void ThriftHiveMetastoreClient::send_update_table_column_statistics(const Column oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_update_table_column_statistics() +void ThriftHiveMetastoreClient::recv_create_function() { int32_t rseqid = 0; @@ -24863,21 +26589,16 @@ bool ThriftHiveMetastoreClient::recv_update_table_column_statistics() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("update_table_column_statistics") != 0) { + if (fname.compare("create_function") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_update_table_column_statistics_presult result; - result.success = &_return; + ThriftHiveMetastore_create_function_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } if (result.__isset.o1) { throw result.o1; } @@ -24890,22 +26611,23 @@ bool ThriftHiveMetastoreClient::recv_update_table_column_statistics() if (result.__isset.o4) { throw result.o4; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_table_column_statistics failed: unknown result"); + return; } -bool ThriftHiveMetastoreClient::update_partition_column_statistics(const ColumnStatistics& stats_obj) +void ThriftHiveMetastoreClient::drop_function(const std::string& dbName, const std::string& funcName) { - send_update_partition_column_statistics(stats_obj); - return recv_update_partition_column_statistics(); + send_drop_function(dbName, funcName); + recv_drop_function(); } -void ThriftHiveMetastoreClient::send_update_partition_column_statistics(const ColumnStatistics& stats_obj) +void ThriftHiveMetastoreClient::send_drop_function(const std::string& dbName, const std::string& funcName) { int32_t cseqid = 0; - oprot_->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_update_partition_column_statistics_pargs args; - args.stats_obj = &stats_obj; + ThriftHiveMetastore_drop_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24913,7 +26635,7 @@ void ThriftHiveMetastoreClient::send_update_partition_column_statistics(const Co oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_update_partition_column_statistics() +void ThriftHiveMetastoreClient::recv_drop_function() { int32_t rseqid = 0; @@ -24933,51 +26655,40 @@ bool ThriftHiveMetastoreClient::recv_update_partition_column_statistics() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("update_partition_column_statistics") != 0) { + if (fname.compare("drop_function") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_update_partition_column_statistics_presult result; - result.success = &_return; + ThriftHiveMetastore_drop_function_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } if (result.__isset.o3) { throw result.o3; } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +void ThriftHiveMetastoreClient::alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { - send_get_table_column_statistics(db_name, tbl_name, col_name); - recv_get_table_column_statistics(_return); + send_alter_function(dbName, funcName, newFunc); + recv_alter_function(); } -void ThriftHiveMetastoreClient::send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +void ThriftHiveMetastoreClient::send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.col_name = &col_name; + ThriftHiveMetastore_alter_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; + args.newFunc = &newFunc; args.write(oprot_); oprot_->writeMessageEnd(); @@ -24985,7 +26696,7 @@ void ThriftHiveMetastoreClient::send_get_table_column_statistics(const std::stri oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_table_column_statistics(ColumnStatistics& _return) +void ThriftHiveMetastoreClient::recv_alter_function() { int32_t rseqid = 0; @@ -25005,52 +26716,39 @@ void ThriftHiveMetastoreClient::recv_get_table_column_statistics(ColumnStatistic iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table_column_statistics") != 0) { + if (fname.compare("alter_function") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_column_statistics_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_function_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_column_statistics failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::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) +void ThriftHiveMetastoreClient::get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) { - send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); - recv_get_partition_column_statistics(_return); + send_get_functions(dbName, pattern); + recv_get_functions(_return); } -void ThriftHiveMetastoreClient::send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +void ThriftHiveMetastoreClient::send_get_functions(const std::string& dbName, const std::string& pattern) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.col_name = &col_name; + ThriftHiveMetastore_get_functions_pargs args; + args.dbName = &dbName; + args.pattern = &pattern; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25058,7 +26756,7 @@ void ThriftHiveMetastoreClient::send_get_partition_column_statistics(const std:: oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_column_statistics(ColumnStatistics& _return) +void ThriftHiveMetastoreClient::recv_get_functions(std::vector & _return) { int32_t rseqid = 0; @@ -25078,12 +26776,12 @@ void ThriftHiveMetastoreClient::recv_get_partition_column_statistics(ColumnStati iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_column_statistics") != 0) { + if (fname.compare("get_functions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_column_statistics_presult result; + ThriftHiveMetastore_get_functions_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -25096,34 +26794,22 @@ void ThriftHiveMetastoreClient::recv_get_partition_column_statistics(ColumnStati if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_functions failed: unknown result"); } -bool ThriftHiveMetastoreClient::delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +void ThriftHiveMetastoreClient::get_all_functions(std::vector & _return, const std::string& dbName) { - send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - return recv_delete_partition_column_statistics(); + send_get_all_functions(dbName); + recv_get_all_functions(_return); } -void ThriftHiveMetastoreClient::send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +void ThriftHiveMetastoreClient::send_get_all_functions(const std::string& dbName) { int32_t cseqid = 0; - oprot_->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_delete_partition_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.col_name = &col_name; + ThriftHiveMetastore_get_all_functions_pargs args; + args.dbName = &dbName; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25131,7 +26817,7 @@ void ThriftHiveMetastoreClient::send_delete_partition_column_statistics(const st oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_delete_partition_column_statistics() +void ThriftHiveMetastoreClient::recv_get_all_functions(std::vector & _return) { int32_t rseqid = 0; @@ -25151,51 +26837,41 @@ bool ThriftHiveMetastoreClient::recv_delete_partition_column_statistics() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("delete_partition_column_statistics") != 0) { + if (fname.compare("get_all_functions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_delete_partition_column_statistics_presult result; + ThriftHiveMetastore_get_all_functions_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_functions failed: unknown result"); } -bool ThriftHiveMetastoreClient::delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +void ThriftHiveMetastoreClient::get_function(Function& _return, const std::string& dbName, const std::string& funcName) { - send_delete_table_column_statistics(db_name, tbl_name, col_name); - return recv_delete_table_column_statistics(); + send_get_function(dbName, funcName); + recv_get_function(_return); } -void ThriftHiveMetastoreClient::send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +void ThriftHiveMetastoreClient::send_get_function(const std::string& dbName, const std::string& funcName) { int32_t cseqid = 0; - oprot_->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_function", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_delete_table_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.col_name = &col_name; + ThriftHiveMetastore_get_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25203,7 +26879,7 @@ void ThriftHiveMetastoreClient::send_delete_table_column_statistics(const std::s oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_delete_table_column_statistics() +void ThriftHiveMetastoreClient::recv_get_function(Function& _return) { int32_t rseqid = 0; @@ -25223,20 +26899,20 @@ bool ThriftHiveMetastoreClient::recv_delete_table_column_statistics() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("delete_table_column_statistics") != 0) { + if (fname.compare("get_function") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_delete_table_column_statistics_presult result; + ThriftHiveMetastore_get_function_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -25244,13 +26920,7 @@ bool ThriftHiveMetastoreClient::recv_delete_table_column_statistics() if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_function failed: unknown result"); } bool ThriftHiveMetastoreClient::create_role(const Role& role) @@ -25623,24 +27293,209 @@ void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return) if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +{ + send_get_privilege_set(hiveObject, user_name, group_names); + recv_get_privilege_set(_return); +} + +void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_privilege_set_pargs args; + args.hiveObject = &hiveObject; + args.user_name = &user_name; + args.group_names = &group_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_privilege_set") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_privilege_set_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result"); +} + +void ThriftHiveMetastoreClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +{ + send_list_privileges(principal_name, principal_type, hiveObject); + recv_list_privileges(_return); +} + +void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_list_privileges_pargs args; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.hiveObject = &hiveObject; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_list_privileges(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("list_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_list_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_privileges failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::grant_privileges(const PrivilegeBag& privileges) +{ + send_grant_privileges(privileges); + return recv_grant_privileges(); +} + +void ThriftHiveMetastoreClient::send_grant_privileges(const PrivilegeBag& privileges) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_privileges_pargs args; + args.privileges = &privileges; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_grant_privileges() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_grant_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +bool ThriftHiveMetastoreClient::revoke_privileges(const PrivilegeBag& privileges) { - send_get_privilege_set(hiveObject, user_name, group_names); - recv_get_privilege_set(_return); + send_revoke_privileges(privileges); + return recv_revoke_privileges(); } -void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privileges) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_privilege_set_pargs args; - args.hiveObject = &hiveObject; - args.user_name = &user_name; - args.group_names = &group_names; + ThriftHiveMetastore_revoke_privileges_pargs args; + args.privileges = &privileges; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25648,7 +27503,7 @@ void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hive oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return) +bool ThriftHiveMetastoreClient::recv_revoke_privileges() { int32_t rseqid = 0; @@ -25668,42 +27523,41 @@ void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _r iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_privilege_set") != 0) { + if (fname.compare("revoke_privileges") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_privilege_set_presult result; + bool _return; + ThriftHiveMetastore_revoke_privileges_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +void ThriftHiveMetastoreClient::set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { - send_list_privileges(principal_name, principal_type, hiveObject); - recv_list_privileges(_return); + send_set_ugi(user_name, group_names); + recv_set_ugi(_return); } -void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +void ThriftHiveMetastoreClient::send_set_ugi(const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_list_privileges_pargs args; - args.principal_name = &principal_name; - args.principal_type = &principal_type; - args.hiveObject = &hiveObject; + ThriftHiveMetastore_set_ugi_pargs args; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25711,7 +27565,7 @@ void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principa oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_list_privileges(std::vector & _return) +void ThriftHiveMetastoreClient::recv_set_ugi(std::vector & _return) { int32_t rseqid = 0; @@ -25731,12 +27585,12 @@ void ThriftHiveMetastoreClient::recv_list_privileges(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("list_privileges") != 0) { + if (fname.compare("set_ugi") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_list_privileges_presult result; + ThriftHiveMetastore_set_ugi_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -25749,22 +27603,23 @@ void ThriftHiveMetastoreClient::recv_list_privileges(std::vectorwriteMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_grant_privileges_pargs args; - args.privileges = &privileges; + ThriftHiveMetastore_get_delegation_token_pargs args; + args.token_owner = &token_owner; + args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25772,7 +27627,7 @@ void ThriftHiveMetastoreClient::send_grant_privileges(const PrivilegeBag& privil oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_grant_privileges() +void ThriftHiveMetastoreClient::recv_get_delegation_token(std::string& _return) { int32_t rseqid = 0; @@ -25792,40 +27647,40 @@ bool ThriftHiveMetastoreClient::recv_grant_privileges() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("grant_privileges") != 0) { + if (fname.compare("get_delegation_token") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_grant_privileges_presult result; + ThriftHiveMetastore_get_delegation_token_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); } -bool ThriftHiveMetastoreClient::revoke_privileges(const PrivilegeBag& privileges) +int64_t ThriftHiveMetastoreClient::renew_delegation_token(const std::string& token_str_form) { - send_revoke_privileges(privileges); - return recv_revoke_privileges(); + send_renew_delegation_token(token_str_form); + return recv_renew_delegation_token(); } -void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privileges) +void ThriftHiveMetastoreClient::send_renew_delegation_token(const std::string& token_str_form) { int32_t cseqid = 0; - oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_revoke_privileges_pargs args; - args.privileges = &privileges; + ThriftHiveMetastore_renew_delegation_token_pargs args; + args.token_str_form = &token_str_form; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25833,7 +27688,7 @@ void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privi oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_revoke_privileges() +int64_t ThriftHiveMetastoreClient::recv_renew_delegation_token() { int32_t rseqid = 0; @@ -25853,13 +27708,13 @@ bool ThriftHiveMetastoreClient::recv_revoke_privileges() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("revoke_privileges") != 0) { + if (fname.compare("renew_delegation_token") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_revoke_privileges_presult result; + int64_t _return; + ThriftHiveMetastore_renew_delegation_token_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -25871,23 +27726,22 @@ bool ThriftHiveMetastoreClient::recv_revoke_privileges() if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); } -void ThriftHiveMetastoreClient::set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::cancel_delegation_token(const std::string& token_str_form) { - send_set_ugi(user_name, group_names); - recv_set_ugi(_return); + send_cancel_delegation_token(token_str_form); + recv_cancel_delegation_token(); } -void ThriftHiveMetastoreClient::send_set_ugi(const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::send_cancel_delegation_token(const std::string& token_str_form) { int32_t cseqid = 0; - oprot_->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_set_ugi_pargs args; - args.user_name = &user_name; - args.group_names = &group_names; + ThriftHiveMetastore_cancel_delegation_token_pargs args; + args.token_str_form = &token_str_form; args.write(oprot_); oprot_->writeMessageEnd(); @@ -25895,7 +27749,7 @@ void ThriftHiveMetastoreClient::send_set_ugi(const std::string& user_name, const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_set_ugi(std::vector & _return) +void ThriftHiveMetastoreClient::recv_cancel_delegation_token() { int32_t rseqid = 0; @@ -25915,256 +27769,367 @@ void ThriftHiveMetastoreClient::recv_set_ugi(std::vector & _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("set_ugi") != 0) { + if (fname.compare("cancel_delegation_token") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_set_ugi_presult result; - result.success = &_return; + ThriftHiveMetastore_cancel_delegation_token_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_ugi failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) +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::dispatchCall(iprot, oprot, fname, seqid, callContext); + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - send_get_delegation_token(token_owner, renewer_kerberos_principal_name); - recv_get_delegation_token(_return); + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); + } + + ThriftHiveMetastore_create_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); + } + + ThriftHiveMetastore_create_database_result result; + try { + iface_->create_database(args.database); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); + } + + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); + } } -void ThriftHiveMetastoreClient::send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name) +void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); + } + + ThriftHiveMetastore_get_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); + } + + ThriftHiveMetastore_get_database_result result; + try { + iface_->get_database(result.success, args.name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); + } - ThriftHiveMetastore_get_delegation_token_pargs args; - args.token_owner = &token_owner; - args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name; - args.write(oprot_); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); + } } -void ThriftHiveMetastoreClient::recv_get_delegation_token(std::string& _return) +void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); } - if (fname.compare("get_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); } - ThriftHiveMetastore_get_delegation_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + ThriftHiveMetastore_drop_database_result result; + try { + iface_->drop_database(args.name, args.deleteData, args.cascade); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); return; } - if (result.__isset.o1) { - throw result.o1; + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); -} -int64_t ThriftHiveMetastoreClient::renew_delegation_token(const std::string& token_str_form) -{ - send_renew_delegation_token(token_str_form); - return recv_renew_delegation_token(); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); + } } -void ThriftHiveMetastoreClient::send_renew_delegation_token(const std::string& token_str_form) +void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); - ThriftHiveMetastore_renew_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} + ThriftHiveMetastore_get_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); -int64_t ThriftHiveMetastoreClient::recv_renew_delegation_token() -{ + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); + } - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_get_databases_result result; + try { + iface_->get_databases(result.success, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); + } - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("renew_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; } - int64_t _return; - ThriftHiveMetastore_renew_delegation_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); -} -void ThriftHiveMetastoreClient::cancel_delegation_token(const std::string& token_str_form) -{ - send_cancel_delegation_token(token_str_form); - recv_cancel_delegation_token(); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); + } } -void ThriftHiveMetastoreClient::send_cancel_delegation_token(const std::string& token_str_form) +void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); - ThriftHiveMetastore_cancel_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} + ThriftHiveMetastore_get_all_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); -void ThriftHiveMetastoreClient::recv_cancel_delegation_token() -{ + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + } - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_get_all_databases_result result; + try { + iface_->get_all_databases(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); + } - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("cancel_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; } - ThriftHiveMetastore_cancel_delegation_token_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.o1) { - throw result.o1; + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); } - return; -} -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::dispatchCall(iprot, oprot, fname, seqid, callContext); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); } - (this->*(pfn->second))(seqid, iprot, oprot, callContext); - return true; } -void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); } - ThriftHiveMetastore_create_database_args args; + ThriftHiveMetastore_alter_database_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); } - ThriftHiveMetastore_create_database_result result; + ThriftHiveMetastore_alter_database_result result; try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { + iface_->alter_database(args.dbname, args.db); + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26173,58 +28138,58 @@ void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apac } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); } - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); } - ThriftHiveMetastore_get_database_args args; + ThriftHiveMetastore_get_type_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); } - ThriftHiveMetastore_get_database_result result; + ThriftHiveMetastore_get_type_result result; try { - iface_->get_database(result.success, args.name); + iface_->get_type(result.success, args.name); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26233,48 +28198,49 @@ void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); } - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); } - ThriftHiveMetastore_drop_database_args args; + ThriftHiveMetastore_create_type_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); } - ThriftHiveMetastore_drop_database_result result; + ThriftHiveMetastore_create_type_result result; try { - iface_->drop_database(args.name, args.deleteData, args.cascade); - } catch (NoSuchObjectException &o1) { + result.success = iface_->create_type(args.type); + result.__isset.success = true; + } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (MetaException &o3) { @@ -26282,11 +28248,11 @@ void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26295,55 +28261,58 @@ void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); } - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); } - ThriftHiveMetastore_get_databases_args args; + ThriftHiveMetastore_drop_type_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); } - ThriftHiveMetastore_get_databases_result result; + ThriftHiveMetastore_drop_type_result result; try { - iface_->get_databases(result.success, args.pattern); + result.success = iface_->drop_type(args.type); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26352,55 +28321,118 @@ void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); } - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); } - ThriftHiveMetastore_get_all_databases_args args; + ThriftHiveMetastore_get_type_all_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); } - ThriftHiveMetastore_get_all_databases_result result; + ThriftHiveMetastore_get_type_all_result result; try { - iface_->get_all_databases(result.success); + iface_->get_type_all(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); + } + + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); + } + + ThriftHiveMetastore_get_fields_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); + } + + ThriftHiveMetastore_get_fields_result result; + try { + iface_->get_fields(result.success, args.db_name, args.table_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26409,57 +28441,61 @@ void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::ap } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); } - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); } - ThriftHiveMetastore_alter_database_args args; + ThriftHiveMetastore_get_schema_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); } - ThriftHiveMetastore_alter_database_result result; + ThriftHiveMetastore_get_schema_result result; try { - iface_->alter_database(args.dbname, args.db); + iface_->get_schema(result.success, args.db_name, args.table_name); + result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (UnknownTableException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26468,58 +28504,63 @@ void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apach } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); } - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); } - ThriftHiveMetastore_get_type_args args; + ThriftHiveMetastore_create_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); } - ThriftHiveMetastore_get_type_result result; + ThriftHiveMetastore_create_table_result result; try { - iface_->get_type(result.success, args.name); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->create_table(args.tbl); + } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26528,45 +28569,44 @@ void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thr } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); } - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); } } -void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } - ThriftHiveMetastore_create_type_args args; + ThriftHiveMetastore_create_table_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } - ThriftHiveMetastore_create_type_result result; + ThriftHiveMetastore_create_table_with_environment_context_result result; try { - result.success = iface_->create_type(args.type); - result.__isset.success = true; + iface_->create_table_with_environment_context(args.tbl, args.environment_context); } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; @@ -26576,13 +28616,16 @@ void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache:: } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26591,58 +28634,57 @@ void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache:: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); } - ThriftHiveMetastore_drop_type_args args; + ThriftHiveMetastore_drop_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); } - ThriftHiveMetastore_drop_type_result result; + ThriftHiveMetastore_drop_table_result result; try { - result.success = iface_->drop_type(args.type); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26651,55 +28693,57 @@ void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::th } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); } - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); } - ThriftHiveMetastore_get_type_all_args args; + ThriftHiveMetastore_drop_table_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); } - ThriftHiveMetastore_get_type_all_result result; + ThriftHiveMetastore_drop_table_with_environment_context_result result; try { - iface_->get_type_all(result.success, args.name); - result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + iface_->drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26708,61 +28752,55 @@ void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); } - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type_all", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); } - ThriftHiveMetastore_get_fields_args args; + ThriftHiveMetastore_get_tables_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); } - ThriftHiveMetastore_get_fields_result result; + ThriftHiveMetastore_get_tables_result result; try { - iface_->get_fields(result.success, args.db_name, args.table_name); + iface_->get_tables(result.success, args.db_name, args.pattern); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26771,61 +28809,55 @@ void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::t } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); } - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); } - ThriftHiveMetastore_get_schema_args args; + ThriftHiveMetastore_get_all_tables_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } - ThriftHiveMetastore_get_schema_result result; + ThriftHiveMetastore_get_all_tables_result result; try { - iface_->get_schema(result.success, args.db_name, args.table_name); + iface_->get_all_tables(result.success, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26834,63 +28866,58 @@ void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::t } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); } - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } } -void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); } - ThriftHiveMetastore_create_table_args args; + ThriftHiveMetastore_get_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); } - ThriftHiveMetastore_create_table_result result; + ThriftHiveMetastore_get_table_result result; try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &o1) { + iface_->get_table(result.success, args.dbname, args.tbl_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26899,63 +28926,61 @@ void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); } - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_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 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } - ThriftHiveMetastore_create_table_with_environment_context_args args; + ThriftHiveMetastore_get_table_objects_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } - ThriftHiveMetastore_create_table_with_environment_context_result result; + ThriftHiveMetastore_get_table_objects_by_name_result result; try { - iface_->create_table_with_environment_context(args.tbl, args.environment_context); - } catch (AlreadyExistsException &o1) { + iface_->get_table_objects_by_name(result.success, args.dbname, args.tbl_names); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (InvalidOperationException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { + } catch (UnknownDBException &o3) { result.o3 = o3; result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -26964,57 +28989,61 @@ void ThriftHiveMetastoreProcessor::process_create_table_with_environment_context } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } - oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } - ThriftHiveMetastore_drop_table_args args; + ThriftHiveMetastore_get_table_names_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } - ThriftHiveMetastore_drop_table_result result; + ThriftHiveMetastore_get_table_names_by_filter_result result; try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->get_table_names_by_filter(result.success, args.dbname, args.filter, args.max_tables); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o3) { + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27023,57 +29052,57 @@ void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::t } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); } - ThriftHiveMetastore_drop_table_with_environment_context_args args; + ThriftHiveMetastore_alter_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); } - ThriftHiveMetastore_drop_table_with_environment_context_result result; + ThriftHiveMetastore_alter_table_result result; try { - iface_->drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context); - } catch (NoSuchObjectException &o1) { + iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27082,55 +29111,57 @@ void ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context(i } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); } - oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } - ThriftHiveMetastore_get_tables_args args; + ThriftHiveMetastore_alter_table_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } - ThriftHiveMetastore_get_tables_result result; + ThriftHiveMetastore_alter_table_with_environment_context_result result; try { - iface_->get_tables(result.success, args.db_name, args.pattern); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27139,55 +29170,61 @@ void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::t } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); } - ThriftHiveMetastore_get_all_tables_args args; + ThriftHiveMetastore_add_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); } - ThriftHiveMetastore_get_all_tables_result result; + ThriftHiveMetastore_add_partition_result result; try { - iface_->get_all_tables(result.success, args.db_name); + iface_->add_partition(result.success, args.new_part); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27196,58 +29233,61 @@ void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apach } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); } - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } - ThriftHiveMetastore_get_table_args args; + ThriftHiveMetastore_add_partition_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); } - ThriftHiveMetastore_get_table_result result; + ThriftHiveMetastore_add_partition_with_environment_context_result result; try { - iface_->get_table(result.success, args.dbname, args.tbl_name); + iface_->add_partition_with_environment_context(result.success, args.new_part, args.environment_context); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27256,61 +29296,61 @@ void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::th } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", 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 ThriftHiveMetastoreProcessor::process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); } - ThriftHiveMetastore_get_table_objects_by_name_args args; + ThriftHiveMetastore_add_partitions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); } - ThriftHiveMetastore_get_table_objects_by_name_result result; + ThriftHiveMetastore_add_partitions_result result; try { - iface_->get_table_objects_by_name(result.success, args.dbname, args.tbl_names); + result.success = iface_->add_partitions(args.new_parts); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { + } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27319,61 +29359,61 @@ void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name(int32_t seq } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); } - oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", 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 ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); } - ThriftHiveMetastore_get_table_names_by_filter_args args; + ThriftHiveMetastore_append_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); } - ThriftHiveMetastore_get_table_names_by_filter_result result; + ThriftHiveMetastore_append_partition_result result; try { - iface_->get_table_names_by_filter(result.success, args.dbname, args.filter, args.max_tables); + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { + } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27382,57 +29422,61 @@ void ThriftHiveMetastoreProcessor::process_get_table_names_by_filter(int32_t seq } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); } - oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_add_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions_req", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions_req"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions_req"); } - ThriftHiveMetastore_alter_table_args args; + ThriftHiveMetastore_add_partitions_req_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions_req", bytes); } - ThriftHiveMetastore_alter_table_result result; + ThriftHiveMetastore_add_partitions_req_result result; try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException &o1) { + iface_->add_partitions_req(result.success, args.request); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions_req"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27441,57 +29485,61 @@ void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache:: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions_req"); } - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions_req", 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 ThriftHiveMetastoreProcessor::process_append_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); } - ThriftHiveMetastore_alter_table_with_environment_context_args args; + ThriftHiveMetastore_append_partition_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context", bytes); } - ThriftHiveMetastore_alter_table_with_environment_context_result result; + ThriftHiveMetastore_append_partition_with_environment_context_result result; try { - iface_->alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); - } catch (InvalidOperationException &o1) { + iface_->append_partition_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_vals, args.environment_context); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27500,44 +29548,44 @@ void ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context( } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); } - oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_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 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); } - ThriftHiveMetastore_add_partition_args args; + ThriftHiveMetastore_append_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); } - ThriftHiveMetastore_add_partition_result result; + ThriftHiveMetastore_append_partition_by_name_result result; try { - iface_->add_partition(result.success, args.new_part); + iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); result.__isset.success = true; } catch (InvalidObjectException &o1) { result.o1 = o1; @@ -27550,11 +29598,11 @@ void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27563,44 +29611,44 @@ void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); } - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", 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 ThriftHiveMetastoreProcessor::process_append_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); } - ThriftHiveMetastore_add_partition_with_environment_context_args args; + ThriftHiveMetastore_append_partition_by_name_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context", bytes); } - ThriftHiveMetastore_add_partition_with_environment_context_result result; + ThriftHiveMetastore_append_partition_by_name_with_environment_context_result result; try { - iface_->add_partition_with_environment_context(result.success, args.new_part, args.environment_context); + iface_->append_partition_by_name_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_name, args.environment_context); result.__isset.success = true; } catch (InvalidObjectException &o1) { result.o1 = o1; @@ -27613,11 +29661,11 @@ void ThriftHiveMetastoreProcessor::process_add_partition_with_environment_contex result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27626,61 +29674,58 @@ void ThriftHiveMetastoreProcessor::process_add_partition_with_environment_contex } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); } - oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_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 ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); } - ThriftHiveMetastore_add_partitions_args args; + ThriftHiveMetastore_drop_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); } - ThriftHiveMetastore_add_partitions_result result; + ThriftHiveMetastore_drop_partition_result result; try { - result.success = iface_->add_partitions(args.new_parts); + result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27689,61 +29734,58 @@ void ThriftHiveMetastoreProcessor::process_add_partitions(int32_t seqid, ::apach } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); } - oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); } - ThriftHiveMetastore_append_partition_args args; + ThriftHiveMetastore_drop_partition_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", bytes); } - ThriftHiveMetastore_append_partition_result result; + ThriftHiveMetastore_drop_partition_with_environment_context_result result; try { - iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + result.success = iface_->drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27752,61 +29794,58 @@ void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apa } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); } - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_add_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions_req", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions_req"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions_req"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } - ThriftHiveMetastore_add_partitions_req_args args; + ThriftHiveMetastore_drop_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions_req", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } - ThriftHiveMetastore_add_partitions_req_result result; + ThriftHiveMetastore_drop_partition_by_name_result result; try { - iface_->add_partitions_req(result.success, args.request); + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions_req"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27815,61 +29854,58 @@ void ThriftHiveMetastoreProcessor::process_add_partitions_req(int32_t seqid, ::a } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions_req"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } - oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions_req", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_append_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); } - ThriftHiveMetastore_append_partition_with_environment_context_args args; + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); } - ThriftHiveMetastore_append_partition_with_environment_context_result result; + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result result; try { - iface_->append_partition_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_vals, args.environment_context); + result.success = iface_->drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; + result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27878,61 +29914,58 @@ void ThriftHiveMetastoreProcessor::process_append_partition_with_environment_con } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); } - oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); } - ThriftHiveMetastore_append_partition_by_name_args args; + ThriftHiveMetastore_get_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); } - ThriftHiveMetastore_append_partition_by_name_result result; + ThriftHiveMetastore_get_partition_result result; try { - iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -27941,61 +29974,64 @@ void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqi } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); } - oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_append_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_exchange_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.exchange_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.exchange_partition"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.exchange_partition"); } - ThriftHiveMetastore_append_partition_by_name_with_environment_context_args args; + ThriftHiveMetastore_exchange_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.exchange_partition", bytes); } - ThriftHiveMetastore_append_partition_by_name_with_environment_context_result result; + ThriftHiveMetastore_exchange_partition_result result; try { - iface_->append_partition_by_name_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_name, args.environment_context); + iface_->exchange_partition(result.success, args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { + } catch (InvalidObjectException &o3) { result.o3 = o3; result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.exchange_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28004,58 +30040,58 @@ void ThriftHiveMetastoreProcessor::process_append_partition_by_name_with_environ } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.exchange_partition"); } - oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.exchange_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } - ThriftHiveMetastore_drop_partition_args args; + ThriftHiveMetastore_get_partition_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } - ThriftHiveMetastore_drop_partition_result result; + ThriftHiveMetastore_get_partition_with_auth_result result; try { - result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28064,58 +30100,58 @@ void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apach } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); } - ThriftHiveMetastore_drop_partition_with_environment_context_args args; + ThriftHiveMetastore_get_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } - ThriftHiveMetastore_drop_partition_with_environment_context_result result; + ThriftHiveMetastore_get_partition_by_name_result result; try { - result.success = iface_->drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context); + iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28124,44 +30160,44 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_with_environment_conte } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); } - oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); } - ThriftHiveMetastore_drop_partition_by_name_args args; + ThriftHiveMetastore_get_partitions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); } - ThriftHiveMetastore_drop_partition_by_name_result result; + ThriftHiveMetastore_get_partitions_result result; try { - result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; } catch (NoSuchObjectException &o1) { result.o1 = o1; @@ -28171,11 +30207,11 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28184,44 +30220,44 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); } - oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args args; + ThriftHiveMetastore_get_partitions_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result result; + ThriftHiveMetastore_get_partitions_with_auth_result result; try { - result.success = iface_->drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context); + iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; } catch (NoSuchObjectException &o1) { result.o1 = o1; @@ -28231,11 +30267,11 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environme result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28244,58 +30280,55 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environme } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } - oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); } - ThriftHiveMetastore_get_partition_args args; + ThriftHiveMetastore_get_partition_names_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } - ThriftHiveMetastore_get_partition_result result; + ThriftHiveMetastore_get_partition_names_result result; try { - iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28304,44 +30337,44 @@ void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); } - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } } -void ThriftHiveMetastoreProcessor::process_exchange_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.exchange_partition", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.exchange_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.exchange_partition"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); } - ThriftHiveMetastore_exchange_partition_args args; + ThriftHiveMetastore_get_partitions_ps_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.exchange_partition", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } - ThriftHiveMetastore_exchange_partition_result result; + ThriftHiveMetastore_get_partitions_ps_result result; try { - iface_->exchange_partition(result.success, args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); + iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; @@ -28349,19 +30382,13 @@ void ThriftHiveMetastoreProcessor::process_exchange_partition(int32_t seqid, ::a } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (InvalidObjectException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.exchange_partition"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28370,58 +30397,58 @@ void ThriftHiveMetastoreProcessor::process_exchange_partition(int32_t seqid, ::a } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.exchange_partition"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); } - oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.exchange_partition", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } - ThriftHiveMetastore_get_partition_with_auth_args args; + ThriftHiveMetastore_get_partitions_ps_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); } - ThriftHiveMetastore_get_partition_with_auth_result result; + ThriftHiveMetastore_get_partitions_ps_with_auth_result result; try { - iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); + iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28430,44 +30457,44 @@ void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } - oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_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 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } - ThriftHiveMetastore_get_partition_by_name_args args; + ThriftHiveMetastore_get_partition_names_ps_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } - ThriftHiveMetastore_get_partition_by_name_result result; + ThriftHiveMetastore_get_partition_names_ps_result result; try { - iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; @@ -28477,11 +30504,11 @@ void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28490,58 +30517,58 @@ void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } - oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } - ThriftHiveMetastore_get_partitions_args args; + ThriftHiveMetastore_get_partitions_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } - ThriftHiveMetastore_get_partitions_result result; + ThriftHiveMetastore_get_partitions_by_filter_result result; try { - iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28550,58 +30577,58 @@ void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apach } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_expr", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_expr"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); } - ThriftHiveMetastore_get_partitions_with_auth_args args; + ThriftHiveMetastore_get_partitions_by_expr_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); } - ThriftHiveMetastore_get_partitions_with_auth_result result; + ThriftHiveMetastore_get_partitions_by_expr_result result; try { - iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); + iface_->get_partitions_by_expr(result.success, args.req); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28610,55 +30637,58 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqi } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); } - oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } - ThriftHiveMetastore_get_partition_names_args args; + ThriftHiveMetastore_get_partitions_by_names_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } - ThriftHiveMetastore_get_partition_names_result result; + ThriftHiveMetastore_get_partitions_by_names_result result; try { - iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->get_partitions_by_names(result.success, args.db_name, args.tbl_name, args.names); result.__isset.success = true; - } catch (MetaException &o2) { + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28667,58 +30697,57 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, :: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); } - ThriftHiveMetastore_get_partitions_ps_args args; + ThriftHiveMetastore_alter_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); } - ThriftHiveMetastore_get_partitions_ps_result result; + ThriftHiveMetastore_alter_partition_result result; try { - iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28727,46 +30756,45 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::ap } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); } - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", 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 ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); } - ThriftHiveMetastore_get_partitions_ps_with_auth_args args; + ThriftHiveMetastore_alter_partitions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } - ThriftHiveMetastore_get_partitions_ps_with_auth_result result; + ThriftHiveMetastore_alter_partitions_result result; try { - iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + iface_->alter_partitions(args.db_name, args.tbl_name, args.new_parts); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (MetaException &o2) { @@ -28774,11 +30802,11 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t s result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28787,58 +30815,57 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t s } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); } - oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } - ThriftHiveMetastore_get_partition_names_ps_args args; + ThriftHiveMetastore_alter_partition_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } - ThriftHiveMetastore_get_partition_names_ps_result result; + ThriftHiveMetastore_alter_partition_with_environment_context_result result; try { - iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28847,58 +30874,57 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } - oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); } - ThriftHiveMetastore_get_partitions_by_filter_args args; + ThriftHiveMetastore_rename_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); } - ThriftHiveMetastore_get_partitions_by_filter_result result; + ThriftHiveMetastore_rename_partition_result result; try { - iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28907,58 +30933,55 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqi } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); } - oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_partition_name_has_valid_characters(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_expr", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_has_valid_characters", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); } - ThriftHiveMetastore_get_partitions_by_expr_args args; + ThriftHiveMetastore_partition_name_has_valid_characters_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", bytes); } - ThriftHiveMetastore_get_partitions_by_expr_result result; + ThriftHiveMetastore_partition_name_has_valid_characters_result result; try { - iface_->get_partitions_by_expr(result.success, args.req); + result.success = iface_->partition_name_has_valid_characters(args.part_vals, args.throw_exception); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -28967,58 +30990,55 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_by_expr(int32_t seqid, } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); } - oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); } - ThriftHiveMetastore_get_partitions_by_names_args args; + ThriftHiveMetastore_get_config_value_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); } - ThriftHiveMetastore_get_partitions_by_names_result result; + ThriftHiveMetastore_get_config_value_result result; try { - iface_->get_partitions_by_names(result.success, args.db_name, args.tbl_name, args.names); + iface_->get_config_value(result.success, args.name, args.defaultValue); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (ConfigValSecurityException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29027,57 +31047,55 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_by_names(int32_t seqid } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); } - oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } - ThriftHiveMetastore_alter_partition_args args; + ThriftHiveMetastore_partition_name_to_vals_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } - ThriftHiveMetastore_alter_partition_result result; + ThriftHiveMetastore_partition_name_to_vals_result result; try { - iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException &o1) { + iface_->partition_name_to_vals(result.success, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29086,57 +31104,55 @@ void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apac } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } - ThriftHiveMetastore_alter_partitions_args args; + ThriftHiveMetastore_partition_name_to_spec_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); } - ThriftHiveMetastore_alter_partitions_result result; + ThriftHiveMetastore_partition_name_to_spec_result result; try { - iface_->alter_partitions(args.db_name, args.tbl_name, args.new_parts); - } catch (InvalidOperationException &o1) { + iface_->partition_name_to_spec(result.success, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29145,57 +31161,69 @@ void ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apa } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } - oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", 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 ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } - ThriftHiveMetastore_alter_partition_with_environment_context_args args; + ThriftHiveMetastore_markPartitionForEvent_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } - ThriftHiveMetastore_alter_partition_with_environment_context_result result; + ThriftHiveMetastore_markPartitionForEvent_result result; try { - iface_->alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); - } catch (InvalidOperationException &o1) { + iface_->markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (UnknownTableException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (UnknownPartitionException &o5) { + result.o5 = o5; + result.__isset.o5 = true; + } catch (InvalidPartitionException &o6) { + result.o6 = o6; + result.__isset.o6 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29204,57 +31232,70 @@ void ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_cont } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } - oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } } -void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } - ThriftHiveMetastore_rename_partition_args args; + ThriftHiveMetastore_isPartitionMarkedForEvent_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } - ThriftHiveMetastore_rename_partition_result result; + ThriftHiveMetastore_isPartitionMarkedForEvent_result result; try { - iface_->rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); - } catch (InvalidOperationException &o1) { + result.success = iface_->isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (UnknownTableException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (UnknownPartitionException &o5) { + result.o5 = o5; + result.__isset.o5 = true; + } catch (InvalidPartitionException &o6) { + result.o6 = o6; + result.__isset.o6 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29263,55 +31304,61 @@ void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apa } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } - oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } } -void ThriftHiveMetastoreProcessor::process_partition_name_has_valid_characters(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_has_valid_characters", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); } - ThriftHiveMetastore_partition_name_has_valid_characters_args args; + ThriftHiveMetastore_add_index_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); } - ThriftHiveMetastore_partition_name_has_valid_characters_result result; + ThriftHiveMetastore_add_index_result result; try { - result.success = iface_->partition_name_has_valid_characters(args.part_vals, args.throw_exception); + iface_->add_index(result.success, args.new_index, args.index_table); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29320,55 +31367,57 @@ void ThriftHiveMetastoreProcessor::process_partition_name_has_valid_characters(i } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); } - oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); } - ThriftHiveMetastore_get_config_value_args args; + ThriftHiveMetastore_alter_index_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); } - ThriftHiveMetastore_get_config_value_result result; + ThriftHiveMetastore_alter_index_result result; try { - iface_->get_config_value(result.success, args.name, args.defaultValue); - result.__isset.success = true; - } catch (ConfigValSecurityException &o1) { + iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29377,55 +31426,58 @@ void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apa } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); } - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); } } -void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); } - ThriftHiveMetastore_partition_name_to_vals_args args; + ThriftHiveMetastore_drop_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } - ThriftHiveMetastore_partition_name_to_vals_result result; + ThriftHiveMetastore_drop_index_by_name_result result; try { - iface_->partition_name_to_vals(result.success, args.part_name); + result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29434,55 +31486,58 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); } - oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); } - ThriftHiveMetastore_partition_name_to_spec_args args; + ThriftHiveMetastore_get_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } - ThriftHiveMetastore_partition_name_to_spec_result result; + ThriftHiveMetastore_get_index_by_name_result result; try { - iface_->partition_name_to_spec(result.success, args.part_name); + iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29491,69 +31546,58 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); } - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); } - ThriftHiveMetastore_markPartitionForEvent_args args; + ThriftHiveMetastore_get_indexes_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); } - ThriftHiveMetastore_markPartitionForEvent_result result; + ThriftHiveMetastore_get_indexes_result result; try { - iface_->markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); - } catch (MetaException &o1) { + iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (UnknownTableException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (UnknownPartitionException &o5) { - result.o5 = o5; - result.__isset.o5 = true; - } catch (InvalidPartitionException &o6) { - result.o6 = o6; - result.__isset.o6 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29562,70 +31606,55 @@ void ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); } - oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); } } -void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); } - ThriftHiveMetastore_isPartitionMarkedForEvent_args args; + ThriftHiveMetastore_get_index_names_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); } - ThriftHiveMetastore_isPartitionMarkedForEvent_result result; + ThriftHiveMetastore_get_index_names_result result; try { - result.success = iface_->isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (UnknownTableException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (UnknownPartitionException &o5) { - result.o5 = o5; - result.__isset.o5 = true; - } catch (InvalidPartitionException &o6) { - result.o6 = o6; - result.__isset.o6 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29634,61 +31663,64 @@ void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seq } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); } - oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); } } -void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_table_column_statistics"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } - ThriftHiveMetastore_add_index_args args; + ThriftHiveMetastore_update_table_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); } - ThriftHiveMetastore_add_index_result result; + ThriftHiveMetastore_update_table_column_statistics_result result; try { - iface_->add_index(result.success, args.new_index, args.index_table); + result.success = iface_->update_table_column_statistics(args.stats_obj); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29697,57 +31729,64 @@ void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::th } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_partition_column_statistics"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } - ThriftHiveMetastore_alter_index_args args; + ThriftHiveMetastore_update_partition_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); } - ThriftHiveMetastore_alter_index_result result; + ThriftHiveMetastore_update_partition_column_statistics_result result; try { - iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException &o1) { + result.success = iface_->update_partition_column_statistics(args.stats_obj); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29756,44 +31795,44 @@ void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache:: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_column_statistics"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } - ThriftHiveMetastore_drop_index_by_name_args args; + ThriftHiveMetastore_get_table_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); } - ThriftHiveMetastore_drop_index_by_name_result result; + ThriftHiveMetastore_get_table_column_statistics_result result; try { - result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + iface_->get_table_column_statistics(result.success, args.db_name, args.tbl_name, args.col_name); result.__isset.success = true; } catch (NoSuchObjectException &o1) { result.o1 = o1; @@ -29801,13 +31840,19 @@ void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::a } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidInputException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29816,58 +31861,64 @@ void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::a } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_column_statistics"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } - ThriftHiveMetastore_get_index_by_name_args args; + ThriftHiveMetastore_get_partition_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); } - ThriftHiveMetastore_get_index_by_name_result result; + ThriftHiveMetastore_get_partition_column_statistics_result result; try { - iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); + iface_->get_partition_column_statistics(result.success, args.db_name, args.tbl_name, args.part_name, args.col_name); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidInputException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29876,44 +31927,44 @@ void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::ap } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } - ThriftHiveMetastore_get_indexes_args args; + ThriftHiveMetastore_delete_partition_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); } - ThriftHiveMetastore_get_indexes_result result; + ThriftHiveMetastore_delete_partition_column_statistics_result result; try { - iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); result.__isset.success = true; } catch (NoSuchObjectException &o1) { result.o1 = o1; @@ -29921,13 +31972,19 @@ void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache:: } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29936,55 +31993,64 @@ void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache:: } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_table_column_statistics"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } - ThriftHiveMetastore_get_index_names_args args; + ThriftHiveMetastore_delete_table_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); } - ThriftHiveMetastore_get_index_names_result result; + ThriftHiveMetastore_delete_table_column_statistics_result result; try { - iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -29993,46 +32059,45 @@ void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apac } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_create_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_table_column_statistics", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_function", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_table_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_function"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_function"); } - ThriftHiveMetastore_update_table_column_statistics_args args; + ThriftHiveMetastore_create_function_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_function", bytes); } - ThriftHiveMetastore_update_table_column_statistics_result result; + ThriftHiveMetastore_create_function_result result; try { - result.success = iface_->update_table_column_statistics(args.stats_obj); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + iface_->create_function(args.func); + } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (InvalidObjectException &o2) { @@ -30041,16 +32106,16 @@ void ThriftHiveMetastoreProcessor::process_update_table_column_statistics(int32_ } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; - } catch (InvalidInputException &o4) { + } catch (NoSuchObjectException &o4) { result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_function"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -30059,64 +32124,57 @@ void ThriftHiveMetastoreProcessor::process_update_table_column_statistics(int32_ } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_function"); } - oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_function", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_function", bytes); } } -void ThriftHiveMetastoreProcessor::process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_partition_column_statistics", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_function", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_function"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_function"); } - ThriftHiveMetastore_update_partition_column_statistics_args args; + ThriftHiveMetastore_drop_function_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_function", bytes); } - ThriftHiveMetastore_update_partition_column_statistics_result result; + ThriftHiveMetastore_drop_function_result result; try { - result.success = iface_->update_partition_column_statistics(args.stats_obj); - result.__isset.success = true; + iface_->drop_function(args.dbName, args.funcName); } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_function"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -30125,64 +32183,57 @@ void ThriftHiveMetastoreProcessor::process_update_partition_column_statistics(in } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_function"); } - oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_function", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_column_statistics", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_function", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_function"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_function"); } - ThriftHiveMetastore_get_table_column_statistics_args args; + ThriftHiveMetastore_alter_function_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_function", bytes); } - ThriftHiveMetastore_get_table_column_statistics_result result; + ThriftHiveMetastore_alter_function_result result; try { - iface_->get_table_column_statistics(result.success, args.db_name, args.tbl_name, args.col_name); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + iface_->alter_function(args.dbName, args.funcName, args.newFunc); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (InvalidInputException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_function"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -30191,64 +32242,55 @@ void ThriftHiveMetastoreProcessor::process_get_table_column_statistics(int32_t s } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_function"); } - oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_function", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_column_statistics", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_functions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_functions"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_functions"); } - ThriftHiveMetastore_get_partition_column_statistics_args args; + ThriftHiveMetastore_get_functions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_functions", bytes); } - ThriftHiveMetastore_get_partition_column_statistics_result result; + ThriftHiveMetastore_get_functions_result result; try { - iface_->get_partition_column_statistics(result.success, args.db_name, args.tbl_name, args.part_name, args.col_name); + iface_->get_functions(result.success, args.dbName, args.pattern); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidInputException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_functions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -30257,64 +32299,55 @@ void ThriftHiveMetastoreProcessor::process_get_partition_column_statistics(int32 } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_functions"); } - oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_functions", bytes); } } -void ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_all_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_partition_column_statistics", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_functions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_functions"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_functions"); } - ThriftHiveMetastore_delete_partition_column_statistics_args args; + ThriftHiveMetastore_get_all_functions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_functions", bytes); } - ThriftHiveMetastore_delete_partition_column_statistics_result result; + ThriftHiveMetastore_get_all_functions_result result; try { - result.success = iface_->delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); + iface_->get_all_functions(result.success, args.dbName); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidObjectException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_functions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -30323,64 +32356,58 @@ void ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics(in } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_functions"); } - oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_functions", bytes); } } -void ThriftHiveMetastoreProcessor::process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_table_column_statistics", callContext); + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_function", callContext); } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_function"); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_function"); } - ThriftHiveMetastore_delete_table_column_statistics_args args; + ThriftHiveMetastore_get_function_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_function", bytes); } - ThriftHiveMetastore_delete_table_column_statistics_result result; + ThriftHiveMetastore_get_function_result result; try { - result.success = iface_->delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); + iface_->get_function(result.success, args.dbName, args.funcName); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (InvalidObjectException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_function"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -30389,17 +32416,17 @@ void ThriftHiveMetastoreProcessor::process_delete_table_column_statistics(int32_ } if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_function"); } - oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_function", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_function", bytes); } } diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index ee0f402..3e150e5 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -86,6 +86,12 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService virtual 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) = 0; virtual 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) = 0; virtual bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; + virtual void create_function(const Function& func) = 0; + virtual void drop_function(const std::string& dbName, const std::string& funcName) = 0; + virtual void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) = 0; + virtual void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) = 0; + virtual void get_all_functions(std::vector & _return, const std::string& dbName) = 0; + virtual void get_function(Function& _return, const std::string& dbName, const std::string& funcName) = 0; virtual bool create_role(const Role& role) = 0; virtual bool drop_role(const std::string& role_name) = 0; virtual void get_role_names(std::vector & _return) = 0; @@ -353,6 +359,24 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p bool _return = false; return _return; } + void create_function(const Function& /* func */) { + return; + } + void drop_function(const std::string& /* dbName */, const std::string& /* funcName */) { + return; + } + void alter_function(const std::string& /* dbName */, const std::string& /* funcName */, const Function& /* newFunc */) { + return; + } + void get_functions(std::vector & /* _return */, const std::string& /* dbName */, const std::string& /* pattern */) { + return; + } + void get_all_functions(std::vector & /* _return */, const std::string& /* dbName */) { + return; + } + void get_function(Function& /* _return */, const std::string& /* dbName */, const std::string& /* funcName */) { + return; + } bool create_role(const Role& /* role */) { bool _return = false; return _return; @@ -10617,38 +10641,38 @@ class ThriftHiveMetastore_delete_table_column_statistics_presult { }; -typedef struct _ThriftHiveMetastore_create_role_args__isset { - _ThriftHiveMetastore_create_role_args__isset() : role(false) {} - bool role; -} _ThriftHiveMetastore_create_role_args__isset; +typedef struct _ThriftHiveMetastore_create_function_args__isset { + _ThriftHiveMetastore_create_function_args__isset() : func(false) {} + bool func; +} _ThriftHiveMetastore_create_function_args__isset; -class ThriftHiveMetastore_create_role_args { +class ThriftHiveMetastore_create_function_args { public: - ThriftHiveMetastore_create_role_args() { + ThriftHiveMetastore_create_function_args() { } - virtual ~ThriftHiveMetastore_create_role_args() throw() {} + virtual ~ThriftHiveMetastore_create_function_args() throw() {} - Role role; + Function func; - _ThriftHiveMetastore_create_role_args__isset __isset; + _ThriftHiveMetastore_create_function_args__isset __isset; - void __set_role(const Role& val) { - role = val; + void __set_func(const Function& val) { + func = val; } - bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + bool operator == (const ThriftHiveMetastore_create_function_args & rhs) const { - if (!(role == rhs.role)) + if (!(func == rhs.func)) return false; return true; } - bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { + bool operator != (const ThriftHiveMetastore_create_function_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + bool operator < (const ThriftHiveMetastore_create_function_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -10656,117 +10680,145 @@ class ThriftHiveMetastore_create_role_args { }; -class ThriftHiveMetastore_create_role_pargs { +class ThriftHiveMetastore_create_function_pargs { public: - virtual ~ThriftHiveMetastore_create_role_pargs() throw() {} + virtual ~ThriftHiveMetastore_create_function_pargs() throw() {} - const Role* role; + const Function* func; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_create_role_result__isset { - _ThriftHiveMetastore_create_role_result__isset() : success(false), o1(false) {} - bool success; +typedef struct _ThriftHiveMetastore_create_function_result__isset { + _ThriftHiveMetastore_create_function_result__isset() : o1(false), o2(false), o3(false), o4(false) {} bool o1; -} _ThriftHiveMetastore_create_role_result__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_create_function_result__isset; -class ThriftHiveMetastore_create_role_result { +class ThriftHiveMetastore_create_function_result { public: - ThriftHiveMetastore_create_role_result() : success(0) { + ThriftHiveMetastore_create_function_result() { } - virtual ~ThriftHiveMetastore_create_role_result() throw() {} + virtual ~ThriftHiveMetastore_create_function_result() throw() {} - bool success; - MetaException o1; + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; - _ThriftHiveMetastore_create_role_result__isset __isset; + _ThriftHiveMetastore_create_function_result__isset __isset; - void __set_success(const bool val) { - success = val; + void __set_o1(const AlreadyExistsException& val) { + o1 = val; } - void __set_o1(const MetaException& val) { - o1 = val; + void __set_o2(const InvalidObjectException& val) { + o2 = val; } - bool operator == (const ThriftHiveMetastore_create_role_result & rhs) const + void __set_o3(const MetaException& val) { + o3 = val; + } + + void __set_o4(const NoSuchObjectException& val) { + o4 = val; + } + + bool operator == (const ThriftHiveMetastore_create_function_result & rhs) const { - if (!(success == rhs.success)) - return false; if (!(o1 == rhs.o1)) return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_create_role_result &rhs) const { + bool operator != (const ThriftHiveMetastore_create_function_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_create_role_result & ) const; + bool operator < (const ThriftHiveMetastore_create_function_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_create_role_presult__isset { - _ThriftHiveMetastore_create_role_presult__isset() : success(false), o1(false) {} - bool success; +typedef struct _ThriftHiveMetastore_create_function_presult__isset { + _ThriftHiveMetastore_create_function_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} bool o1; -} _ThriftHiveMetastore_create_role_presult__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_create_function_presult__isset; -class ThriftHiveMetastore_create_role_presult { +class ThriftHiveMetastore_create_function_presult { public: - virtual ~ThriftHiveMetastore_create_role_presult() throw() {} + virtual ~ThriftHiveMetastore_create_function_presult() throw() {} - bool* success; - MetaException o1; + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; - _ThriftHiveMetastore_create_role_presult__isset __isset; + _ThriftHiveMetastore_create_function_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; -typedef struct _ThriftHiveMetastore_drop_role_args__isset { - _ThriftHiveMetastore_drop_role_args__isset() : role_name(false) {} - bool role_name; -} _ThriftHiveMetastore_drop_role_args__isset; +typedef struct _ThriftHiveMetastore_drop_function_args__isset { + _ThriftHiveMetastore_drop_function_args__isset() : dbName(false), funcName(false) {} + bool dbName; + bool funcName; +} _ThriftHiveMetastore_drop_function_args__isset; -class ThriftHiveMetastore_drop_role_args { +class ThriftHiveMetastore_drop_function_args { public: - ThriftHiveMetastore_drop_role_args() : role_name() { + ThriftHiveMetastore_drop_function_args() : dbName(), funcName() { } - virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + virtual ~ThriftHiveMetastore_drop_function_args() throw() {} - std::string role_name; + std::string dbName; + std::string funcName; - _ThriftHiveMetastore_drop_role_args__isset __isset; + _ThriftHiveMetastore_drop_function_args__isset __isset; - void __set_role_name(const std::string& val) { - role_name = val; + void __set_dbName(const std::string& val) { + dbName = val; } - bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + void __set_funcName(const std::string& val) { + funcName = val; + } + + bool operator == (const ThriftHiveMetastore_drop_function_args & rhs) const { - if (!(role_name == rhs.role_name)) + if (!(dbName == rhs.dbName)) + return false; + if (!(funcName == rhs.funcName)) return false; return true; } - bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + bool operator != (const ThriftHiveMetastore_drop_function_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + bool operator < (const ThriftHiveMetastore_drop_function_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -10774,104 +10826,134 @@ class ThriftHiveMetastore_drop_role_args { }; -class ThriftHiveMetastore_drop_role_pargs { +class ThriftHiveMetastore_drop_function_pargs { public: - virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + virtual ~ThriftHiveMetastore_drop_function_pargs() throw() {} - const std::string* role_name; + const std::string* dbName; + const std::string* funcName; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_drop_role_result__isset { - _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} - bool success; +typedef struct _ThriftHiveMetastore_drop_function_result__isset { + _ThriftHiveMetastore_drop_function_result__isset() : o1(false), o3(false) {} bool o1; -} _ThriftHiveMetastore_drop_role_result__isset; + bool o3; +} _ThriftHiveMetastore_drop_function_result__isset; -class ThriftHiveMetastore_drop_role_result { +class ThriftHiveMetastore_drop_function_result { public: - ThriftHiveMetastore_drop_role_result() : success(0) { + ThriftHiveMetastore_drop_function_result() { } - virtual ~ThriftHiveMetastore_drop_role_result() throw() {} + virtual ~ThriftHiveMetastore_drop_function_result() throw() {} - bool success; - MetaException o1; + NoSuchObjectException o1; + MetaException o3; - _ThriftHiveMetastore_drop_role_result__isset __isset; + _ThriftHiveMetastore_drop_function_result__isset __isset; - void __set_success(const bool val) { - success = val; + void __set_o1(const NoSuchObjectException& val) { + o1 = val; } - void __set_o1(const MetaException& val) { - o1 = val; + void __set_o3(const MetaException& val) { + o3 = val; } - bool operator == (const ThriftHiveMetastore_drop_role_result & rhs) const + bool operator == (const ThriftHiveMetastore_drop_function_result & rhs) const { - if (!(success == rhs.success)) - return false; if (!(o1 == rhs.o1)) return false; + if (!(o3 == rhs.o3)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_drop_role_result &rhs) const { + bool operator != (const ThriftHiveMetastore_drop_function_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; + bool operator < (const ThriftHiveMetastore_drop_function_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_drop_role_presult__isset { - _ThriftHiveMetastore_drop_role_presult__isset() : success(false), o1(false) {} - bool success; +typedef struct _ThriftHiveMetastore_drop_function_presult__isset { + _ThriftHiveMetastore_drop_function_presult__isset() : o1(false), o3(false) {} bool o1; -} _ThriftHiveMetastore_drop_role_presult__isset; + bool o3; +} _ThriftHiveMetastore_drop_function_presult__isset; -class ThriftHiveMetastore_drop_role_presult { +class ThriftHiveMetastore_drop_function_presult { public: - virtual ~ThriftHiveMetastore_drop_role_presult() throw() {} + virtual ~ThriftHiveMetastore_drop_function_presult() throw() {} - bool* success; - MetaException o1; + NoSuchObjectException o1; + MetaException o3; - _ThriftHiveMetastore_drop_role_presult__isset __isset; + _ThriftHiveMetastore_drop_function_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_alter_function_args__isset { + _ThriftHiveMetastore_alter_function_args__isset() : dbName(false), funcName(false), newFunc(false) {} + bool dbName; + bool funcName; + bool newFunc; +} _ThriftHiveMetastore_alter_function_args__isset; -class ThriftHiveMetastore_get_role_names_args { +class ThriftHiveMetastore_alter_function_args { public: - ThriftHiveMetastore_get_role_names_args() { + ThriftHiveMetastore_alter_function_args() : dbName(), funcName() { } - virtual ~ThriftHiveMetastore_get_role_names_args() throw() {} + virtual ~ThriftHiveMetastore_alter_function_args() throw() {} + std::string dbName; + std::string funcName; + Function newFunc; - bool operator == (const ThriftHiveMetastore_get_role_names_args & /* rhs */) const + _ThriftHiveMetastore_alter_function_args__isset __isset; + + void __set_dbName(const std::string& val) { + dbName = val; + } + + void __set_funcName(const std::string& val) { + funcName = val; + } + + void __set_newFunc(const Function& val) { + newFunc = val; + } + + bool operator == (const ThriftHiveMetastore_alter_function_args & rhs) const { + if (!(dbName == rhs.dbName)) + return false; + if (!(funcName == rhs.funcName)) + return false; + if (!(newFunc == rhs.newFunc)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_get_role_names_args &rhs) const { + bool operator != (const ThriftHiveMetastore_alter_function_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_role_names_args & ) const; + bool operator < (const ThriftHiveMetastore_alter_function_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -10879,136 +10961,861 @@ class ThriftHiveMetastore_get_role_names_args { }; -class ThriftHiveMetastore_get_role_names_pargs { +class ThriftHiveMetastore_alter_function_pargs { public: - virtual ~ThriftHiveMetastore_get_role_names_pargs() throw() {} + virtual ~ThriftHiveMetastore_alter_function_pargs() throw() {} + const std::string* dbName; + const std::string* funcName; + const Function* newFunc; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_get_role_names_result__isset { - _ThriftHiveMetastore_get_role_names_result__isset() : success(false), o1(false) {} - bool success; +typedef struct _ThriftHiveMetastore_alter_function_result__isset { + _ThriftHiveMetastore_alter_function_result__isset() : o1(false), o2(false) {} bool o1; -} _ThriftHiveMetastore_get_role_names_result__isset; + bool o2; +} _ThriftHiveMetastore_alter_function_result__isset; -class ThriftHiveMetastore_get_role_names_result { +class ThriftHiveMetastore_alter_function_result { public: - ThriftHiveMetastore_get_role_names_result() { + ThriftHiveMetastore_alter_function_result() { } - virtual ~ThriftHiveMetastore_get_role_names_result() throw() {} + virtual ~ThriftHiveMetastore_alter_function_result() throw() {} - std::vector success; - MetaException o1; + InvalidOperationException o1; + MetaException o2; - _ThriftHiveMetastore_get_role_names_result__isset __isset; + _ThriftHiveMetastore_alter_function_result__isset __isset; - void __set_success(const std::vector & val) { - success = val; + void __set_o1(const InvalidOperationException& val) { + o1 = val; } - void __set_o1(const MetaException& val) { - o1 = val; + void __set_o2(const MetaException& val) { + o2 = val; } - bool operator == (const ThriftHiveMetastore_get_role_names_result & rhs) const + bool operator == (const ThriftHiveMetastore_alter_function_result & rhs) const { - if (!(success == rhs.success)) - return false; if (!(o1 == rhs.o1)) return false; + if (!(o2 == rhs.o2)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_get_role_names_result &rhs) const { + bool operator != (const ThriftHiveMetastore_alter_function_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_role_names_result & ) const; + bool operator < (const ThriftHiveMetastore_alter_function_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_get_role_names_presult__isset { - _ThriftHiveMetastore_get_role_names_presult__isset() : success(false), o1(false) {} - bool success; +typedef struct _ThriftHiveMetastore_alter_function_presult__isset { + _ThriftHiveMetastore_alter_function_presult__isset() : o1(false), o2(false) {} bool o1; -} _ThriftHiveMetastore_get_role_names_presult__isset; + bool o2; +} _ThriftHiveMetastore_alter_function_presult__isset; -class ThriftHiveMetastore_get_role_names_presult { +class ThriftHiveMetastore_alter_function_presult { public: - virtual ~ThriftHiveMetastore_get_role_names_presult() throw() {} + virtual ~ThriftHiveMetastore_alter_function_presult() throw() {} - std::vector * success; - MetaException o1; + InvalidOperationException o1; + MetaException o2; - _ThriftHiveMetastore_get_role_names_presult__isset __isset; + _ThriftHiveMetastore_alter_function_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; -typedef struct _ThriftHiveMetastore_grant_role_args__isset { - _ThriftHiveMetastore_grant_role_args__isset() : role_name(false), principal_name(false), principal_type(false), grantor(false), grantorType(false), grant_option(false) {} - bool role_name; - bool principal_name; - bool principal_type; - bool grantor; - bool grantorType; - bool grant_option; -} _ThriftHiveMetastore_grant_role_args__isset; +typedef struct _ThriftHiveMetastore_get_functions_args__isset { + _ThriftHiveMetastore_get_functions_args__isset() : dbName(false), pattern(false) {} + bool dbName; + bool pattern; +} _ThriftHiveMetastore_get_functions_args__isset; -class ThriftHiveMetastore_grant_role_args { +class ThriftHiveMetastore_get_functions_args { public: - ThriftHiveMetastore_grant_role_args() : role_name(), principal_name(), principal_type((PrincipalType::type)0), grantor(), grantorType((PrincipalType::type)0), grant_option(0) { + ThriftHiveMetastore_get_functions_args() : dbName(), pattern() { } - virtual ~ThriftHiveMetastore_grant_role_args() throw() {} + virtual ~ThriftHiveMetastore_get_functions_args() throw() {} - std::string role_name; - std::string principal_name; - PrincipalType::type principal_type; - std::string grantor; - PrincipalType::type grantorType; - bool grant_option; + std::string dbName; + std::string pattern; - _ThriftHiveMetastore_grant_role_args__isset __isset; + _ThriftHiveMetastore_get_functions_args__isset __isset; - void __set_role_name(const std::string& val) { - role_name = val; + void __set_dbName(const std::string& val) { + dbName = val; } - void __set_principal_name(const std::string& val) { - principal_name = val; + void __set_pattern(const std::string& val) { + pattern = val; } - void __set_principal_type(const PrincipalType::type val) { - principal_type = val; + bool operator == (const ThriftHiveMetastore_get_functions_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(pattern == rhs.pattern)) + return false; + return true; } - - void __set_grantor(const std::string& val) { - grantor = val; + bool operator != (const ThriftHiveMetastore_get_functions_args &rhs) const { + return !(*this == rhs); } - void __set_grantorType(const PrincipalType::type val) { - grantorType = val; - } + bool operator < (const ThriftHiveMetastore_get_functions_args & ) const; - void __set_grant_option(const bool val) { - grant_option = val; - } + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - bool operator == (const ThriftHiveMetastore_grant_role_args & rhs) const +}; + + +class ThriftHiveMetastore_get_functions_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_functions_pargs() throw() {} + + const std::string* dbName; + const std::string* pattern; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_functions_result__isset { + _ThriftHiveMetastore_get_functions_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_functions_result__isset; + +class ThriftHiveMetastore_get_functions_result { + public: + + ThriftHiveMetastore_get_functions_result() { + } + + virtual ~ThriftHiveMetastore_get_functions_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_functions_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_get_functions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_functions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_functions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_functions_presult__isset { + _ThriftHiveMetastore_get_functions_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_functions_presult__isset; + +class ThriftHiveMetastore_get_functions_presult { + public: + + + virtual ~ThriftHiveMetastore_get_functions_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_functions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_all_functions_args__isset { + _ThriftHiveMetastore_get_all_functions_args__isset() : dbName(false) {} + bool dbName; +} _ThriftHiveMetastore_get_all_functions_args__isset; + +class ThriftHiveMetastore_get_all_functions_args { + public: + + ThriftHiveMetastore_get_all_functions_args() : dbName() { + } + + virtual ~ThriftHiveMetastore_get_all_functions_args() throw() {} + + std::string dbName; + + _ThriftHiveMetastore_get_all_functions_args__isset __isset; + + void __set_dbName(const std::string& val) { + dbName = val; + } + + bool operator == (const ThriftHiveMetastore_get_all_functions_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_functions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_functions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_all_functions_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_all_functions_pargs() throw() {} + + const std::string* dbName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_functions_result__isset { + _ThriftHiveMetastore_get_all_functions_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_all_functions_result__isset; + +class ThriftHiveMetastore_get_all_functions_result { + public: + + ThriftHiveMetastore_get_all_functions_result() { + } + + virtual ~ThriftHiveMetastore_get_all_functions_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_all_functions_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_get_all_functions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_functions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_functions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_functions_presult__isset { + _ThriftHiveMetastore_get_all_functions_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_all_functions_presult__isset; + +class ThriftHiveMetastore_get_all_functions_presult { + public: + + + virtual ~ThriftHiveMetastore_get_all_functions_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_all_functions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_function_args__isset { + _ThriftHiveMetastore_get_function_args__isset() : dbName(false), funcName(false) {} + bool dbName; + bool funcName; +} _ThriftHiveMetastore_get_function_args__isset; + +class ThriftHiveMetastore_get_function_args { + public: + + ThriftHiveMetastore_get_function_args() : dbName(), funcName() { + } + + virtual ~ThriftHiveMetastore_get_function_args() throw() {} + + std::string dbName; + std::string funcName; + + _ThriftHiveMetastore_get_function_args__isset __isset; + + void __set_dbName(const std::string& val) { + dbName = val; + } + + void __set_funcName(const std::string& val) { + funcName = val; + } + + bool operator == (const ThriftHiveMetastore_get_function_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(funcName == rhs.funcName)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_function_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_function_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_function_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_function_pargs() throw() {} + + const std::string* dbName; + const std::string* funcName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_function_result__isset { + _ThriftHiveMetastore_get_function_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_function_result__isset; + +class ThriftHiveMetastore_get_function_result { + public: + + ThriftHiveMetastore_get_function_result() { + } + + virtual ~ThriftHiveMetastore_get_function_result() throw() {} + + Function success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_function_result__isset __isset; + + void __set_success(const Function& val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + void __set_o2(const NoSuchObjectException& val) { + o2 = val; + } + + bool operator == (const ThriftHiveMetastore_get_function_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_function_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_function_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_function_presult__isset { + _ThriftHiveMetastore_get_function_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_function_presult__isset; + +class ThriftHiveMetastore_get_function_presult { + public: + + + virtual ~ThriftHiveMetastore_get_function_presult() throw() {} + + Function* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_function_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_role_args__isset { + _ThriftHiveMetastore_create_role_args__isset() : role(false) {} + bool role; +} _ThriftHiveMetastore_create_role_args__isset; + +class ThriftHiveMetastore_create_role_args { + public: + + ThriftHiveMetastore_create_role_args() { + } + + virtual ~ThriftHiveMetastore_create_role_args() throw() {} + + Role role; + + _ThriftHiveMetastore_create_role_args__isset __isset; + + void __set_role(const Role& val) { + role = val; + } + + bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + { + if (!(role == rhs.role)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_role_pargs() throw() {} + + const Role* role; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_result__isset { + _ThriftHiveMetastore_create_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_create_role_result__isset; + +class ThriftHiveMetastore_create_role_result { + public: + + ThriftHiveMetastore_create_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_create_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_create_role_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_create_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_presult__isset { + _ThriftHiveMetastore_create_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_create_role_presult__isset; + +class ThriftHiveMetastore_create_role_presult { + public: + + + virtual ~ThriftHiveMetastore_create_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_create_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_role_args__isset { + _ThriftHiveMetastore_drop_role_args__isset() : role_name(false) {} + bool role_name; +} _ThriftHiveMetastore_drop_role_args__isset; + +class ThriftHiveMetastore_drop_role_args { + public: + + ThriftHiveMetastore_drop_role_args() : role_name() { + } + + virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + + std::string role_name; + + _ThriftHiveMetastore_drop_role_args__isset __isset; + + void __set_role_name(const std::string& val) { + role_name = val; + } + + bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + + const std::string* role_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_result__isset { + _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_drop_role_result__isset; + +class ThriftHiveMetastore_drop_role_result { + public: + + ThriftHiveMetastore_drop_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_drop_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_presult__isset { + _ThriftHiveMetastore_drop_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_drop_role_presult__isset; + +class ThriftHiveMetastore_drop_role_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_role_names_args { + public: + + ThriftHiveMetastore_get_role_names_args() { + } + + virtual ~ThriftHiveMetastore_get_role_names_args() throw() {} + + + bool operator == (const ThriftHiveMetastore_get_role_names_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_names_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_names_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_role_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_role_names_pargs() throw() {} + + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_names_result__isset { + _ThriftHiveMetastore_get_role_names_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_role_names_result__isset; + +class ThriftHiveMetastore_get_role_names_result { + public: + + ThriftHiveMetastore_get_role_names_result() { + } + + virtual ~ThriftHiveMetastore_get_role_names_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_role_names_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_get_role_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_names_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_names_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_names_presult__isset { + _ThriftHiveMetastore_get_role_names_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_role_names_presult__isset; + +class ThriftHiveMetastore_get_role_names_presult { + public: + + + virtual ~ThriftHiveMetastore_get_role_names_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_role_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_role_args__isset { + _ThriftHiveMetastore_grant_role_args__isset() : role_name(false), principal_name(false), principal_type(false), grantor(false), grantorType(false), grant_option(false) {} + bool role_name; + bool principal_name; + bool principal_type; + bool grantor; + bool grantorType; + bool grant_option; +} _ThriftHiveMetastore_grant_role_args__isset; + +class ThriftHiveMetastore_grant_role_args { + public: + + 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() {} + + std::string role_name; + std::string principal_name; + PrincipalType::type principal_type; + std::string grantor; + PrincipalType::type grantorType; + bool grant_option; + + _ThriftHiveMetastore_grant_role_args__isset __isset; + + void __set_role_name(const std::string& val) { + role_name = val; + } + + void __set_principal_name(const std::string& val) { + principal_name = val; + } + + void __set_principal_type(const PrincipalType::type val) { + principal_type = val; + } + + void __set_grantor(const std::string& val) { + grantor = val; + } + + void __set_grantorType(const PrincipalType::type val) { + grantorType = val; + } + + void __set_grant_option(const bool val) { + grant_option = val; + } + + bool operator == (const ThriftHiveMetastore_grant_role_args & rhs) const { if (!(role_name == rhs.role_name)) return false; @@ -12593,6 +13400,24 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); void send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); bool recv_delete_table_column_statistics(); + void create_function(const Function& func); + void send_create_function(const Function& func); + void recv_create_function(); + void drop_function(const std::string& dbName, const std::string& funcName); + void send_drop_function(const std::string& dbName, const std::string& funcName); + void recv_drop_function(); + void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); + void send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); + void recv_alter_function(); + void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern); + void send_get_functions(const std::string& dbName, const std::string& pattern); + void recv_get_functions(std::vector & _return); + void get_all_functions(std::vector & _return, const std::string& dbName); + void send_get_all_functions(const std::string& dbName); + void recv_get_all_functions(std::vector & _return); + void get_function(Function& _return, const std::string& dbName, const std::string& funcName); + void send_get_function(const std::string& dbName, const std::string& funcName); + void recv_get_function(Function& _return); bool create_role(const Role& role); void send_create_role(const Role& role); bool recv_create_role(); @@ -12715,6 +13540,12 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP void process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_all_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_role_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -12803,6 +13634,12 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP processMap_["get_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_get_partition_column_statistics; processMap_["delete_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics; processMap_["delete_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_table_column_statistics; + processMap_["create_function"] = &ThriftHiveMetastoreProcessor::process_create_function; + processMap_["drop_function"] = &ThriftHiveMetastoreProcessor::process_drop_function; + processMap_["alter_function"] = &ThriftHiveMetastoreProcessor::process_alter_function; + processMap_["get_functions"] = &ThriftHiveMetastoreProcessor::process_get_functions; + processMap_["get_all_functions"] = &ThriftHiveMetastoreProcessor::process_get_all_functions; + processMap_["get_function"] = &ThriftHiveMetastoreProcessor::process_get_function; processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; processMap_["get_role_names"] = &ThriftHiveMetastoreProcessor::process_get_role_names; @@ -13521,6 +14358,63 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi return ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); } + void create_function(const Function& func) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_function(func); + } + ifaces_[i]->create_function(func); + } + + void drop_function(const std::string& dbName, const std::string& funcName) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_function(dbName, funcName); + } + ifaces_[i]->drop_function(dbName, funcName); + } + + void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->alter_function(dbName, funcName, newFunc); + } + ifaces_[i]->alter_function(dbName, funcName, newFunc); + } + + void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_functions(_return, dbName, pattern); + } + ifaces_[i]->get_functions(_return, dbName, pattern); + return; + } + + void get_all_functions(std::vector & _return, const std::string& dbName) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_all_functions(_return, dbName); + } + ifaces_[i]->get_all_functions(_return, dbName); + return; + } + + void get_function(Function& _return, const std::string& dbName, const std::string& funcName) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_function(_return, dbName, funcName); + } + ifaces_[i]->get_function(_return, dbName, funcName); + return; + } + bool create_role(const Role& role) { size_t sz = ifaces_.size(); size_t i = 0; diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp index e31f509..7f0f5a6 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -372,6 +372,36 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { printf("delete_table_column_statistics\n"); } + void create_function(const Function& func) { + // Your implementation goes here + printf("create_function\n"); + } + + void drop_function(const std::string& dbName, const std::string& funcName) { + // Your implementation goes here + printf("drop_function\n"); + } + + void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { + // Your implementation goes here + printf("alter_function\n"); + } + + void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) { + // Your implementation goes here + printf("get_functions\n"); + } + + void get_all_functions(std::vector & _return, const std::string& dbName) { + // Your implementation goes here + printf("get_all_functions\n"); + } + + void get_function(Function& _return, const std::string& dbName, const std::string& funcName) { + // Your implementation goes here + printf("get_function\n"); + } + bool create_role(const Role& role) { // Your implementation goes here printf("create_role\n"); diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index 3ef811c..3040709 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -4174,6 +4174,133 @@ void swap(AddPartitionsRequest &a, AddPartitionsRequest &b) { swap(a.__isset, b.__isset); } +const char* Function::ascii_fingerprint = "949FC10A59CA52020B8FF643EAA892D2"; +const uint8_t Function::binary_fingerprint[16] = {0x94,0x9F,0xC1,0x0A,0x59,0xCA,0x52,0x02,0x0B,0x8F,0xF6,0x43,0xEA,0xA8,0x92,0xD2}; + +uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->functionName); + this->__isset.functionName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->className); + this->__isset.className = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->owner); + this->__isset.owner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->functionType); + this->__isset.functionType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Function::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Function"); + + xfer += oprot->writeFieldBegin("functionName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->functionName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->className); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->owner); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("functionType", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->functionType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(Function &a, Function &b) { + using ::std::swap; + swap(a.functionName, b.functionName); + swap(a.dbName, b.dbName); + swap(a.className, b.className); + swap(a.owner, b.owner); + swap(a.createTime, b.createTime); + swap(a.functionType, b.functionType); + 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}; diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index ad94c71..59f96ff 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -2214,6 +2214,89 @@ class AddPartitionsRequest { void swap(AddPartitionsRequest &a, AddPartitionsRequest &b); +typedef struct _Function__isset { + _Function__isset() : functionName(false), dbName(false), className(false), owner(false), createTime(false), functionType(false) {} + bool functionName; + bool dbName; + bool className; + bool owner; + bool createTime; + bool functionType; +} _Function__isset; + +class Function { + public: + + static const char* ascii_fingerprint; // = "949FC10A59CA52020B8FF643EAA892D2"; + static const uint8_t binary_fingerprint[16]; // = {0x94,0x9F,0xC1,0x0A,0x59,0xCA,0x52,0x02,0x0B,0x8F,0xF6,0x43,0xEA,0xA8,0x92,0xD2}; + + Function() : functionName(), dbName(), className(), owner(), createTime(0), functionType() { + } + + virtual ~Function() throw() {} + + std::string functionName; + std::string dbName; + std::string className; + std::string owner; + int32_t createTime; + std::string functionType; + + _Function__isset __isset; + + void __set_functionName(const std::string& val) { + functionName = val; + } + + void __set_dbName(const std::string& val) { + dbName = val; + } + + void __set_className(const std::string& val) { + className = val; + } + + void __set_owner(const std::string& val) { + owner = val; + } + + void __set_createTime(const int32_t val) { + createTime = val; + } + + void __set_functionType(const std::string& val) { + functionType = val; + } + + bool operator == (const Function & rhs) const + { + if (!(functionName == rhs.functionName)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(className == rhs.className)) + return false; + if (!(owner == rhs.owner)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(functionType == rhs.functionType)) + return false; + return true; + } + bool operator != (const Function &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Function & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +void swap(Function &a, Function &b); + typedef struct _MetaException__isset { _MetaException__isset() : message(false) {} bool message; diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java index 50f760d..f4c5b14 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java @@ -704,7 +704,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, AddPartitionsReques struct.parts = new ArrayList(_list272.size); for (int _i273 = 0; _i273 < _list272.size; ++_i273) { - Partition _elem274; // required + Partition _elem274; // optional _elem274 = new Partition(); _elem274.read(iprot); struct.parts.add(_elem274); @@ -824,7 +824,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsRequest struct.parts = new ArrayList(_list277.size); for (int _i278 = 0; _i278 < _list277.size; ++_i278) { - Partition _elem279; // required + Partition _elem279; // optional _elem279 = new Partition(); _elem279.read(iprot); struct.parts.add(_elem279); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java index 6277301..3218750 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java @@ -346,7 +346,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, AddPartitionsResult struct.partitions = new ArrayList(_list264.size); for (int _i265 = 0; _i265 < _list264.size; ++_i265) { - Partition _elem266; // required + Partition _elem266; // optional _elem266 = new Partition(); _elem266.read(iprot); struct.partitions.add(_elem266); @@ -428,7 +428,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsResult struct.partitions = new ArrayList(_list269.size); for (int _i270 = 0; _i270 < _list269.size; ++_i270) { - Partition _elem271; // required + Partition _elem271; // optional _elem271 = new Partition(); _elem271.read(iprot); struct.partitions.add(_elem271); diff --git 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 index 5eefdd9..6cdada6 100644 --- 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 @@ -451,7 +451,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatistics st struct.statsObj = new ArrayList(_list220.size); for (int _i221 = 0; _i221 < _list220.size; ++_i221) { - ColumnStatisticsObj _elem222; // required + ColumnStatisticsObj _elem222; // optional _elem222 = new ColumnStatisticsObj(); _elem222.read(iprot); struct.statsObj.add(_elem222); @@ -531,7 +531,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics str struct.statsObj = new ArrayList(_list225.size); for (int _i226 = 0; _i226 < _list225.size; ++_i226) { - ColumnStatisticsObj _elem227; // required + ColumnStatisticsObj _elem227; // optional _elem227 = new ColumnStatisticsObj(); _elem227.read(iprot); struct.statsObj.add(_elem227); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java new file mode 100644 index 0000000..5c67393 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java @@ -0,0 +1,909 @@ +/** + * 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 Function 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("Function"); + + private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)4); + 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)5); + private static final org.apache.thrift.protocol.TField FUNCTION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("functionType", org.apache.thrift.protocol.TType.STRING, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new FunctionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new FunctionTupleSchemeFactory()); + } + + private String functionName; // required + private String dbName; // required + private String className; // required + private String owner; // required + private int createTime; // required + private String functionType; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FUNCTION_NAME((short)1, "functionName"), + DB_NAME((short)2, "dbName"), + CLASS_NAME((short)3, "className"), + OWNER((short)4, "owner"), + CREATE_TIME((short)5, "createTime"), + FUNCTION_TYPE((short)6, "functionType"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FUNCTION_NAME + return FUNCTION_NAME; + case 2: // DB_NAME + return DB_NAME; + case 3: // CLASS_NAME + return CLASS_NAME; + case 4: // OWNER + return OWNER; + case 5: // CREATE_TIME + return CREATE_TIME; + case 6: // FUNCTION_TYPE + return FUNCTION_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.FUNCTION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("functionType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Function.class, metaDataMap); + } + + public Function() { + } + + public Function( + String functionName, + String dbName, + String className, + String owner, + int createTime, + String functionType) + { + this(); + this.functionName = functionName; + this.dbName = dbName; + this.className = className; + this.owner = owner; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.functionType = functionType; + } + + /** + * Performs a deep copy on other. + */ + public Function(Function other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetFunctionName()) { + this.functionName = other.functionName; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetClassName()) { + this.className = other.className; + } + if (other.isSetOwner()) { + this.owner = other.owner; + } + this.createTime = other.createTime; + if (other.isSetFunctionType()) { + this.functionType = other.functionType; + } + } + + public Function deepCopy() { + return new Function(this); + } + + @Override + public void clear() { + this.functionName = null; + this.dbName = null; + this.className = null; + this.owner = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.functionType = null; + } + + public String getFunctionName() { + return this.functionName; + } + + public void setFunctionName(String functionName) { + this.functionName = functionName; + } + + public void unsetFunctionName() { + this.functionName = null; + } + + /** Returns true if field functionName is set (has been assigned a value) and false otherwise */ + public boolean isSetFunctionName() { + return this.functionName != null; + } + + public void setFunctionNameIsSet(boolean value) { + if (!value) { + this.functionName = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getClassName() { + return this.className; + } + + public void setClassName(String className) { + this.className = className; + } + + public void unsetClassName() { + this.className = null; + } + + /** Returns true if field className is set (has been assigned a value) and false otherwise */ + public boolean isSetClassName() { + return this.className != null; + } + + public void setClassNameIsSet(boolean value) { + if (!value) { + this.className = null; + } + } + + public String getOwner() { + return this.owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public void unsetOwner() { + this.owner = null; + } + + /** Returns true if field owner is set (has been assigned a value) and false otherwise */ + public boolean isSetOwner() { + return this.owner != null; + } + + public void setOwnerIsSet(boolean value) { + if (!value) { + this.owner = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public String getFunctionType() { + return this.functionType; + } + + public void setFunctionType(String functionType) { + this.functionType = functionType; + } + + public void unsetFunctionType() { + this.functionType = null; + } + + /** Returns true if field functionType is set (has been assigned a value) and false otherwise */ + public boolean isSetFunctionType() { + return this.functionType != null; + } + + public void setFunctionTypeIsSet(boolean value) { + if (!value) { + this.functionType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FUNCTION_NAME: + if (value == null) { + unsetFunctionName(); + } else { + setFunctionName((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case CLASS_NAME: + if (value == null) { + unsetClassName(); + } else { + setClassName((String)value); + } + break; + + case OWNER: + if (value == null) { + unsetOwner(); + } else { + setOwner((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case FUNCTION_TYPE: + if (value == null) { + unsetFunctionType(); + } else { + setFunctionType((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FUNCTION_NAME: + return getFunctionName(); + + case DB_NAME: + return getDbName(); + + case CLASS_NAME: + return getClassName(); + + case OWNER: + return getOwner(); + + case CREATE_TIME: + return Integer.valueOf(getCreateTime()); + + case FUNCTION_TYPE: + return getFunctionType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FUNCTION_NAME: + return isSetFunctionName(); + case DB_NAME: + return isSetDbName(); + case CLASS_NAME: + return isSetClassName(); + case OWNER: + return isSetOwner(); + case CREATE_TIME: + return isSetCreateTime(); + case FUNCTION_TYPE: + return isSetFunctionType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Function) + return this.equals((Function)that); + return false; + } + + public boolean equals(Function that) { + if (that == null) + return false; + + boolean this_present_functionName = true && this.isSetFunctionName(); + boolean that_present_functionName = true && that.isSetFunctionName(); + if (this_present_functionName || that_present_functionName) { + if (!(this_present_functionName && that_present_functionName)) + return false; + if (!this.functionName.equals(that.functionName)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_className = true && this.isSetClassName(); + boolean that_present_className = true && that.isSetClassName(); + if (this_present_className || that_present_className) { + if (!(this_present_className && that_present_className)) + return false; + if (!this.className.equals(that.className)) + return false; + } + + boolean this_present_owner = true && this.isSetOwner(); + boolean that_present_owner = true && that.isSetOwner(); + if (this_present_owner || that_present_owner) { + if (!(this_present_owner && that_present_owner)) + return false; + if (!this.owner.equals(that.owner)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_functionType = true && this.isSetFunctionType(); + boolean that_present_functionType = true && that.isSetFunctionType(); + if (this_present_functionType || that_present_functionType) { + if (!(this_present_functionType && that_present_functionType)) + return false; + if (!this.functionType.equals(that.functionType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_functionName = true && (isSetFunctionName()); + builder.append(present_functionName); + if (present_functionName) + builder.append(functionName); + + boolean present_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + boolean present_className = true && (isSetClassName()); + builder.append(present_className); + if (present_className) + builder.append(className); + + boolean present_owner = true && (isSetOwner()); + builder.append(present_owner); + if (present_owner) + builder.append(owner); + + boolean present_createTime = true; + builder.append(present_createTime); + if (present_createTime) + builder.append(createTime); + + boolean present_functionType = true && (isSetFunctionType()); + builder.append(present_functionType); + if (present_functionType) + builder.append(functionType); + + return builder.toHashCode(); + } + + public int compareTo(Function other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Function typedOther = (Function)other; + + lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(typedOther.isSetFunctionName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFunctionName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, typedOther.functionName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetClassName()).compareTo(typedOther.isSetClassName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetClassName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.className, typedOther.className); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwner()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, typedOther.owner); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFunctionType()).compareTo(typedOther.isSetFunctionType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFunctionType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionType, typedOther.functionType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Function("); + boolean first = true; + + sb.append("functionName:"); + if (this.functionName == null) { + sb.append("null"); + } else { + sb.append(this.functionName); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("className:"); + if (this.className == null) { + sb.append("null"); + } else { + sb.append(this.className); + } + first = false; + if (!first) sb.append(", "); + sb.append("owner:"); + if (this.owner == null) { + sb.append("null"); + } else { + sb.append(this.owner); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("functionType:"); + if (this.functionType == null) { + sb.append("null"); + } else { + sb.append(this.functionType); + } + 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 { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __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 FunctionStandardSchemeFactory implements SchemeFactory { + public FunctionStandardScheme getScheme() { + return new FunctionStandardScheme(); + } + } + + private static class FunctionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Function 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: // FUNCTION_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.functionName = iprot.readString(); + struct.setFunctionNameIsSet(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: // CLASS_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.className = iprot.readString(); + struct.setClassNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // 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 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: // FUNCTION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.functionType = iprot.readString(); + struct.setFunctionTypeIsSet(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, Function struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.functionName != null) { + oprot.writeFieldBegin(FUNCTION_NAME_FIELD_DESC); + oprot.writeString(struct.functionName); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.className != null) { + oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC); + oprot.writeString(struct.className); + 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(); + if (struct.functionType != null) { + oprot.writeFieldBegin(FUNCTION_TYPE_FIELD_DESC); + oprot.writeString(struct.functionType); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class FunctionTupleSchemeFactory implements SchemeFactory { + public FunctionTupleScheme getScheme() { + return new FunctionTupleScheme(); + } + } + + private static class FunctionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFunctionName()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetClassName()) { + optionals.set(2); + } + if (struct.isSetOwner()) { + optionals.set(3); + } + if (struct.isSetCreateTime()) { + optionals.set(4); + } + if (struct.isSetFunctionType()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetFunctionName()) { + oprot.writeString(struct.functionName); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetClassName()) { + oprot.writeString(struct.className); + } + if (struct.isSetOwner()) { + oprot.writeString(struct.owner); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetFunctionType()) { + oprot.writeString(struct.functionType); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.functionName = iprot.readString(); + struct.setFunctionNameIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.className = iprot.readString(); + struct.setClassNameIsSet(true); + } + if (incoming.get(3)) { + struct.owner = iprot.readString(); + struct.setOwnerIsSet(true); + } + if (incoming.get(4)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(5)) { + struct.functionType = iprot.readString(); + struct.setFunctionTypeIsSet(true); + } + } + } + +} + diff --git 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 index 997060f..b22b211 100644 --- 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 @@ -710,7 +710,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, HiveObjectRef struc struct.partValues = new ArrayList(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { - String _elem10; // required + String _elem10; // optional _elem10 = iprot.readString(); struct.partValues.add(_elem10); } @@ -853,7 +853,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, HiveObjectRef struct struct.partValues = new ArrayList(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { - String _elem15; // required + String _elem15; // optional _elem15 = iprot.readString(); struct.partValues.add(_elem15); } diff --git 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 index 4329d34..45589aa 100644 --- 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 @@ -945,7 +945,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Partition struct) t struct.values = new ArrayList(_list192.size); for (int _i193 = 0; _i193 < _list192.size; ++_i193) { - String _elem194; // required + String _elem194; // optional _elem194 = iprot.readString(); struct.values.add(_elem194); } @@ -1184,7 +1184,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Partition struct) th struct.values = new ArrayList(_list203.size); for (int _i204 = 0; _i204 < _list203.size; ++_i204) { - String _elem205; // required + String _elem205; // optional _elem205 = iprot.readString(); struct.values.add(_elem205); } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java index a4bdeaa..04229d5 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java @@ -439,7 +439,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsByExprRes struct.partitions = new ArrayList(_list256.size); for (int _i257 = 0; _i257 < _list256.size; ++_i257) { - Partition _elem258; // required + Partition _elem258; // optional _elem258 = new Partition(); _elem258.read(iprot); struct.partitions.add(_elem258); @@ -522,7 +522,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprResu struct.partitions = new ArrayList(_list261.size); for (int _i262 = 0; _i262 < _list261.size; ++_i262) { - Partition _elem263; // required + Partition _elem263; // optional _elem263 = new Partition(); _elem263.read(iprot); struct.partitions.add(_elem263); diff --git 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 index eea86e5..0c9518a 100644 --- 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 @@ -587,7 +587,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PrincipalPrivilegeS _val27 = new ArrayList(_list28.size); for (int _i29 = 0; _i29 < _list28.size; ++_i29) { - PrivilegeGrantInfo _elem30; // required + PrivilegeGrantInfo _elem30; // optional _elem30 = new PrivilegeGrantInfo(); _elem30.read(iprot); _val27.add(_elem30); @@ -618,7 +618,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PrincipalPrivilegeS _val34 = new ArrayList(_list35.size); for (int _i36 = 0; _i36 < _list35.size; ++_i36) { - PrivilegeGrantInfo _elem37; // required + PrivilegeGrantInfo _elem37; // optional _elem37 = new PrivilegeGrantInfo(); _elem37.read(iprot); _val34.add(_elem37); @@ -649,7 +649,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PrincipalPrivilegeS _val41 = new ArrayList(_list42.size); for (int _i43 = 0; _i43 < _list42.size; ++_i43) { - PrivilegeGrantInfo _elem44; // required + PrivilegeGrantInfo _elem44; // optional _elem44 = new PrivilegeGrantInfo(); _elem44.read(iprot); _val41.add(_elem44); @@ -834,7 +834,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PrincipalPrivilegeSe _val60 = new ArrayList(_list61.size); for (int _i62 = 0; _i62 < _list61.size; ++_i62) { - PrivilegeGrantInfo _elem63; // required + PrivilegeGrantInfo _elem63; // optional _elem63 = new PrivilegeGrantInfo(); _elem63.read(iprot); _val60.add(_elem63); @@ -859,7 +859,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PrincipalPrivilegeSe _val67 = new ArrayList(_list68.size); for (int _i69 = 0; _i69 < _list68.size; ++_i69) { - PrivilegeGrantInfo _elem70; // required + PrivilegeGrantInfo _elem70; // optional _elem70 = new PrivilegeGrantInfo(); _elem70.read(iprot); _val67.add(_elem70); @@ -884,7 +884,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PrincipalPrivilegeSe _val74 = new ArrayList(_list75.size); for (int _i76 = 0; _i76 < _list75.size; ++_i76) { - PrivilegeGrantInfo _elem77; // required + PrivilegeGrantInfo _elem77; // optional _elem77 = new PrivilegeGrantInfo(); _elem77.read(iprot); _val74.add(_elem77); diff --git 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 index a4687ad..4285ed8 100644 --- 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 @@ -350,7 +350,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PrivilegeBag struct struct.privileges = new ArrayList(_list16.size); for (int _i17 = 0; _i17 < _list16.size; ++_i17) { - HiveObjectPrivilege _elem18; // required + HiveObjectPrivilege _elem18; // optional _elem18 = new HiveObjectPrivilege(); _elem18.read(iprot); struct.privileges.add(_elem18); @@ -430,7 +430,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PrivilegeBag struct) struct.privileges = new ArrayList(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { - HiveObjectPrivilege _elem23; // required + HiveObjectPrivilege _elem23; // optional _elem23 = new HiveObjectPrivilege(); _elem23.read(iprot); struct.privileges.add(_elem23); diff --git 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 index f6af8d9..c62a828 100644 --- 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 @@ -456,7 +456,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Schema struct) thro struct.fieldSchemas = new ArrayList(_list228.size); for (int _i229 = 0; _i229 < _list228.size; ++_i229) { - FieldSchema _elem230; // required + FieldSchema _elem230; // optional _elem230 = new FieldSchema(); _elem230.read(iprot); struct.fieldSchemas.add(_elem230); @@ -582,7 +582,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Schema struct) throw struct.fieldSchemas = new ArrayList(_list239.size); for (int _i240 = 0; _i240 < _list239.size; ++_i240) { - FieldSchema _elem241; // required + FieldSchema _elem241; // optional _elem241 = new FieldSchema(); _elem241.read(iprot); struct.fieldSchemas.add(_elem241); diff --git 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 index 2ad42a2..98d6f81 100644 --- 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 @@ -566,7 +566,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) struct.skewedColNames = new ArrayList(_list98.size); for (int _i99 = 0; _i99 < _list98.size; ++_i99) { - String _elem100; // required + String _elem100; // optional _elem100 = iprot.readString(); struct.skewedColNames.add(_elem100); } @@ -584,13 +584,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) struct.skewedColValues = new ArrayList>(_list101.size); for (int _i102 = 0; _i102 < _list101.size; ++_i102) { - List _elem103; // required + List _elem103; // optional { org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); _elem103 = new ArrayList(_list104.size); for (int _i105 = 0; _i105 < _list104.size; ++_i105) { - String _elem106; // required + String _elem106; // optional _elem106 = iprot.readString(); _elem103.add(_elem106); } @@ -619,7 +619,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) _key109 = new ArrayList(_list111.size); for (int _i112 = 0; _i112 < _list111.size; ++_i112) { - String _elem113; // required + String _elem113; // optional _elem113 = iprot.readString(); _key109.add(_elem113); } @@ -779,7 +779,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) t struct.skewedColNames = new ArrayList(_list124.size); for (int _i125 = 0; _i125 < _list124.size; ++_i125) { - String _elem126; // required + String _elem126; // optional _elem126 = iprot.readString(); struct.skewedColNames.add(_elem126); } @@ -792,13 +792,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) t struct.skewedColValues = new ArrayList>(_list127.size); for (int _i128 = 0; _i128 < _list127.size; ++_i128) { - List _elem129; // required + List _elem129; // optional { 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 + String _elem132; // optional _elem132 = iprot.readString(); _elem129.add(_elem132); } @@ -821,7 +821,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) t _key135 = new ArrayList(_list137.size); for (int _i138 = 0; _i138 < _list137.size; ++_i138) { - String _elem139; // required + String _elem139; // optional _elem139 = iprot.readString(); _key135.add(_elem139); } diff --git 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 index 0a2f2c2..a2be1c5 100644 --- 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 @@ -1304,7 +1304,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, StorageDescriptor s struct.cols = new ArrayList(_list140.size); for (int _i141 = 0; _i141 < _list140.size; ++_i141) { - FieldSchema _elem142; // required + FieldSchema _elem142; // optional _elem142 = new FieldSchema(); _elem142.read(iprot); struct.cols.add(_elem142); @@ -1372,7 +1372,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, StorageDescriptor s struct.bucketCols = new ArrayList(_list143.size); for (int _i144 = 0; _i144 < _list143.size; ++_i144) { - String _elem145; // required + String _elem145; // optional _elem145 = iprot.readString(); struct.bucketCols.add(_elem145); } @@ -1390,7 +1390,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, StorageDescriptor s struct.sortCols = new ArrayList(_list146.size); for (int _i147 = 0; _i147 < _list146.size; ++_i147) { - Order _elem148; // required + Order _elem148; // optional _elem148 = new Order(); _elem148.read(iprot); struct.sortCols.add(_elem148); @@ -1667,7 +1667,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor st struct.cols = new ArrayList(_list161.size); for (int _i162 = 0; _i162 < _list161.size; ++_i162) { - FieldSchema _elem163; // required + FieldSchema _elem163; // optional _elem163 = new FieldSchema(); _elem163.read(iprot); struct.cols.add(_elem163); @@ -1706,7 +1706,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor st struct.bucketCols = new ArrayList(_list164.size); for (int _i165 = 0; _i165 < _list164.size; ++_i165) { - String _elem166; // required + String _elem166; // optional _elem166 = iprot.readString(); struct.bucketCols.add(_elem166); } @@ -1719,7 +1719,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor st struct.sortCols = new ArrayList(_list167.size); for (int _i168 = 0; _i168 < _list167.size; ++_i168) { - Order _elem169; // required + Order _elem169; // optional _elem169 = new Order(); _elem169.read(iprot); struct.sortCols.add(_elem169); diff --git 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 index 377cafe..aa71e86 100644 --- 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 @@ -1403,7 +1403,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw struct.partitionKeys = new ArrayList(_list174.size); for (int _i175 = 0; _i175 < _list174.size; ++_i175) { - FieldSchema _elem176; // required + FieldSchema _elem176; // optional _elem176 = new FieldSchema(); _elem176.read(iprot); struct.partitionKeys.add(_elem176); @@ -1708,7 +1708,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws struct.partitionKeys = new ArrayList(_list185.size); for (int _i186 = 0; _i186 < _list185.size; ++_i186) { - FieldSchema _elem187; // required + FieldSchema _elem187; // optional _elem187 = new FieldSchema(); _elem187.read(iprot); struct.partitionKeys.add(_elem187); diff --git 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 index 41b4a63..400d1b2 100644 --- 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 @@ -178,6 +178,18 @@ public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException; + + public List get_all_functions(String dbName) throws MetaException, org.apache.thrift.TException; + + public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException; public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException; @@ -350,6 +362,18 @@ public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_all_functions(String dbName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -2600,6 +2624,176 @@ public boolean recv_delete_table_column_statistics() throws NoSuchObjectExceptio throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); } + public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_create_function(func); + recv_create_function(); + } + + public void send_create_function(Function func) throws org.apache.thrift.TException + { + create_function_args args = new create_function_args(); + args.setFunc(func); + sendBase("create_function", args); + } + + public void recv_create_function() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + create_function_result result = new create_function_result(); + receiveBase(result, "create_function"); + 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 void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_function(dbName, funcName); + recv_drop_function(); + } + + public void send_drop_function(String dbName, String funcName) throws org.apache.thrift.TException + { + drop_function_args args = new drop_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + sendBase("drop_function", args); + } + + public void recv_drop_function() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_function_result result = new drop_function_result(); + receiveBase(result, "drop_function"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_function(dbName, funcName, newFunc); + recv_alter_function(); + } + + public void send_alter_function(String dbName, String funcName, Function newFunc) throws org.apache.thrift.TException + { + alter_function_args args = new alter_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.setNewFunc(newFunc); + sendBase("alter_function", args); + } + + public void recv_alter_function() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_function_result result = new alter_function_result(); + receiveBase(result, "alter_function"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException + { + send_get_functions(dbName, pattern); + return recv_get_functions(); + } + + public void send_get_functions(String dbName, String pattern) throws org.apache.thrift.TException + { + get_functions_args args = new get_functions_args(); + args.setDbName(dbName); + args.setPattern(pattern); + sendBase("get_functions", args); + } + + public List recv_get_functions() throws MetaException, org.apache.thrift.TException + { + get_functions_result result = new get_functions_result(); + receiveBase(result, "get_functions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_functions failed: unknown result"); + } + + public List get_all_functions(String dbName) throws MetaException, org.apache.thrift.TException + { + send_get_all_functions(dbName); + return recv_get_all_functions(); + } + + public void send_get_all_functions(String dbName) throws org.apache.thrift.TException + { + get_all_functions_args args = new get_all_functions_args(); + args.setDbName(dbName); + sendBase("get_all_functions", args); + } + + public List recv_get_all_functions() throws MetaException, org.apache.thrift.TException + { + get_all_functions_result result = new get_all_functions_result(); + receiveBase(result, "get_all_functions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_functions failed: unknown result"); + } + + public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_function(dbName, funcName); + return recv_get_function(); + } + + public void send_get_function(String dbName, String funcName) throws org.apache.thrift.TException + { + get_function_args args = new get_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + sendBase("get_function", args); + } + + public Function recv_get_function() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_function_result result = new get_function_result(); + receiveBase(result, "get_function"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_function failed: unknown result"); + } + public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException { send_create_role(role); @@ -5598,6 +5792,213 @@ public boolean getResult() throws NoSuchObjectException, MetaException, InvalidO } } + public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_function_call method_call = new create_function_call(func, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private Function func; + public create_function_call(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.func = func; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_function_args args = new create_function_args(); + args.setFunc(func); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_function(); + } + } + + public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_function_call method_call = new drop_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String funcName; + public drop_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.funcName = funcName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_function_args args = new drop_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_function(); + } + } + + public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_function_call method_call = new alter_function_call(dbName, funcName, newFunc, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String funcName; + private Function newFunc; + public alter_function_call(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.funcName = funcName; + this.newFunc = newFunc; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_function_args args = new alter_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.setNewFunc(newFunc); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_function(); + } + } + + public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_functions_call method_call = new get_functions_call(dbName, pattern, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_functions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String pattern; + public get_functions_call(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.pattern = pattern; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_functions_args args = new get_functions_args(); + args.setDbName(dbName); + args.setPattern(pattern); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_functions(); + } + } + + public void get_all_functions(String dbName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_all_functions_call method_call = new get_all_functions_call(dbName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_all_functions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + public get_all_functions_call(String dbName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_all_functions_args args = new get_all_functions_args(); + args.setDbName(dbName); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_all_functions(); + } + } + + public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_function_call method_call = new get_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String funcName; + public get_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.funcName = funcName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_function_args args = new get_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.write(prot); + prot.writeMessageEnd(); + } + + public Function getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_function(); + } + } + public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_role_call method_call = new create_role_call(role, resultHandler, this, ___protocolFactory, ___transport); @@ -6168,6 +6569,12 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { + public create_function() { + super("create_function"); + } + + public create_function_args getEmptyArgsInstance() { + return new create_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public create_function_result getResult(I iface, create_function_args args) throws org.apache.thrift.TException { + create_function_result result = new create_function_result(); + try { + iface.create_function(args.func); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class drop_function extends org.apache.thrift.ProcessFunction { + public drop_function() { + super("drop_function"); + } + + public drop_function_args getEmptyArgsInstance() { + return new drop_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public drop_function_result getResult(I iface, drop_function_args args) throws org.apache.thrift.TException { + drop_function_result result = new drop_function_result(); + try { + iface.drop_function(args.dbName, args.funcName); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class alter_function extends org.apache.thrift.ProcessFunction { + public alter_function() { + super("alter_function"); + } + + public alter_function_args getEmptyArgsInstance() { + return new alter_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public alter_function_result getResult(I iface, alter_function_args args) throws org.apache.thrift.TException { + alter_function_result result = new alter_function_result(); + try { + iface.alter_function(args.dbName, args.funcName, args.newFunc); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_functions extends org.apache.thrift.ProcessFunction { + public get_functions() { + super("get_functions"); + } + + public get_functions_args getEmptyArgsInstance() { + return new get_functions_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_functions_result getResult(I iface, get_functions_args args) throws org.apache.thrift.TException { + get_functions_result result = new get_functions_result(); + try { + result.success = iface.get_functions(args.dbName, args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_all_functions extends org.apache.thrift.ProcessFunction { + public get_all_functions() { + super("get_all_functions"); + } + + public get_all_functions_args getEmptyArgsInstance() { + return new get_all_functions_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_all_functions_result getResult(I iface, get_all_functions_args args) throws org.apache.thrift.TException { + get_all_functions_result result = new get_all_functions_result(); + try { + result.success = iface.get_all_functions(args.dbName); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_function extends org.apache.thrift.ProcessFunction { + public get_function() { + super("get_function"); + } + + public get_function_args getEmptyArgsInstance() { + return new get_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_function_result getResult(I iface, get_function_args args) throws org.apache.thrift.TException { + get_function_result result = new get_function_result(); + try { + result.success = iface.get_function(args.dbName, args.funcName); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + public static class create_role extends org.apache.thrift.ProcessFunction { public create_role() { super("create_role"); @@ -12182,7 +12745,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_resul struct.success = new ArrayList(_list280.size); for (int _i281 = 0; _i281 < _list280.size; ++_i281) { - String _elem282; // required + String _elem282; // optional _elem282 = iprot.readString(); struct.success.add(_elem282); } @@ -12281,7 +12844,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct.success = new ArrayList(_list285.size); for (int _i286 = 0; _i286 < _list285.size; ++_i286) { - String _elem287; // required + String _elem287; // optional _elem287 = iprot.readString(); struct.success.add(_elem287); } @@ -12944,7 +13507,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_r struct.success = new ArrayList(_list288.size); for (int _i289 = 0; _i289 < _list288.size; ++_i289) { - String _elem290; // required + String _elem290; // optional _elem290 = iprot.readString(); struct.success.add(_elem290); } @@ -13043,7 +13606,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_re struct.success = new ArrayList(_list293.size); for (int _i294 = 0; _i294 < _list293.size; ++_i294) { - String _elem295; // required + String _elem295; // optional _elem295 = iprot.readString(); struct.success.add(_elem295); } @@ -18804,7 +19367,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_result s struct.success = new ArrayList(_list306.size); for (int _i307 = 0; _i307 < _list306.size; ++_i307) { - FieldSchema _elem308; // required + FieldSchema _elem308; // optional _elem308 = new FieldSchema(); _elem308.read(iprot); struct.success.add(_elem308); @@ -18944,7 +19507,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_result st struct.success = new ArrayList(_list311.size); for (int _i312 = 0; _i312 < _list311.size; ++_i312) { - FieldSchema _elem313; // required + FieldSchema _elem313; // optional _elem313 = new FieldSchema(); _elem313.read(iprot); struct.success.add(_elem313); @@ -19996,7 +20559,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_result s struct.success = new ArrayList(_list314.size); for (int _i315 = 0; _i315 < _list314.size; ++_i315) { - FieldSchema _elem316; // required + FieldSchema _elem316; // optional _elem316 = new FieldSchema(); _elem316.read(iprot); struct.success.add(_elem316); @@ -20136,7 +20699,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_result st struct.success = new ArrayList(_list319.size); for (int _i320 = 0; _i320 < _list319.size; ++_i320) { - FieldSchema _elem321; // required + FieldSchema _elem321; // optional _elem321 = new FieldSchema(); _elem321.read(iprot); struct.success.add(_elem321); @@ -25386,7 +25949,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_result s struct.success = new ArrayList(_list322.size); for (int _i323 = 0; _i323 < _list322.size; ++_i323) { - String _elem324; // required + String _elem324; // optional _elem324 = iprot.readString(); struct.success.add(_elem324); } @@ -25485,7 +26048,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_result st struct.success = new ArrayList(_list327.size); for (int _i328 = 0; _i328 < _list327.size; ++_i328) { - String _elem329; // required + String _elem329; // optional _elem329 = iprot.readString(); struct.success.add(_elem329); } @@ -26260,7 +26823,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_resu struct.success = new ArrayList(_list330.size); for (int _i331 = 0; _i331 < _list330.size; ++_i331) { - String _elem332; // required + String _elem332; // optional _elem332 = iprot.readString(); struct.success.add(_elem332); } @@ -26359,7 +26922,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_resul struct.success = new ArrayList(_list335.size); for (int _i336 = 0; _i336 < _list335.size; ++_i336) { - String _elem337; // required + String _elem337; // optional _elem337 = iprot.readString(); struct.success.add(_elem337); } @@ -27821,7 +28384,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_b struct.tbl_names = new ArrayList(_list338.size); for (int _i339 = 0; _i339 < _list338.size; ++_i339) { - String _elem340; // required + String _elem340; // optional _elem340 = iprot.readString(); struct.tbl_names.add(_elem340); } @@ -27915,7 +28478,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by struct.tbl_names = new ArrayList(_list343.size); for (int _i344 = 0; _i344 < _list343.size; ++_i344) { - String _elem345; // required + String _elem345; // optional _elem345 = iprot.readString(); struct.tbl_names.add(_elem345); } @@ -28489,7 +29052,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_b struct.success = new ArrayList
(_list346.size); for (int _i347 = 0; _i347 < _list346.size; ++_i347) { - Table _elem348; // required + Table _elem348; // optional _elem348 = new Table(); _elem348.read(iprot); struct.success.add(_elem348); @@ -28629,7 +29192,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by struct.success = new ArrayList
(_list351.size); for (int _i352 = 0; _i352 < _list351.size; ++_i352) { - Table _elem353; // required + Table _elem353; // optional _elem353 = new Table(); _elem353.read(iprot); struct.success.add(_elem353); @@ -29785,7 +30348,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_ struct.success = new ArrayList(_list354.size); for (int _i355 = 0; _i355 < _list354.size; ++_i355) { - String _elem356; // required + String _elem356; // optional _elem356 = iprot.readString(); struct.success.add(_elem356); } @@ -29924,7 +30487,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_f struct.success = new ArrayList(_list359.size); for (int _i360 = 0; _i360 < _list359.size; ++_i360) { - String _elem361; // required + String _elem361; // optional _elem361 = iprot.readString(); struct.success.add(_elem361); } @@ -34650,7 +35213,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_args struct.new_parts = new ArrayList(_list362.size); for (int _i363 = 0; _i363 < _list362.size; ++_i363) { - Partition _elem364; // required + Partition _elem364; // optional _elem364 = new Partition(); _elem364.read(iprot); struct.new_parts.add(_elem364); @@ -34730,7 +35293,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct.new_parts = new ArrayList(_list367.size); for (int _i368 = 0; _i368 < _list367.size; ++_i368) { - Partition _elem369; // required + Partition _elem369; // optional _elem369 = new Partition(); _elem369.read(iprot); struct.new_parts.add(_elem369); @@ -35916,7 +36479,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_ar struct.part_vals = new ArrayList(_list370.size); for (int _i371 = 0; _i371 < _list370.size; ++_i371) { - String _elem372; // required + String _elem372; // optional _elem372 = iprot.readString(); struct.part_vals.add(_elem372); } @@ -36025,7 +36588,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_arg struct.part_vals = new ArrayList(_list375.size); for (int _i376 = 0; _i376 < _list375.size; ++_i376) { - String _elem377; // required + String _elem377; // optional _elem377 = iprot.readString(); struct.part_vals.add(_elem377); } @@ -38343,7 +38906,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_wi struct.part_vals = new ArrayList(_list378.size); for (int _i379 = 0; _i379 < _list378.size; ++_i379) { - String _elem380; // required + String _elem380; // optional _elem380 = iprot.readString(); struct.part_vals.add(_elem380); } @@ -38472,7 +39035,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_wit struct.part_vals = new ArrayList(_list383.size); for (int _i384 = 0; _i384 < _list383.size; ++_i384) { - String _elem385; // required + String _elem385; // optional _elem385 = iprot.readString(); struct.part_vals.add(_elem385); } @@ -42351,7 +42914,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_args struct.part_vals = new ArrayList(_list386.size); for (int _i387 = 0; _i387 < _list386.size; ++_i387) { - String _elem388; // required + String _elem388; // optional _elem388 = iprot.readString(); struct.part_vals.add(_elem388); } @@ -42477,7 +43040,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct.part_vals = new ArrayList(_list391.size); for (int _i392 = 0; _i392 < _list391.size; ++_i392) { - String _elem393; // required + String _elem393; // optional _elem393 = iprot.readString(); struct.part_vals.add(_elem393); } @@ -43725,7 +44288,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_with struct.part_vals = new ArrayList(_list394.size); for (int _i395 = 0; _i395 < _list394.size; ++_i395) { - String _elem396; // required + String _elem396; // optional _elem396 = iprot.readString(); struct.part_vals.add(_elem396); } @@ -43871,7 +44434,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_ struct.part_vals = new ArrayList(_list399.size); for (int _i400 = 0; _i400 < _list399.size; ++_i400) { - String _elem401; // required + String _elem401; // optional _elem401 = iprot.readString(); struct.part_vals.add(_elem401); } @@ -47544,7 +48107,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_args struct.part_vals = new ArrayList(_list402.size); for (int _i403 = 0; _i403 < _list402.size; ++_i403) { - String _elem404; // required + String _elem404; // optional _elem404 = iprot.readString(); struct.part_vals.add(_elem404); } @@ -47653,7 +48216,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_args s struct.part_vals = new ArrayList(_list407.size); for (int _i408 = 0; _i408 < _list407.size; ++_i408) { - String _elem409; // required + String _elem409; // optional _elem409 = iprot.readString(); struct.part_vals.add(_elem409); } @@ -50543,7 +51106,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_ struct.part_vals = new ArrayList(_list420.size); for (int _i421 = 0; _i421 < _list420.size; ++_i421) { - String _elem422; // required + String _elem422; // optional _elem422 = iprot.readString(); struct.part_vals.add(_elem422); } @@ -50569,7 +51132,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_ struct.group_names = new ArrayList(_list423.size); for (int _i424 = 0; _i424 < _list423.size; ++_i424) { - String _elem425; // required + String _elem425; // optional _elem425 = iprot.readString(); struct.group_names.add(_elem425); } @@ -50713,7 +51276,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_a struct.part_vals = new ArrayList(_list430.size); for (int _i431 = 0; _i431 < _list430.size; ++_i431) { - String _elem432; // required + String _elem432; // optional _elem432 = iprot.readString(); struct.part_vals.add(_elem432); } @@ -50730,7 +51293,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_a struct.group_names = new ArrayList(_list433.size); for (int _i434 = 0; _i434 < _list433.size; ++_i434) { - String _elem435; // required + String _elem435; // optional _elem435 = iprot.readString(); struct.group_names.add(_elem435); } @@ -53505,7 +54068,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_resu struct.success = new ArrayList(_list436.size); for (int _i437 = 0; _i437 < _list436.size; ++_i437) { - Partition _elem438; // required + Partition _elem438; // optional _elem438 = new Partition(); _elem438.read(iprot); struct.success.add(_elem438); @@ -53625,7 +54188,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_resul struct.success = new ArrayList(_list441.size); for (int _i442 = 0; _i442 < _list441.size; ++_i442) { - Partition _elem443; // required + Partition _elem443; // optional _elem443 = new Partition(); _elem443.read(iprot); struct.success.add(_elem443); @@ -54325,7 +54888,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with struct.group_names = new ArrayList(_list444.size); for (int _i445 = 0; _i445 < _list444.size; ++_i445) { - String _elem446; // required + String _elem446; // optional _elem446 = iprot.readString(); struct.group_names.add(_elem446); } @@ -54462,7 +55025,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_ struct.group_names = new ArrayList(_list449.size); for (int _i450 = 0; _i450 < _list449.size; ++_i450) { - String _elem451; // required + String _elem451; // optional _elem451 = iprot.readString(); struct.group_names.add(_elem451); } @@ -54955,7 +55518,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with struct.success = new ArrayList(_list452.size); for (int _i453 = 0; _i453 < _list452.size; ++_i453) { - Partition _elem454; // required + Partition _elem454; // optional _elem454 = new Partition(); _elem454.read(iprot); struct.success.add(_elem454); @@ -55075,7 +55638,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_ struct.success = new ArrayList(_list457.size); for (int _i458 = 0; _i458 < _list457.size; ++_i458) { - Partition _elem459; // required + Partition _elem459; // optional _elem459 = new Partition(); _elem459.read(iprot); struct.success.add(_elem459); @@ -56064,7 +56627,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names struct.success = new ArrayList(_list460.size); for (int _i461 = 0; _i461 < _list460.size; ++_i461) { - String _elem462; // required + String _elem462; // optional _elem462 = iprot.readString(); struct.success.add(_elem462); } @@ -56163,7 +56726,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ struct.success = new ArrayList(_list465.size); for (int _i466 = 0; _i466 < _list465.size; ++_i466) { - String _elem467; // required + String _elem467; // optional _elem467 = iprot.readString(); struct.success.add(_elem467); } @@ -56760,7 +57323,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_a struct.part_vals = new ArrayList(_list468.size); for (int _i469 = 0; _i469 < _list468.size; ++_i469) { - String _elem470; // required + String _elem470; // optional _elem470 = iprot.readString(); struct.part_vals.add(_elem470); } @@ -56886,7 +57449,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_ar struct.part_vals = new ArrayList(_list473.size); for (int _i474 = 0; _i474 < _list473.size; ++_i474) { - String _elem475; // required + String _elem475; // optional _elem475 = iprot.readString(); struct.part_vals.add(_elem475); } @@ -57383,7 +57946,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_r struct.success = new ArrayList(_list476.size); for (int _i477 = 0; _i477 < _list476.size; ++_i477) { - Partition _elem478; // required + Partition _elem478; // optional _elem478 = new Partition(); _elem478.read(iprot); struct.success.add(_elem478); @@ -57503,7 +58066,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_re struct.success = new ArrayList(_list481.size); for (int _i482 = 0; _i482 < _list481.size; ++_i482) { - Partition _elem483; // required + Partition _elem483; // optional _elem483 = new Partition(); _elem483.read(iprot); struct.success.add(_elem483); @@ -58288,7 +58851,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_w struct.part_vals = new ArrayList(_list484.size); for (int _i485 = 0; _i485 < _list484.size; ++_i485) { - String _elem486; // required + String _elem486; // optional _elem486 = iprot.readString(); struct.part_vals.add(_elem486); } @@ -58322,7 +58885,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_w struct.group_names = new ArrayList(_list487.size); for (int _i488 = 0; _i488 < _list487.size; ++_i488) { - String _elem489; // required + String _elem489; // optional _elem489 = iprot.readString(); struct.group_names.add(_elem489); } @@ -58475,7 +59038,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_wi struct.part_vals = new ArrayList(_list494.size); for (int _i495 = 0; _i495 < _list494.size; ++_i495) { - String _elem496; // required + String _elem496; // optional _elem496 = iprot.readString(); struct.part_vals.add(_elem496); } @@ -58496,7 +59059,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_wi struct.group_names = new ArrayList(_list497.size); for (int _i498 = 0; _i498 < _list497.size; ++_i498) { - String _elem499; // required + String _elem499; // optional _elem499 = iprot.readString(); struct.group_names.add(_elem499); } @@ -58989,7 +59552,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_w struct.success = new ArrayList(_list500.size); for (int _i501 = 0; _i501 < _list500.size; ++_i501) { - Partition _elem502; // required + Partition _elem502; // optional _elem502 = new Partition(); _elem502.read(iprot); struct.success.add(_elem502); @@ -59109,7 +59672,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_wi struct.success = new ArrayList(_list505.size); for (int _i506 = 0; _i506 < _list505.size; ++_i506) { - Partition _elem507; // required + Partition _elem507; // optional _elem507 = new Partition(); _elem507.read(iprot); struct.success.add(_elem507); @@ -59712,7 +60275,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names struct.part_vals = new ArrayList(_list508.size); for (int _i509 = 0; _i509 < _list508.size; ++_i509) { - String _elem510; // required + String _elem510; // optional _elem510 = iprot.readString(); struct.part_vals.add(_elem510); } @@ -59838,7 +60401,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ struct.part_vals = new ArrayList(_list513.size); for (int _i514 = 0; _i514 < _list513.size; ++_i514) { - String _elem515; // required + String _elem515; // optional _elem515 = iprot.readString(); struct.part_vals.add(_elem515); } @@ -60335,7 +60898,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names struct.success = new ArrayList(_list516.size); for (int _i517 = 0; _i517 < _list516.size; ++_i517) { - String _elem518; // required + String _elem518; // optional _elem518 = iprot.readString(); struct.success.add(_elem518); } @@ -60454,7 +61017,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ struct.success = new ArrayList(_list521.size); for (int _i522 = 0; _i522 < _list521.size; ++_i522) { - String _elem523; // required + String _elem523; // optional _elem523 = iprot.readString(); struct.success.add(_elem523); } @@ -61627,7 +62190,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_f struct.success = new ArrayList(_list524.size); for (int _i525 = 0; _i525 < _list524.size; ++_i525) { - Partition _elem526; // required + Partition _elem526; // optional _elem526 = new Partition(); _elem526.read(iprot); struct.success.add(_elem526); @@ -61747,7 +62310,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_fi struct.success = new ArrayList(_list529.size); for (int _i530 = 0; _i530 < _list529.size; ++_i530) { - Partition _elem531; // required + Partition _elem531; // optional _elem531 = new Partition(); _elem531.read(iprot); struct.success.add(_elem531); @@ -63205,7 +63768,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_n struct.names = new ArrayList(_list532.size); for (int _i533 = 0; _i533 < _list532.size; ++_i533) { - String _elem534; // required + String _elem534; // optional _elem534 = iprot.readString(); struct.names.add(_elem534); } @@ -63314,7 +63877,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_na struct.names = new ArrayList(_list537.size); for (int _i538 = 0; _i538 < _list537.size; ++_i538) { - String _elem539; // required + String _elem539; // optional _elem539 = iprot.readString(); struct.names.add(_elem539); } @@ -63807,7 +64370,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_n struct.success = new ArrayList(_list540.size); for (int _i541 = 0; _i541 < _list540.size; ++_i541) { - Partition _elem542; // required + Partition _elem542; // optional _elem542 = new Partition(); _elem542.read(iprot); struct.success.add(_elem542); @@ -63927,7 +64490,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_na struct.success = new ArrayList(_list545.size); for (int _i546 = 0; _i546 < _list545.size; ++_i546) { - Partition _elem547; // required + Partition _elem547; // optional _elem547 = new Partition(); _elem547.read(iprot); struct.success.add(_elem547); @@ -65484,7 +66047,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_ar struct.new_parts = new ArrayList(_list548.size); for (int _i549 = 0; _i549 < _list548.size; ++_i549) { - Partition _elem550; // required + Partition _elem550; // optional _elem550 = new Partition(); _elem550.read(iprot); struct.new_parts.add(_elem550); @@ -65594,7 +66157,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_arg struct.new_parts = new ArrayList(_list553.size); for (int _i554 = 0; _i554 < _list553.size; ++_i554) { - Partition _elem555; // required + Partition _elem555; // optional _elem555 = new Partition(); _elem555.read(iprot); struct.new_parts.add(_elem555); @@ -67800,7 +68363,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_ar struct.part_vals = new ArrayList(_list556.size); for (int _i557 = 0; _i557 < _list556.size; ++_i557) { - String _elem558; // required + String _elem558; // optional _elem558 = iprot.readString(); struct.part_vals.add(_elem558); } @@ -67929,7 +68492,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_arg struct.part_vals = new ArrayList(_list561.size); for (int _i562 = 0; _i562 < _list561.size; ++_i562) { - String _elem563; // required + String _elem563; // optional _elem563 = iprot.readString(); struct.part_vals.add(_elem563); } @@ -68812,7 +69375,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_ struct.part_vals = new ArrayList(_list564.size); for (int _i565 = 0; _i565 < _list564.size; ++_i565) { - String _elem566; // required + String _elem566; // optional _elem566 = iprot.readString(); struct.part_vals.add(_elem566); } @@ -68908,7 +69471,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_has_v struct.part_vals = new ArrayList(_list569.size); for (int _i570 = 0; _i570 < _list569.size; ++_i570) { - String _elem571; // required + String _elem571; // optional _elem571 = iprot.readString(); struct.part_vals.add(_elem571); } @@ -71072,7 +71635,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_v struct.success = new ArrayList(_list572.size); for (int _i573 = 0; _i573 < _list572.size; ++_i573) { - String _elem574; // required + String _elem574; // optional _elem574 = iprot.readString(); struct.success.add(_elem574); } @@ -71171,7 +71734,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_va struct.success = new ArrayList(_list577.size); for (int _i578 = 0; _i578 < _list577.size; ++_i578) { - String _elem579; // required + String _elem579; // optional _elem579 = iprot.readString(); struct.success.add(_elem579); } @@ -81167,7 +81730,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_result struct.success = new ArrayList(_list610.size); for (int _i611 = 0; _i611 < _list610.size; ++_i611) { - Index _elem612; // required + Index _elem612; // optional _elem612 = new Index(); _elem612.read(iprot); struct.success.add(_elem612); @@ -81287,7 +81850,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_result s struct.success = new ArrayList(_list615.size); for (int _i616 = 0; _i616 < _list615.size; ++_i616) { - Index _elem617; // required + Index _elem617; // optional _elem617 = new Index(); _elem617.read(iprot); struct.success.add(_elem617); @@ -82276,7 +82839,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_res struct.success = new ArrayList(_list618.size); for (int _i619 = 0; _i619 < _list618.size; ++_i619) { - String _elem620; // required + String _elem620; // optional _elem620 = iprot.readString(); struct.success.add(_elem620); } @@ -82375,7 +82938,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_resu struct.success = new ArrayList(_list623.size); for (int _i624 = 0; _i624 < _list623.size; ++_i624) { - String _elem625; // required + String _elem625; // optional _elem625 = iprot.readString(); struct.success.add(_elem625); } @@ -90292,6 +90855,5901 @@ public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_ } + public static class create_function_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("create_function_args"); + + private static final org.apache.thrift.protocol.TField FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("func", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_function_argsTupleSchemeFactory()); + } + + private Function func; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FUNC((short)1, "func"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FUNC + return FUNC; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.FUNC, new org.apache.thrift.meta_data.FieldMetaData("func", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_function_args.class, metaDataMap); + } + + public create_function_args() { + } + + public create_function_args( + Function func) + { + this(); + this.func = func; + } + + /** + * Performs a deep copy on other. + */ + public create_function_args(create_function_args other) { + if (other.isSetFunc()) { + this.func = new Function(other.func); + } + } + + public create_function_args deepCopy() { + return new create_function_args(this); + } + + @Override + public void clear() { + this.func = null; + } + + public Function getFunc() { + return this.func; + } + + public void setFunc(Function func) { + this.func = func; + } + + public void unsetFunc() { + this.func = null; + } + + /** Returns true if field func is set (has been assigned a value) and false otherwise */ + public boolean isSetFunc() { + return this.func != null; + } + + public void setFuncIsSet(boolean value) { + if (!value) { + this.func = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FUNC: + if (value == null) { + unsetFunc(); + } else { + setFunc((Function)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FUNC: + return getFunc(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FUNC: + return isSetFunc(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_function_args) + return this.equals((create_function_args)that); + return false; + } + + public boolean equals(create_function_args that) { + if (that == null) + return false; + + boolean this_present_func = true && this.isSetFunc(); + boolean that_present_func = true && that.isSetFunc(); + if (this_present_func || that_present_func) { + if (!(this_present_func && that_present_func)) + return false; + if (!this.func.equals(that.func)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_func = true && (isSetFunc()); + builder.append(present_func); + if (present_func) + builder.append(func); + + return builder.toHashCode(); + } + + public int compareTo(create_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_function_args typedOther = (create_function_args)other; + + lastComparison = Boolean.valueOf(isSetFunc()).compareTo(typedOther.isSetFunc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFunc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.func, typedOther.func); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_function_args("); + boolean first = true; + + sb.append("func:"); + if (this.func == null) { + sb.append("null"); + } else { + sb.append(this.func); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (func != null) { + func.validate(); + } + } + + 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 create_function_argsStandardSchemeFactory implements SchemeFactory { + public create_function_argsStandardScheme getScheme() { + return new create_function_argsStandardScheme(); + } + } + + private static class create_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_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: // FUNC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.func = new Function(); + struct.func.read(iprot); + struct.setFuncIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.func != null) { + oprot.writeFieldBegin(FUNC_FIELD_DESC); + struct.func.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_function_argsTupleSchemeFactory implements SchemeFactory { + public create_function_argsTupleScheme getScheme() { + return new create_function_argsTupleScheme(); + } + } + + private static class create_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFunc()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetFunc()) { + struct.func.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.func = new Function(); + struct.func.read(iprot); + struct.setFuncIsSet(true); + } + } + } + + } + + public static class create_function_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("create_function_result"); + + 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 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_function_resultTupleSchemeFactory()); + } + + private AlreadyExistsException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private NoSuchObjectException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_function_result.class, metaDataMap); + } + + public create_function_result() { + } + + public create_function_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_function_result(create_function_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + public create_function_result deepCopy() { + return new create_function_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public NoSuchObjectException getO4() { + return this.o4; + } + + public void setO4(NoSuchObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_function_result) + return this.equals((create_function_result)that); + return false; + } + + public boolean equals(create_function_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + boolean present_o4 = true && (isSetO4()); + builder.append(present_o4); + if (present_o4) + builder.append(o4); + + return builder.toHashCode(); + } + + public int compareTo(create_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_function_result typedOther = (create_function_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_function_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 create_function_resultStandardSchemeFactory implements SchemeFactory { + public create_function_resultStandardScheme getScheme() { + return new create_function_resultStandardScheme(); + } + } + + private static class create_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public create_function_resultTupleScheme getScheme() { + return new create_function_resultTupleScheme(); + } + } + + private static class create_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_function_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_function_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_function_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("drop_function_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_function_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String funcName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + FUNC_NAME((short)2, "funcName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // FUNC_NAME + return FUNC_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_function_args.class, metaDataMap); + } + + public drop_function_args() { + } + + public drop_function_args( + String dbName, + String funcName) + { + this(); + this.dbName = dbName; + this.funcName = funcName; + } + + /** + * Performs a deep copy on other. + */ + public drop_function_args(drop_function_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetFuncName()) { + this.funcName = other.funcName; + } + } + + public drop_function_args deepCopy() { + return new drop_function_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.funcName = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getFuncName() { + return this.funcName; + } + + public void setFuncName(String funcName) { + this.funcName = funcName; + } + + public void unsetFuncName() { + this.funcName = null; + } + + /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ + public boolean isSetFuncName() { + return this.funcName != null; + } + + public void setFuncNameIsSet(boolean value) { + if (!value) { + this.funcName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case FUNC_NAME: + if (value == null) { + unsetFuncName(); + } else { + setFuncName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case FUNC_NAME: + return getFuncName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case FUNC_NAME: + return isSetFuncName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_function_args) + return this.equals((drop_function_args)that); + return false; + } + + public boolean equals(drop_function_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_funcName = true && this.isSetFuncName(); + boolean that_present_funcName = true && that.isSetFuncName(); + if (this_present_funcName || that_present_funcName) { + if (!(this_present_funcName && that_present_funcName)) + return false; + if (!this.funcName.equals(that.funcName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + boolean present_funcName = true && (isSetFuncName()); + builder.append(present_funcName); + if (present_funcName) + builder.append(funcName); + + return builder.toHashCode(); + } + + public int compareTo(drop_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_function_args typedOther = (drop_function_args)other; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(typedOther.isSetFuncName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFuncName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, typedOther.funcName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_function_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("funcName:"); + if (this.funcName == null) { + sb.append("null"); + } else { + sb.append(this.funcName); + } + 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 drop_function_argsStandardSchemeFactory implements SchemeFactory { + public drop_function_argsStandardScheme getScheme() { + return new drop_function_argsStandardScheme(); + } + } + + private static class drop_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_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.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FUNC_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.funcName = iprot.readString(); + struct.setFuncNameIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.funcName != null) { + oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); + oprot.writeString(struct.funcName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_function_argsTupleSchemeFactory implements SchemeFactory { + public drop_function_argsTupleScheme getScheme() { + return new drop_function_argsTupleScheme(); + } + } + + private static class drop_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetFuncName()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetFuncName()) { + oprot.writeString(struct.funcName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_function_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.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } + } + } + + } + + public static class drop_function_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("drop_function_result"); + + 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_function_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O3((short)2, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_function_result.class, metaDataMap); + } + + public drop_function_result() { + } + + public drop_function_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_function_result(drop_function_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_function_result deepCopy() { + return new drop_function_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_function_result) + return this.equals((drop_function_result)that); + return false; + } + + public boolean equals(drop_function_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + return builder.toHashCode(); + } + + public int compareTo(drop_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_function_result typedOther = (drop_function_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_function_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws 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 drop_function_resultStandardSchemeFactory implements SchemeFactory { + public drop_function_resultStandardScheme getScheme() { + return new drop_function_resultStandardScheme(); + } + } + + private static class drop_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public drop_function_resultTupleScheme getScheme() { + return new drop_function_resultTupleScheme(); + } + } + + private static class drop_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_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_function_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 alter_function_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("alter_function_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField NEW_FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("newFunc", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_function_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String funcName; // required + private Function newFunc; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + FUNC_NAME((short)2, "funcName"), + NEW_FUNC((short)3, "newFunc"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // FUNC_NAME + return FUNC_NAME; + case 3: // NEW_FUNC + return NEW_FUNC; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_FUNC, new org.apache.thrift.meta_data.FieldMetaData("newFunc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_function_args.class, metaDataMap); + } + + public alter_function_args() { + } + + public alter_function_args( + String dbName, + String funcName, + Function newFunc) + { + this(); + this.dbName = dbName; + this.funcName = funcName; + this.newFunc = newFunc; + } + + /** + * Performs a deep copy on other. + */ + public alter_function_args(alter_function_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetFuncName()) { + this.funcName = other.funcName; + } + if (other.isSetNewFunc()) { + this.newFunc = new Function(other.newFunc); + } + } + + public alter_function_args deepCopy() { + return new alter_function_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.funcName = null; + this.newFunc = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getFuncName() { + return this.funcName; + } + + public void setFuncName(String funcName) { + this.funcName = funcName; + } + + public void unsetFuncName() { + this.funcName = null; + } + + /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ + public boolean isSetFuncName() { + return this.funcName != null; + } + + public void setFuncNameIsSet(boolean value) { + if (!value) { + this.funcName = null; + } + } + + public Function getNewFunc() { + return this.newFunc; + } + + public void setNewFunc(Function newFunc) { + this.newFunc = newFunc; + } + + public void unsetNewFunc() { + this.newFunc = null; + } + + /** Returns true if field newFunc is set (has been assigned a value) and false otherwise */ + public boolean isSetNewFunc() { + return this.newFunc != null; + } + + public void setNewFuncIsSet(boolean value) { + if (!value) { + this.newFunc = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case FUNC_NAME: + if (value == null) { + unsetFuncName(); + } else { + setFuncName((String)value); + } + break; + + case NEW_FUNC: + if (value == null) { + unsetNewFunc(); + } else { + setNewFunc((Function)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case FUNC_NAME: + return getFuncName(); + + case NEW_FUNC: + return getNewFunc(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case FUNC_NAME: + return isSetFuncName(); + case NEW_FUNC: + return isSetNewFunc(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_function_args) + return this.equals((alter_function_args)that); + return false; + } + + public boolean equals(alter_function_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_funcName = true && this.isSetFuncName(); + boolean that_present_funcName = true && that.isSetFuncName(); + if (this_present_funcName || that_present_funcName) { + if (!(this_present_funcName && that_present_funcName)) + return false; + if (!this.funcName.equals(that.funcName)) + return false; + } + + boolean this_present_newFunc = true && this.isSetNewFunc(); + boolean that_present_newFunc = true && that.isSetNewFunc(); + if (this_present_newFunc || that_present_newFunc) { + if (!(this_present_newFunc && that_present_newFunc)) + return false; + if (!this.newFunc.equals(that.newFunc)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + boolean present_funcName = true && (isSetFuncName()); + builder.append(present_funcName); + if (present_funcName) + builder.append(funcName); + + boolean present_newFunc = true && (isSetNewFunc()); + builder.append(present_newFunc); + if (present_newFunc) + builder.append(newFunc); + + return builder.toHashCode(); + } + + public int compareTo(alter_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_function_args typedOther = (alter_function_args)other; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(typedOther.isSetFuncName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFuncName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, typedOther.funcName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNewFunc()).compareTo(typedOther.isSetNewFunc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNewFunc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newFunc, typedOther.newFunc); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_function_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("funcName:"); + if (this.funcName == null) { + sb.append("null"); + } else { + sb.append(this.funcName); + } + first = false; + if (!first) sb.append(", "); + sb.append("newFunc:"); + if (this.newFunc == null) { + sb.append("null"); + } else { + sb.append(this.newFunc); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (newFunc != null) { + newFunc.validate(); + } + } + + 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 alter_function_argsStandardSchemeFactory implements SchemeFactory { + public alter_function_argsStandardScheme getScheme() { + return new alter_function_argsStandardScheme(); + } + } + + private static class alter_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_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.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FUNC_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_FUNC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.newFunc = new Function(); + struct.newFunc.read(iprot); + struct.setNewFuncIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.funcName != null) { + oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); + oprot.writeString(struct.funcName); + oprot.writeFieldEnd(); + } + if (struct.newFunc != null) { + oprot.writeFieldBegin(NEW_FUNC_FIELD_DESC); + struct.newFunc.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_function_argsTupleSchemeFactory implements SchemeFactory { + public alter_function_argsTupleScheme getScheme() { + return new alter_function_argsTupleScheme(); + } + } + + private static class alter_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetFuncName()) { + optionals.set(1); + } + if (struct.isSetNewFunc()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetFuncName()) { + oprot.writeString(struct.funcName); + } + if (struct.isSetNewFunc()) { + struct.newFunc.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_function_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.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } + if (incoming.get(2)) { + struct.newFunc = new Function(); + struct.newFunc.read(iprot); + struct.setNewFuncIsSet(true); + } + } + } + + } + + public static class alter_function_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("alter_function_result"); + + 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_function_resultTupleSchemeFactory()); + } + + private InvalidOperationException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_function_result.class, metaDataMap); + } + + public alter_function_result() { + } + + public alter_function_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_function_result(alter_function_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_function_result deepCopy() { + return new alter_function_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_function_result) + return this.equals((alter_function_result)that); + return false; + } + + public boolean equals(alter_function_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + return builder.toHashCode(); + } + + public int compareTo(alter_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_function_result typedOther = (alter_function_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_function_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + 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 alter_function_resultStandardSchemeFactory implements SchemeFactory { + public alter_function_resultStandardScheme getScheme() { + return new alter_function_resultStandardScheme(); + } + } + + private static class alter_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public alter_function_resultTupleScheme getScheme() { + return new alter_function_resultTupleScheme(); + } + } + + private static class alter_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_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_function_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_functions_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_functions_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 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_functions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_functions_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String pattern; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + PATTERN((short)2, "pattern"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // PATTERN + return PATTERN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_args.class, metaDataMap); + } + + public get_functions_args() { + } + + public get_functions_args( + String dbName, + String pattern) + { + this(); + this.dbName = dbName; + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_functions_args(get_functions_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_functions_args deepCopy() { + return new get_functions_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.pattern = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_functions_args) + return this.equals((get_functions_args)that); + return false; + } + + public boolean equals(get_functions_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + boolean present_pattern = true && (isSetPattern()); + builder.append(present_pattern); + if (present_pattern) + builder.append(pattern); + + return builder.toHashCode(); + } + + public int compareTo(get_functions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_functions_args typedOther = (get_functions_args)other; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_functions_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + 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 get_functions_argsStandardSchemeFactory implements SchemeFactory { + public get_functions_argsStandardScheme getScheme() { + return new get_functions_argsStandardScheme(); + } + } + + private static class get_functions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_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.dbName = iprot.readString(); + struct.setDbNameIsSet(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_functions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + 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_functions_argsTupleSchemeFactory implements SchemeFactory { + public get_functions_argsTupleScheme getScheme() { + return new get_functions_argsTupleScheme(); + } + } + + private static class get_functions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetPattern()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetPattern()) { + oprot.writeString(struct.pattern); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_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.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } + } + } + + } + + public static class get_functions_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("get_functions_result"); + + 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_functions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_functions_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_result.class, metaDataMap); + } + + public get_functions_result() { + } + + public get_functions_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_functions_result(get_functions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_functions_result deepCopy() { + return new get_functions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_functions_result) + return this.equals((get_functions_result)that); + return false; + } + + public boolean equals(get_functions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + return builder.toHashCode(); + } + + public int compareTo(get_functions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_functions_result typedOther = (get_functions_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_functions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws 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 get_functions_resultStandardSchemeFactory implements SchemeFactory { + public get_functions_resultStandardScheme getScheme() { + return new get_functions_resultStandardScheme(); + } + } + + private static class get_functions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_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 _list626 = iprot.readListBegin(); + struct.success = new ArrayList(_list626.size); + for (int _i627 = 0; _i627 < _list626.size; ++_i627) + { + String _elem628; // optional + _elem628 = iprot.readString(); + struct.success.add(_elem628); + } + 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_functions_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 _iter629 : struct.success) + { + oprot.writeString(_iter629); + } + 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_functions_resultTupleSchemeFactory implements SchemeFactory { + public get_functions_resultTupleScheme getScheme() { + return new get_functions_resultTupleScheme(); + } + } + + private static class get_functions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_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 _iter630 : struct.success) + { + oprot.writeString(_iter630); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_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 _list631 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list631.size); + for (int _i632 = 0; _i632 < _list631.size; ++_i632) + { + String _elem633; // optional + _elem633 = iprot.readString(); + struct.success.add(_elem633); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class get_all_functions_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_functions_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", 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_functions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_functions_argsTupleSchemeFactory()); + } + + private String dbName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_functions_args.class, metaDataMap); + } + + public get_all_functions_args() { + } + + public get_all_functions_args( + String dbName) + { + this(); + this.dbName = dbName; + } + + /** + * Performs a deep copy on other. + */ + public get_all_functions_args(get_all_functions_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + } + + public get_all_functions_args deepCopy() { + return new get_all_functions_args(this); + } + + @Override + public void clear() { + this.dbName = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_functions_args) + return this.equals((get_all_functions_args)that); + return false; + } + + public boolean equals(get_all_functions_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + return builder.toHashCode(); + } + + public int compareTo(get_all_functions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_functions_args typedOther = (get_all_functions_args)other; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_functions_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + 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 get_all_functions_argsStandardSchemeFactory implements SchemeFactory { + public get_all_functions_argsStandardScheme getScheme() { + return new get_all_functions_argsStandardScheme(); + } + } + + private static class get_all_functions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_functions_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.dbName = iprot.readString(); + struct.setDbNameIsSet(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_functions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_functions_argsTupleSchemeFactory implements SchemeFactory { + public get_all_functions_argsTupleScheme getScheme() { + return new get_all_functions_argsTupleScheme(); + } + } + + private static class get_all_functions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + } + } + + } + + public static class get_all_functions_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("get_all_functions_result"); + + 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_functions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_functions_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_functions_result.class, metaDataMap); + } + + public get_all_functions_result() { + } + + public get_all_functions_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_functions_result(get_all_functions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_functions_result deepCopy() { + return new get_all_functions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_functions_result) + return this.equals((get_all_functions_result)that); + return false; + } + + public boolean equals(get_all_functions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + return builder.toHashCode(); + } + + public int compareTo(get_all_functions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_functions_result typedOther = (get_all_functions_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_functions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws 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 get_all_functions_resultStandardSchemeFactory implements SchemeFactory { + public get_all_functions_resultStandardScheme getScheme() { + return new get_all_functions_resultStandardScheme(); + } + } + + private static class get_all_functions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_functions_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 _list634 = iprot.readListBegin(); + struct.success = new ArrayList(_list634.size); + for (int _i635 = 0; _i635 < _list634.size; ++_i635) + { + String _elem636; // optional + _elem636 = iprot.readString(); + struct.success.add(_elem636); + } + 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_functions_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 _iter637 : struct.success) + { + oprot.writeString(_iter637); + } + 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_functions_resultTupleSchemeFactory implements SchemeFactory { + public get_all_functions_resultTupleScheme getScheme() { + return new get_all_functions_resultTupleScheme(); + } + } + + private static class get_all_functions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_functions_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 _iter638 : struct.success) + { + oprot.writeString(_iter638); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_functions_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 _list639 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list639.size); + for (int _i640 = 0; _i640 < _list639.size; ++_i640) + { + String _elem641; // optional + _elem641 = iprot.readString(); + struct.success.add(_elem641); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class get_function_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_function_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_function_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String funcName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + FUNC_NAME((short)2, "funcName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // FUNC_NAME + return FUNC_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_args.class, metaDataMap); + } + + public get_function_args() { + } + + public get_function_args( + String dbName, + String funcName) + { + this(); + this.dbName = dbName; + this.funcName = funcName; + } + + /** + * Performs a deep copy on other. + */ + public get_function_args(get_function_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetFuncName()) { + this.funcName = other.funcName; + } + } + + public get_function_args deepCopy() { + return new get_function_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.funcName = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getFuncName() { + return this.funcName; + } + + public void setFuncName(String funcName) { + this.funcName = funcName; + } + + public void unsetFuncName() { + this.funcName = null; + } + + /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ + public boolean isSetFuncName() { + return this.funcName != null; + } + + public void setFuncNameIsSet(boolean value) { + if (!value) { + this.funcName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case FUNC_NAME: + if (value == null) { + unsetFuncName(); + } else { + setFuncName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case FUNC_NAME: + return getFuncName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case FUNC_NAME: + return isSetFuncName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_function_args) + return this.equals((get_function_args)that); + return false; + } + + public boolean equals(get_function_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_funcName = true && this.isSetFuncName(); + boolean that_present_funcName = true && that.isSetFuncName(); + if (this_present_funcName || that_present_funcName) { + if (!(this_present_funcName && that_present_funcName)) + return false; + if (!this.funcName.equals(that.funcName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + boolean present_funcName = true && (isSetFuncName()); + builder.append(present_funcName); + if (present_funcName) + builder.append(funcName); + + return builder.toHashCode(); + } + + public int compareTo(get_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_function_args typedOther = (get_function_args)other; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(typedOther.isSetFuncName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFuncName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, typedOther.funcName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_function_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("funcName:"); + if (this.funcName == null) { + sb.append("null"); + } else { + sb.append(this.funcName); + } + 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 get_function_argsStandardSchemeFactory implements SchemeFactory { + public get_function_argsStandardScheme getScheme() { + return new get_function_argsStandardScheme(); + } + } + + private static class get_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_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.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FUNC_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.funcName = iprot.readString(); + struct.setFuncNameIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.funcName != null) { + oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); + oprot.writeString(struct.funcName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_function_argsTupleSchemeFactory implements SchemeFactory { + public get_function_argsTupleScheme getScheme() { + return new get_function_argsTupleScheme(); + } + } + + private static class get_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetFuncName()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetFuncName()) { + oprot.writeString(struct.funcName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_function_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.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } + } + } + + } + + public static class get_function_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("get_function_result"); + + 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 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_function_resultTupleSchemeFactory()); + } + + private Function success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_result.class, metaDataMap); + } + + public get_function_result() { + } + + public get_function_result( + Function success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_function_result(get_function_result other) { + if (other.isSetSuccess()) { + this.success = new Function(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_function_result deepCopy() { + return new get_function_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Function getSuccess() { + return this.success; + } + + public void setSuccess(Function success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Function)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_function_result) + return this.equals((get_function_result)that); + return false; + } + + public boolean equals(get_function_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + return builder.toHashCode(); + } + + public int compareTo(get_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_function_result typedOther = (get_function_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_function_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_function_resultStandardSchemeFactory implements SchemeFactory { + public get_function_resultStandardScheme getScheme() { + return new get_function_resultStandardScheme(); + } + } + + private static class get_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_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 Function(); + 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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public get_function_resultTupleScheme getScheme() { + return new get_function_resultTupleScheme(); + } + } + + private static class get_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_function_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_function_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Function(); + 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_role_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("create_role_args"); @@ -92583,13 +99041,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_resu case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list626 = iprot.readListBegin(); - struct.success = new ArrayList(_list626.size); - for (int _i627 = 0; _i627 < _list626.size; ++_i627) + org.apache.thrift.protocol.TList _list642 = iprot.readListBegin(); + struct.success = new ArrayList(_list642.size); + for (int _i643 = 0; _i643 < _list642.size; ++_i643) { - String _elem628; // required - _elem628 = iprot.readString(); - struct.success.add(_elem628); + String _elem644; // optional + _elem644 = iprot.readString(); + struct.success.add(_elem644); } iprot.readListEnd(); } @@ -92624,9 +99082,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_names_res oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter629 : struct.success) + for (String _iter645 : struct.success) { - oprot.writeString(_iter629); + oprot.writeString(_iter645); } oprot.writeListEnd(); } @@ -92665,9 +99123,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, get_role_names_resu if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (String _iter630 : struct.success) + for (String _iter646 : struct.success) { - oprot.writeString(_iter630); + oprot.writeString(_iter646); } } } @@ -92682,13 +99140,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_resul BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list631 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list631.size); - for (int _i632 = 0; _i632 < _list631.size; ++_i632) + org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list647.size); + for (int _i648 = 0; _i648 < _list647.size; ++_i648) { - String _elem633; // required - _elem633 = iprot.readString(); - struct.success.add(_elem633); + String _elem649; // optional + _elem649 = iprot.readString(); + struct.success.add(_elem649); } } struct.setSuccessIsSet(true); @@ -95979,14 +102437,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_result s case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list634 = iprot.readListBegin(); - struct.success = new ArrayList(_list634.size); - for (int _i635 = 0; _i635 < _list634.size; ++_i635) + org.apache.thrift.protocol.TList _list650 = iprot.readListBegin(); + struct.success = new ArrayList(_list650.size); + for (int _i651 = 0; _i651 < _list650.size; ++_i651) { - Role _elem636; // required - _elem636 = new Role(); - _elem636.read(iprot); - struct.success.add(_elem636); + Role _elem652; // optional + _elem652 = new Role(); + _elem652.read(iprot); + struct.success.add(_elem652); } iprot.readListEnd(); } @@ -96021,9 +102479,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_result oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Role _iter637 : struct.success) + for (Role _iter653 : struct.success) { - _iter637.write(oprot); + _iter653.write(oprot); } oprot.writeListEnd(); } @@ -96062,9 +102520,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_result s if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Role _iter638 : struct.success) + for (Role _iter654 : struct.success) { - _iter638.write(oprot); + _iter654.write(oprot); } } } @@ -96079,14 +102537,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_result st BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list639 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list639.size); - for (int _i640 = 0; _i640 < _list639.size; ++_i640) + org.apache.thrift.protocol.TList _list655 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list655.size); + for (int _i656 = 0; _i656 < _list655.size; ++_i656) { - Role _elem641; // required - _elem641 = new Role(); - _elem641.read(iprot); - struct.success.add(_elem641); + Role _elem657; // optional + _elem657 = new Role(); + _elem657.read(iprot); + struct.success.add(_elem657); } } struct.setSuccessIsSet(true); @@ -96598,13 +103056,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_a case 3: // GROUP_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list642 = iprot.readListBegin(); - struct.group_names = new ArrayList(_list642.size); - for (int _i643 = 0; _i643 < _list642.size; ++_i643) + org.apache.thrift.protocol.TList _list658 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list658.size); + for (int _i659 = 0; _i659 < _list658.size; ++_i659) { - String _elem644; // required - _elem644 = iprot.readString(); - struct.group_names.add(_elem644); + String _elem660; // optional + _elem660 = iprot.readString(); + struct.group_names.add(_elem660); } iprot.readListEnd(); } @@ -96640,9 +103098,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_privilege_set_ 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 _iter645 : struct.group_names) + for (String _iter661 : struct.group_names) { - oprot.writeString(_iter645); + oprot.writeString(_iter661); } oprot.writeListEnd(); } @@ -96685,9 +103143,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_a if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); - for (String _iter646 : struct.group_names) + for (String _iter662 : struct.group_names) { - oprot.writeString(_iter646); + oprot.writeString(_iter662); } } } @@ -96708,13 +103166,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_ar } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.group_names = new ArrayList(_list647.size); - for (int _i648 = 0; _i648 < _list647.size; ++_i648) + org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list663.size); + for (int _i664 = 0; _i664 < _list663.size; ++_i664) { - String _elem649; // required - _elem649 = iprot.readString(); - struct.group_names.add(_elem649); + String _elem665; // optional + _elem665 = iprot.readString(); + struct.group_names.add(_elem665); } } struct.setGroup_namesIsSet(true); @@ -98172,14 +104630,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_res case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list650 = iprot.readListBegin(); - struct.success = new ArrayList(_list650.size); - for (int _i651 = 0; _i651 < _list650.size; ++_i651) + org.apache.thrift.protocol.TList _list666 = iprot.readListBegin(); + struct.success = new ArrayList(_list666.size); + for (int _i667 = 0; _i667 < _list666.size; ++_i667) { - HiveObjectPrivilege _elem652; // required - _elem652 = new HiveObjectPrivilege(); - _elem652.read(iprot); - struct.success.add(_elem652); + HiveObjectPrivilege _elem668; // optional + _elem668 = new HiveObjectPrivilege(); + _elem668.read(iprot); + struct.success.add(_elem668); } iprot.readListEnd(); } @@ -98214,9 +104672,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_re oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (HiveObjectPrivilege _iter653 : struct.success) + for (HiveObjectPrivilege _iter669 : struct.success) { - _iter653.write(oprot); + _iter669.write(oprot); } oprot.writeListEnd(); } @@ -98255,9 +104713,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_res if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (HiveObjectPrivilege _iter654 : struct.success) + for (HiveObjectPrivilege _iter670 : struct.success) { - _iter654.write(oprot); + _iter670.write(oprot); } } } @@ -98272,14 +104730,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_resu BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list655 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list655.size); - for (int _i656 = 0; _i656 < _list655.size; ++_i656) + org.apache.thrift.protocol.TList _list671 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list671.size); + for (int _i672 = 0; _i672 < _list671.size; ++_i672) { - HiveObjectPrivilege _elem657; // required - _elem657 = new HiveObjectPrivilege(); - _elem657.read(iprot); - struct.success.add(_elem657); + HiveObjectPrivilege _elem673; // optional + _elem673 = new HiveObjectPrivilege(); + _elem673.read(iprot); + struct.success.add(_elem673); } } struct.setSuccessIsSet(true); @@ -100352,13 +106810,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_args struct case 2: // GROUP_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list658 = iprot.readListBegin(); - struct.group_names = new ArrayList(_list658.size); - for (int _i659 = 0; _i659 < _list658.size; ++_i659) + org.apache.thrift.protocol.TList _list674 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list674.size); + for (int _i675 = 0; _i675 < _list674.size; ++_i675) { - String _elem660; // required - _elem660 = iprot.readString(); - struct.group_names.add(_elem660); + String _elem676; // optional + _elem676 = iprot.readString(); + struct.group_names.add(_elem676); } iprot.readListEnd(); } @@ -100389,9 +106847,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_args struc 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 _iter661 : struct.group_names) + for (String _iter677 : struct.group_names) { - oprot.writeString(_iter661); + oprot.writeString(_iter677); } oprot.writeListEnd(); } @@ -100428,9 +106886,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); - for (String _iter662 : struct.group_names) + for (String _iter678 : struct.group_names) { - oprot.writeString(_iter662); + oprot.writeString(_iter678); } } } @@ -100446,13 +106904,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.group_names = new ArrayList(_list663.size); - for (int _i664 = 0; _i664 < _list663.size; ++_i664) + org.apache.thrift.protocol.TList _list679 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list679.size); + for (int _i680 = 0; _i680 < _list679.size; ++_i680) { - String _elem665; // required - _elem665 = iprot.readString(); - struct.group_names.add(_elem665); + String _elem681; // optional + _elem681 = iprot.readString(); + struct.group_names.add(_elem681); } } struct.setGroup_namesIsSet(true); @@ -100858,13 +107316,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_result stru case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list666 = iprot.readListBegin(); - struct.success = new ArrayList(_list666.size); - for (int _i667 = 0; _i667 < _list666.size; ++_i667) + org.apache.thrift.protocol.TList _list682 = iprot.readListBegin(); + struct.success = new ArrayList(_list682.size); + for (int _i683 = 0; _i683 < _list682.size; ++_i683) { - String _elem668; // required - _elem668 = iprot.readString(); - struct.success.add(_elem668); + String _elem684; // optional + _elem684 = iprot.readString(); + struct.success.add(_elem684); } iprot.readListEnd(); } @@ -100899,9 +107357,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_result str oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter669 : struct.success) + for (String _iter685 : struct.success) { - oprot.writeString(_iter669); + oprot.writeString(_iter685); } oprot.writeListEnd(); } @@ -100940,9 +107398,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_result stru if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (String _iter670 : struct.success) + for (String _iter686 : struct.success) { - oprot.writeString(_iter670); + oprot.writeString(_iter686); } } } @@ -100957,13 +107415,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struc BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list671 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list671.size); - for (int _i672 = 0; _i672 < _list671.size; ++_i672) + org.apache.thrift.protocol.TList _list687 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list687.size); + for (int _i688 = 0; _i688 < _list687.size; ++_i688) { - String _elem673; // required - _elem673 = iprot.readString(); - struct.success.add(_elem673); + String _elem689; // optional + _elem689 = iprot.readString(); + struct.success.add(_elem689); } } struct.setSuccessIsSet(true); diff --git 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 index bb81e3c..1882b57 100644 --- 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 @@ -618,7 +618,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Type struct) throws struct.fields = new ArrayList(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - FieldSchema _elem2; // required + FieldSchema _elem2; // optional _elem2 = new FieldSchema(); _elem2.read(iprot); struct.fields.add(_elem2); @@ -749,7 +749,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Type struct) throws struct.fields = new ArrayList(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { - FieldSchema _elem7; // required + FieldSchema _elem7; // optional _elem7 = new FieldSchema(); _elem7.read(iprot); struct.fields.add(_elem7); diff --git metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php index 6bdec8d..ce4066e 100644 --- metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php +++ metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php @@ -86,6 +86,12 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf { public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); public function delete_table_column_statistics($db_name, $tbl_name, $col_name); + public function create_function(\metastore\Function $func); + public function drop_function($dbName, $funcName); + public function alter_function($dbName, $funcName, \metastore\Function $newFunc); + public function get_functions($dbName, $pattern); + public function get_all_functions($dbName); + public function get_function($dbName, $funcName); public function create_role(\metastore\Role $role); public function drop_role($role_name); public function get_role_names(); @@ -4267,34 +4273,34 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas throw new \Exception("delete_table_column_statistics failed: unknown result"); } - public function create_role(\metastore\Role $role) + public function create_function(\metastore\Function $func) { - $this->send_create_role($role); - return $this->recv_create_role(); + $this->send_create_function($func); + $this->recv_create_function(); } - public function send_create_role(\metastore\Role $role) + public function send_create_function(\metastore\Function $func) { - $args = new \metastore\ThriftHiveMetastore_create_role_args(); - $args->role = $role; + $args = new \metastore\ThriftHiveMetastore_create_function_args(); + $args->func = $func; $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()); + thrift_protocol_write_binary($this->output_, 'create_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('create_function', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_create_role() + public function recv_create_function() { $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()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_function_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4308,47 +4314,54 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_create_role_result(); + $result = new \metastore\ThriftHiveMetastore_create_function_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"); + 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_role($role_name) + public function drop_function($dbName, $funcName) { - $this->send_drop_role($role_name); - return $this->recv_drop_role(); + $this->send_drop_function($dbName, $funcName); + $this->recv_drop_function(); } - public function send_drop_role($role_name) + public function send_drop_function($dbName, $funcName) { - $args = new \metastore\ThriftHiveMetastore_drop_role_args(); - $args->role_name = $role_name; + $args = new \metastore\ThriftHiveMetastore_drop_function_args(); + $args->dbName = $dbName; + $args->funcName = $funcName; $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()); + thrift_protocol_write_binary($this->output_, 'drop_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('drop_function', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_drop_role() + public function recv_drop_function() { $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()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_function_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4362,46 +4375,49 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_drop_role_result(); + $result = new \metastore\ThriftHiveMetastore_drop_function_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"); + if ($result->o3 !== null) { + throw $result->o3; + } + return; } - public function get_role_names() + public function alter_function($dbName, $funcName, \metastore\Function $newFunc) { - $this->send_get_role_names(); - return $this->recv_get_role_names(); + $this->send_alter_function($dbName, $funcName, $newFunc); + $this->recv_alter_function(); } - public function send_get_role_names() + public function send_alter_function($dbName, $funcName, \metastore\Function $newFunc) { - $args = new \metastore\ThriftHiveMetastore_get_role_names_args(); + $args = new \metastore\ThriftHiveMetastore_alter_function_args(); + $args->dbName = $dbName; + $args->funcName = $funcName; + $args->newFunc = $newFunc; $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()); + thrift_protocol_write_binary($this->output_, 'alter_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('alter_function', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_role_names() + public function recv_alter_function() { $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()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_function_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4415,52 +4431,48 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_get_role_names_result(); + $result = new \metastore\ThriftHiveMetastore_alter_function_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"); + if ($result->o2 !== null) { + throw $result->o2; + } + return; } - public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + public function get_functions($dbName, $pattern) { - $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); - return $this->recv_grant_role(); + $this->send_get_functions($dbName, $pattern); + return $this->recv_get_functions(); } - public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + public function send_get_functions($dbName, $pattern) { - $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; + $args = new \metastore\ThriftHiveMetastore_get_functions_args(); + $args->dbName = $dbName; + $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_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_functions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_functions', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_grant_role() + public function recv_get_functions() { $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()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_functions_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4474,7 +4486,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_grant_role_result(); + $result = new \metastore\ThriftHiveMetastore_get_functions_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4484,39 +4496,37 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("grant_role failed: unknown result"); + throw new \Exception("get_functions failed: unknown result"); } - public function revoke_role($role_name, $principal_name, $principal_type) + public function get_all_functions($dbName) { - $this->send_revoke_role($role_name, $principal_name, $principal_type); - return $this->recv_revoke_role(); + $this->send_get_all_functions($dbName); + return $this->recv_get_all_functions(); } - public function send_revoke_role($role_name, $principal_name, $principal_type) + public function send_get_all_functions($dbName) { - $args = new \metastore\ThriftHiveMetastore_revoke_role_args(); - $args->role_name = $role_name; - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; + $args = new \metastore\ThriftHiveMetastore_get_all_functions_args(); + $args->dbName = $dbName; $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()); + thrift_protocol_write_binary($this->output_, 'get_all_functions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_all_functions', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_revoke_role() + public function recv_get_all_functions() { $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()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_functions_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4530,7 +4540,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_revoke_role_result(); + $result = new \metastore\ThriftHiveMetastore_get_all_functions_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4540,38 +4550,38 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("revoke_role failed: unknown result"); + throw new \Exception("get_all_functions failed: unknown result"); } - public function list_roles($principal_name, $principal_type) + public function get_function($dbName, $funcName) { - $this->send_list_roles($principal_name, $principal_type); - return $this->recv_list_roles(); + $this->send_get_function($dbName, $funcName); + return $this->recv_get_function(); } - public function send_list_roles($principal_name, $principal_type) + public function send_get_function($dbName, $funcName) { - $args = new \metastore\ThriftHiveMetastore_list_roles_args(); - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; + $args = new \metastore\ThriftHiveMetastore_get_function_args(); + $args->dbName = $dbName; + $args->funcName = $funcName; $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()); + thrift_protocol_write_binary($this->output_, 'get_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_function', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_list_roles() + public function recv_get_function() { $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()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_function_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4585,7 +4595,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_list_roles_result(); + $result = new \metastore\ThriftHiveMetastore_get_function_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4595,39 +4605,40 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("list_roles failed: unknown result"); + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_function failed: unknown result"); } - public function get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) + public function create_role(\metastore\Role $role) { - $this->send_get_privilege_set($hiveObject, $user_name, $group_names); - return $this->recv_get_privilege_set(); + $this->send_create_role($role); + return $this->recv_create_role(); } - public function send_get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) + public function send_create_role(\metastore\Role $role) { - $args = new \metastore\ThriftHiveMetastore_get_privilege_set_args(); - $args->hiveObject = $hiveObject; - $args->user_name = $user_name; - $args->group_names = $group_names; + $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_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_privilege_set() + 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_get_privilege_set_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4641,7 +4652,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_get_privilege_set_result(); + $result = new \metastore\ThriftHiveMetastore_create_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4651,39 +4662,37 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("get_privilege_set failed: unknown result"); + throw new \Exception("create_role failed: unknown result"); } - public function list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) + public function drop_role($role_name) { - $this->send_list_privileges($principal_name, $principal_type, $hiveObject); - return $this->recv_list_privileges(); + $this->send_drop_role($role_name); + return $this->recv_drop_role(); } - public function send_list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) + public function send_drop_role($role_name) { - $args = new \metastore\ThriftHiveMetastore_list_privileges_args(); - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; - $args->hiveObject = $hiveObject; + $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_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_list_privileges() + 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_list_privileges_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4697,7 +4706,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_list_privileges_result(); + $result = new \metastore\ThriftHiveMetastore_drop_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4707,37 +4716,36 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("list_privileges failed: unknown result"); + throw new \Exception("drop_role failed: unknown result"); } - public function grant_privileges(\metastore\PrivilegeBag $privileges) + public function get_role_names() { - $this->send_grant_privileges($privileges); - return $this->recv_grant_privileges(); + $this->send_get_role_names(); + return $this->recv_get_role_names(); } - public function send_grant_privileges(\metastore\PrivilegeBag $privileges) + public function send_get_role_names() { - $args = new \metastore\ThriftHiveMetastore_grant_privileges_args(); - $args->privileges = $privileges; + $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_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_grant_privileges() + 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_grant_privileges_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_role_names_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4751,7 +4759,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_grant_privileges_result(); + $result = new \metastore\ThriftHiveMetastore_get_role_names_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4761,37 +4769,42 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("grant_privileges failed: unknown result"); + throw new \Exception("get_role_names failed: unknown result"); } - public function revoke_privileges(\metastore\PrivilegeBag $privileges) + public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) { - $this->send_revoke_privileges($privileges); - return $this->recv_revoke_privileges(); + $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); + return $this->recv_grant_role(); } - public function send_revoke_privileges(\metastore\PrivilegeBag $privileges) + public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) { - $args = new \metastore\ThriftHiveMetastore_revoke_privileges_args(); - $args->privileges = $privileges; + $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_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_revoke_privileges() + 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_revoke_privileges_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4805,7 +4818,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_revoke_privileges_result(); + $result = new \metastore\ThriftHiveMetastore_grant_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4815,38 +4828,39 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("revoke_privileges failed: unknown result"); + throw new \Exception("grant_role failed: unknown result"); } - public function set_ugi($user_name, $group_names) + public function revoke_role($role_name, $principal_name, $principal_type) { - $this->send_set_ugi($user_name, $group_names); - return $this->recv_set_ugi(); + $this->send_revoke_role($role_name, $principal_name, $principal_type); + return $this->recv_revoke_role(); } - public function send_set_ugi($user_name, $group_names) + public function send_revoke_role($role_name, $principal_name, $principal_type) { - $args = new \metastore\ThriftHiveMetastore_set_ugi_args(); - $args->user_name = $user_name; - $args->group_names = $group_names; + $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_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_set_ugi() + 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_set_ugi_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_revoke_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4860,7 +4874,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_set_ugi_result(); + $result = new \metastore\ThriftHiveMetastore_revoke_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4870,38 +4884,38 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("set_ugi failed: unknown result"); + throw new \Exception("revoke_role failed: unknown result"); } - public function get_delegation_token($token_owner, $renewer_kerberos_principal_name) + public function list_roles($principal_name, $principal_type) { - $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name); - return $this->recv_get_delegation_token(); + $this->send_list_roles($principal_name, $principal_type); + return $this->recv_list_roles(); } - public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name) + public function send_list_roles($principal_name, $principal_type) { - $args = new \metastore\ThriftHiveMetastore_get_delegation_token_args(); - $args->token_owner = $token_owner; - $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name; + $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_, 'get_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_delegation_token', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_delegation_token() + 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_get_delegation_token_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4915,7 +4929,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_get_delegation_token_result(); + $result = new \metastore\ThriftHiveMetastore_list_roles_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4925,37 +4939,39 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("get_delegation_token failed: unknown result"); + throw new \Exception("list_roles failed: unknown result"); } - public function renew_delegation_token($token_str_form) + public function get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) { - $this->send_renew_delegation_token($token_str_form); - return $this->recv_renew_delegation_token(); + $this->send_get_privilege_set($hiveObject, $user_name, $group_names); + return $this->recv_get_privilege_set(); } - public function send_renew_delegation_token($token_str_form) + public function send_get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) { - $args = new \metastore\ThriftHiveMetastore_renew_delegation_token_args(); - $args->token_str_form = $token_str_form; + $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_, 'renew_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('renew_delegation_token', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_renew_delegation_token() + 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_renew_delegation_token_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_privilege_set_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4969,7 +4985,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas $this->input_->readMessageEnd(); throw $x; } - $result = new \metastore\ThriftHiveMetastore_renew_delegation_token_result(); + $result = new \metastore\ThriftHiveMetastore_get_privilege_set_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4979,88 +4995,1588 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas if ($result->o1 !== null) { throw $result->o1; } - throw new \Exception("renew_delegation_token failed: unknown result"); + throw new \Exception("get_privilege_set failed: unknown result"); } - public function cancel_delegation_token($token_str_form) + public function list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) { - $this->send_cancel_delegation_token($token_str_form); - $this->recv_cancel_delegation_token(); + $this->send_list_privileges($principal_name, $principal_type, $hiveObject); + return $this->recv_list_privileges(); } - public function send_cancel_delegation_token($token_str_form) + public function send_list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) { - $args = new \metastore\ThriftHiveMetastore_cancel_delegation_token_args(); - $args->token_str_form = $token_str_form; + $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_, 'cancel_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('cancel_delegation_token', TMessageType::CALL, $this->seqid_); + $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_cancel_delegation_token() + 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(); + $_size248 = 0; + $_etype251 = 0; + $xfer += $input->readListBegin($_etype251, $_size248); + for ($_i252 = 0; $_i252 < $_size248; ++$_i252) + { + $elem253 = null; + $xfer += $input->readString($elem253); + $this->success []= $elem253; + } + $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 $iter254) + { + $xfer += $output->writeString($iter254); + } + } + $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(); + $_size255 = 0; + $_etype258 = 0; + $xfer += $input->readListBegin($_etype258, $_size255); + for ($_i259 = 0; $_i259 < $_size255; ++$_i259) + { + $elem260 = null; + $xfer += $input->readString($elem260); + $this->success []= $elem260; + } + $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 $iter261) + { + $xfer += $output->writeString($iter261); + } + } + $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) { - $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 + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { - $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; + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; } - $result = new \metastore\ThriftHiveMetastore_cancel_delegation_token_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); + 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(); } - if ($result->o1 !== null) { - throw $result->o1; + $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(); } - return; + 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; } } -// HELPER FUNCTIONS AND STRUCTURES - -class ThriftHiveMetastore_create_database_args { +class ThriftHiveMetastore_get_type_args { static $_TSPEC; - public $database = null; + public $name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'database', - 'type' => TType::STRUCT, - 'class' => '\metastore\Database', + 'var' => 'name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['database'])) { - $this->database = $vals['database']; + if (isset($vals['name'])) { + $this->name = $vals['name']; } } } public function getName() { - return 'ThriftHiveMetastore_create_database_args'; + return 'ThriftHiveMetastore_get_type_args'; } public function read($input) @@ -5079,9 +6595,8 @@ class ThriftHiveMetastore_create_database_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->database = new \metastore\Database(); - $xfer += $this->database->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } @@ -5098,13 +6613,10 @@ class ThriftHiveMetastore_create_database_args { 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->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(); @@ -5114,48 +6626,48 @@ class ThriftHiveMetastore_create_database_args { } -class ThriftHiveMetastore_create_database_result { +class ThriftHiveMetastore_get_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::STRUCT, + 'class' => '\metastore\Type', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + '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']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_database_result'; + return 'ThriftHiveMetastore_get_type_result'; } public function read($input) @@ -5173,26 +6685,26 @@ class ThriftHiveMetastore_create_database_result { } switch ($fid) { - case 1: + case 0: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\AlreadyExistsException(); - $xfer += $this->o1->read($input); + $this->success = new \metastore\Type(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\InvalidObjectException(); - $xfer += $this->o2->read($input); + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -5209,7 +6721,15 @@ class ThriftHiveMetastore_create_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + $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); @@ -5220,11 +6740,6 @@ class ThriftHiveMetastore_create_database_result { $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; @@ -5232,29 +6747,30 @@ class ThriftHiveMetastore_create_database_result { } -class ThriftHiveMetastore_get_database_args { +class ThriftHiveMetastore_create_type_args { static $_TSPEC; - public $name = null; + public $type = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['type'])) { + $this->type = $vals['type']; } } } public function getName() { - return 'ThriftHiveMetastore_get_database_args'; + return 'ThriftHiveMetastore_create_type_args'; } public function read($input) @@ -5273,8 +6789,9 @@ class ThriftHiveMetastore_get_database_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::STRUCT) { + $this->type = new \metastore\Type(); + $xfer += $this->type->read($input); } else { $xfer += $input->skip($ftype); } @@ -5291,10 +6808,13 @@ class ThriftHiveMetastore_get_database_args { 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->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(); @@ -5304,29 +6824,34 @@ class ThriftHiveMetastore_get_database_args { } -class ThriftHiveMetastore_get_database_result { +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::STRUCT, - 'class' => '\metastore\Database', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\AlreadyExistsException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), ); @@ -5341,11 +6866,14 @@ class ThriftHiveMetastore_get_database_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_database_result'; + return 'ThriftHiveMetastore_create_type_result'; } public function read($input) @@ -5364,16 +6892,15 @@ class ThriftHiveMetastore_get_database_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Database(); - $xfer += $this->success->read($input); + 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(); + $this->o1 = new \metastore\AlreadyExistsException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -5381,12 +6908,20 @@ class ThriftHiveMetastore_get_database_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $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; @@ -5399,13 +6934,10 @@ class ThriftHiveMetastore_get_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -5418,6 +6950,11 @@ class ThriftHiveMetastore_get_database_result { $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; @@ -5425,45 +6962,29 @@ class ThriftHiveMetastore_get_database_result { } -class ThriftHiveMetastore_drop_database_args { +class ThriftHiveMetastore_drop_type_args { static $_TSPEC; - public $name = null; - public $deleteData = null; - public $cascade = null; + public $type = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'type', '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']; + if (isset($vals['type'])) { + $this->type = $vals['type']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_args'; + return 'ThriftHiveMetastore_drop_type_args'; } public function read($input) @@ -5483,21 +7004,7 @@ class ThriftHiveMetastore_drop_database_args { { 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); + $xfer += $input->readString($this->type); } else { $xfer += $input->skip($ftype); } @@ -5514,20 +7021,10 @@ class ThriftHiveMetastore_drop_database_args { 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->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(); @@ -5537,48 +7034,47 @@ class ThriftHiveMetastore_drop_database_args { } -class ThriftHiveMetastore_drop_database_result { +class ThriftHiveMetastore_drop_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\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidOperationException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + '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']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_result'; + return 'ThriftHiveMetastore_drop_type_result'; } public function read($input) @@ -5596,26 +7092,25 @@ class ThriftHiveMetastore_drop_database_result { } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\InvalidOperationException(); - $xfer += $this->o2->read($input); + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -5632,7 +7127,12 @@ class ThriftHiveMetastore_drop_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + $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); @@ -5643,11 +7143,6 @@ class ThriftHiveMetastore_drop_database_result { $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; @@ -5655,29 +7150,29 @@ class ThriftHiveMetastore_drop_database_result { } -class ThriftHiveMetastore_get_databases_args { +class ThriftHiveMetastore_get_type_all_args { static $_TSPEC; - public $pattern = null; + public $name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'pattern', + 'var' => 'name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['name'])) { + $this->name = $vals['name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_args'; + return 'ThriftHiveMetastore_get_type_all_args'; } public function read($input) @@ -5697,7 +7192,7 @@ class ThriftHiveMetastore_get_databases_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } @@ -5714,10 +7209,10 @@ class ThriftHiveMetastore_get_databases_args { 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->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(); @@ -5727,25 +7222,30 @@ class ThriftHiveMetastore_get_databases_args { } -class ThriftHiveMetastore_get_databases_result { +class ThriftHiveMetastore_get_type_all_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::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', ), ), 1 => array( - 'var' => 'o1', + 'var' => 'o2', 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), @@ -5755,14 +7255,14 @@ class ThriftHiveMetastore_get_databases_result { 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_databases_result'; + return 'ThriftHiveMetastore_get_type_all_result'; } public function read($input) @@ -5781,26 +7281,30 @@ class ThriftHiveMetastore_get_databases_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { + if ($ftype == TType::MAP) { $this->success = array(); - $_size248 = 0; - $_etype251 = 0; - $xfer += $input->readListBegin($_etype251, $_size248); - for ($_i252 = 0; $_i252 < $_size248; ++$_i252) + $_size262 = 0; + $_ktype263 = 0; + $_vtype264 = 0; + $xfer += $input->readMapBegin($_ktype263, $_vtype264, $_size262); + for ($_i266 = 0; $_i266 < $_size262; ++$_i266) { - $elem253 = null; - $xfer += $input->readString($elem253); - $this->success []= $elem253; + $key267 = ''; + $val268 = new \metastore\Type(); + $xfer += $input->readString($key267); + $val268 = new \metastore\Type(); + $xfer += $val268->read($input); + $this->success[$key267] = $val268; } - $xfer += $input->readListEnd(); + $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); + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -5817,27 +7321,28 @@ class ThriftHiveMetastore_get_databases_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + $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::LST, 0); + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter254) + foreach ($this->success as $kiter269 => $viter270) { - $xfer += $output->writeString($iter254); + $xfer += $output->writeString($kiter269); + $xfer += $viter270->write($output); } } - $output->writeListEnd(); + $output->writeMapEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5847,19 +7352,37 @@ class ThriftHiveMetastore_get_databases_result { } -class ThriftHiveMetastore_get_all_databases_args { +class ThriftHiveMetastore_get_fields_args { static $_TSPEC; + public $db_name = null; + public $table_name = null; - public function __construct() { + 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_all_databases_args'; + return 'ThriftHiveMetastore_get_fields_args'; } public function read($input) @@ -5877,6 +7400,20 @@ class ThriftHiveMetastore_get_all_databases_args { } 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; @@ -5889,7 +7426,17 @@ class ThriftHiveMetastore_get_all_databases_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $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; @@ -5897,11 +7444,13 @@ class ThriftHiveMetastore_get_all_databases_args { } -class ThriftHiveMetastore_get_all_databases_result { +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)) { @@ -5909,9 +7458,10 @@ class ThriftHiveMetastore_get_all_databases_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', ), ), 1 => array( @@ -5919,6 +7469,16 @@ class ThriftHiveMetastore_get_all_databases_result { '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)) { @@ -5928,11 +7488,17 @@ class ThriftHiveMetastore_get_all_databases_result { 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_all_databases_result'; + return 'ThriftHiveMetastore_get_fields_result'; } public function read($input) @@ -5953,14 +7519,15 @@ class ThriftHiveMetastore_get_all_databases_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size255 = 0; - $_etype258 = 0; - $xfer += $input->readListBegin($_etype258, $_size255); - for ($_i259 = 0; $_i259 < $_size255; ++$_i259) + $_size271 = 0; + $_etype274 = 0; + $xfer += $input->readListBegin($_etype274, $_size271); + for ($_i275 = 0; $_i275 < $_size271; ++$_i275) { - $elem260 = null; - $xfer += $input->readString($elem260); - $this->success []= $elem260; + $elem276 = null; + $elem276 = new \metastore\FieldSchema(); + $xfer += $elem276->read($input); + $this->success []= $elem276; } $xfer += $input->readListEnd(); } else { @@ -5975,6 +7542,22 @@ class ThriftHiveMetastore_get_all_databases_result { $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; @@ -5987,18 +7570,18 @@ class ThriftHiveMetastore_get_all_databases_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + $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::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter261) + foreach ($this->success as $iter277) { - $xfer += $output->writeString($iter261); + $xfer += $iter277->write($output); } } $output->writeListEnd(); @@ -6010,6 +7593,16 @@ class ThriftHiveMetastore_get_all_databases_result { $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; @@ -6017,38 +7610,37 @@ class ThriftHiveMetastore_get_all_databases_result { } -class ThriftHiveMetastore_alter_database_args { +class ThriftHiveMetastore_get_schema_args { static $_TSPEC; - public $dbname = null; - public $db = null; + public $db_name = null; + public $table_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'db', - 'type' => TType::STRUCT, - 'class' => '\metastore\Database', + 'var' => 'table_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['db'])) { - $this->db = $vals['db']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_database_args'; + return 'ThriftHiveMetastore_get_schema_args'; } public function read($input) @@ -6068,15 +7660,14 @@ class ThriftHiveMetastore_alter_database_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRUCT) { - $this->db = new \metastore\Database(); - $xfer += $this->db->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } @@ -6093,18 +7684,15 @@ class ThriftHiveMetastore_alter_database_args { 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->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->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); + 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(); @@ -6114,15 +7702,26 @@ class ThriftHiveMetastore_alter_database_args { } -class ThriftHiveMetastore_alter_database_result { +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, @@ -6131,22 +7730,33 @@ class ThriftHiveMetastore_alter_database_result { 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + '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_alter_database_result'; + return 'ThriftHiveMetastore_get_schema_result'; } public function read($input) @@ -6164,6 +7774,24 @@ class ThriftHiveMetastore_alter_database_result { } switch ($fid) { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size278 = 0; + $_etype281 = 0; + $xfer += $input->readListBegin($_etype281, $_size278); + for ($_i282 = 0; $_i282 < $_size278; ++$_i282) + { + $elem283 = null; + $elem283 = new \metastore\FieldSchema(); + $xfer += $elem283->read($input); + $this->success []= $elem283; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { $this->o1 = new \metastore\MetaException(); @@ -6174,12 +7802,20 @@ class ThriftHiveMetastore_alter_database_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchObjectException(); + $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; @@ -6192,7 +7828,24 @@ class ThriftHiveMetastore_alter_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_result'); + $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 $iter284) + { + $xfer += $iter284->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -6203,6 +7856,11 @@ class ThriftHiveMetastore_alter_database_result { $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; @@ -6210,29 +7868,30 @@ class ThriftHiveMetastore_alter_database_result { } -class ThriftHiveMetastore_get_type_args { +class ThriftHiveMetastore_create_table_args { static $_TSPEC; - public $name = null; + public $tbl = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_args'; + return 'ThriftHiveMetastore_create_table_args'; } public function read($input) @@ -6251,8 +7910,9 @@ class ThriftHiveMetastore_get_type_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::STRUCT) { + $this->tbl = new \metastore\Table(); + $xfer += $this->tbl->read($input); } else { $xfer += $input->skip($ftype); } @@ -6269,10 +7929,13 @@ class ThriftHiveMetastore_get_type_args { 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->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(); @@ -6282,48 +7945,57 @@ class ThriftHiveMetastore_get_type_args { } -class ThriftHiveMetastore_get_type_result { +class ThriftHiveMetastore_create_table_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\Type', - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + '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['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_type_result'; + return 'ThriftHiveMetastore_create_table_result'; } public function read($input) @@ -6341,26 +8013,34 @@ class ThriftHiveMetastore_get_type_result { } switch ($fid) { - case 0: + case 1: if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Type(); - $xfer += $this->success->read($input); + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); - $xfer += $this->o1->read($input); + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 3: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchObjectException(); - $xfer += $this->o2->read($input); + $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); } @@ -6377,15 +8057,7 @@ class ThriftHiveMetastore_get_type_result { 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(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -6396,6 +8068,16 @@ class ThriftHiveMetastore_get_type_result { $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; @@ -6403,30 +8085,39 @@ class ThriftHiveMetastore_get_type_result { } -class ThriftHiveMetastore_create_type_args { +class ThriftHiveMetastore_create_table_with_environment_context_args { static $_TSPEC; - public $type = null; + public $tbl = null; + public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', + 'var' => 'tbl', 'type' => TType::STRUCT, - 'class' => '\metastore\Type', + 'class' => '\metastore\Table', + ), + 2 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + 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_type_args'; + return 'ThriftHiveMetastore_create_table_with_environment_context_args'; } public function read($input) @@ -6446,8 +8137,16 @@ class ThriftHiveMetastore_create_type_args { { case 1: if ($ftype == TType::STRUCT) { - $this->type = new \metastore\Type(); - $xfer += $this->type->read($input); + $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); } @@ -6464,13 +8163,21 @@ class ThriftHiveMetastore_create_type_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); - if ($this->type !== null) { - if (!is_object($this->type)) { + $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('type', TType::STRUCT, 1); - $xfer += $this->type->write($output); + $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(); @@ -6480,21 +8187,17 @@ class ThriftHiveMetastore_create_type_args { } -class ThriftHiveMetastore_create_type_result { +class ThriftHiveMetastore_create_table_with_environment_context_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, @@ -6510,12 +8213,14 @@ class ThriftHiveMetastore_create_type_result { 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), + 4 => array( + 'var' => 'o4', + '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']; } @@ -6525,11 +8230,14 @@ class ThriftHiveMetastore_create_type_result { if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_create_type_result'; + return 'ThriftHiveMetastore_create_table_with_environment_context_result'; } public function read($input) @@ -6547,13 +8255,6 @@ class ThriftHiveMetastore_create_type_result { } 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(); @@ -6578,6 +8279,14 @@ class ThriftHiveMetastore_create_type_result { $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; @@ -6590,12 +8299,7 @@ class ThriftHiveMetastore_create_type_result { 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(); - } + $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); @@ -6611,6 +8315,11 @@ class ThriftHiveMetastore_create_type_result { $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; @@ -6618,29 +8327,45 @@ class ThriftHiveMetastore_create_type_result { } -class ThriftHiveMetastore_drop_type_args { +class ThriftHiveMetastore_drop_table_args { static $_TSPEC; - public $type = null; + public $dbname = null; + public $name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', + '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['type'])) { - $this->type = $vals['type']; + 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_type_args'; + return 'ThriftHiveMetastore_drop_table_args'; } public function read($input) @@ -6660,7 +8385,21 @@ class ThriftHiveMetastore_drop_type_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); + $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); } @@ -6677,10 +8416,20 @@ class ThriftHiveMetastore_drop_type_args { 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->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(); @@ -6690,47 +8439,39 @@ class ThriftHiveMetastore_drop_type_args { } -class ThriftHiveMetastore_drop_type_result { +class ThriftHiveMetastore_drop_table_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\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( - 'var' => 'o2', + 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + '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_drop_type_result'; + return 'ThriftHiveMetastore_drop_table_result'; } public function read($input) @@ -6748,16 +8489,9 @@ class ThriftHiveMetastore_drop_type_result { } 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(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6765,8 +8499,8 @@ class ThriftHiveMetastore_drop_type_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchObjectException(); - $xfer += $this->o2->read($input); + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -6783,20 +8517,15 @@ class ThriftHiveMetastore_drop_type_result { 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(); - } + $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->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6806,29 +8535,54 @@ class ThriftHiveMetastore_drop_type_result { } -class ThriftHiveMetastore_get_type_all_args { +class ThriftHiveMetastore_drop_table_with_environment_context_args { static $_TSPEC; + public $dbname = null; public $name = null; + public $deleteData = 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' => 'name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 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['name'])) { $this->name = $vals['name']; } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_type_all_args'; + return 'ThriftHiveMetastore_drop_table_with_environment_context_args'; } public function read($input) @@ -6848,11 +8602,33 @@ class ThriftHiveMetastore_get_type_all_args { { 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; + 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; @@ -6865,12 +8641,30 @@ class ThriftHiveMetastore_get_type_all_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_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->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $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(); + } + 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; @@ -6878,47 +8672,39 @@ class ThriftHiveMetastore_get_type_all_args { } -class ThriftHiveMetastore_get_type_all_result { +class ThriftHiveMetastore_drop_table_with_environment_context_result { static $_TSPEC; - public $success = null; - public $o2 = null; + public $o1 = null; + public $o3 = 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', + '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['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_type_all_result'; + return 'ThriftHiveMetastore_drop_table_with_environment_context_result'; } public function read($input) @@ -6936,31 +8722,18 @@ class ThriftHiveMetastore_get_type_all_result { } switch ($fid) { - case 0: - if ($ftype == TType::MAP) { - $this->success = array(); - $_size262 = 0; - $_ktype263 = 0; - $_vtype264 = 0; - $xfer += $input->readMapBegin($_ktype263, $_vtype264, $_size262); - for ($_i266 = 0; $_i266 < $_size262; ++$_i266) - { - $key267 = ''; - $val268 = new \metastore\Type(); - $xfer += $input->readString($key267); - $val268 = new \metastore\Type(); - $xfer += $val268->read($input); - $this->success[$key267] = $val268; - } - $xfer += $input->readMapEnd(); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); - $xfer += $this->o2->read($input); + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -6977,28 +8750,15 @@ class ThriftHiveMetastore_get_type_all_result { 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 $kiter269 => $viter270) - { - $xfer += $output->writeString($kiter269); - $xfer += $viter270->write($output); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_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, 1); - $xfer += $this->o2->write($output); + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7008,11 +8768,11 @@ class ThriftHiveMetastore_get_type_all_result { } -class ThriftHiveMetastore_get_fields_args { +class ThriftHiveMetastore_get_tables_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $pattern = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7022,7 +8782,7 @@ class ThriftHiveMetastore_get_fields_args { 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + 'var' => 'pattern', 'type' => TType::STRING, ), ); @@ -7031,14 +8791,14 @@ class ThriftHiveMetastore_get_fields_args { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_args'; + return 'ThriftHiveMetastore_get_tables_args'; } public function read($input) @@ -7065,7 +8825,7 @@ class ThriftHiveMetastore_get_fields_args { break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); + $xfer += $input->readString($this->pattern); } else { $xfer += $input->skip($ftype); } @@ -7082,15 +8842,15 @@ class ThriftHiveMetastore_get_fields_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + $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->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7100,13 +8860,11 @@ class ThriftHiveMetastore_get_fields_args { } -class ThriftHiveMetastore_get_fields_result { +class ThriftHiveMetastore_get_tables_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7114,10 +8872,9 @@ class ThriftHiveMetastore_get_fields_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\FieldSchema', + 'type' => TType::STRING, ), ), 1 => array( @@ -7125,16 +8882,6 @@ class ThriftHiveMetastore_get_fields_result { '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)) { @@ -7144,17 +8891,11 @@ class ThriftHiveMetastore_get_fields_result { 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'; + return 'ThriftHiveMetastore_get_tables_result'; } public function read($input) @@ -7175,41 +8916,24 @@ class ThriftHiveMetastore_get_fields_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size271 = 0; - $_etype274 = 0; - $xfer += $input->readListBegin($_etype274, $_size271); - for ($_i275 = 0; $_i275 < $_size271; ++$_i275) + $_size285 = 0; + $_etype288 = 0; + $xfer += $input->readListBegin($_etype288, $_size285); + for ($_i289 = 0; $_i289 < $_size285; ++$_i289) { - $elem276 = null; - $elem276 = new \metastore\FieldSchema(); - $xfer += $elem276->read($input); - $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; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\UnknownTableException(); - $xfer += $this->o2->read($input); + $elem290 = null; + $xfer += $input->readString($elem290); + $this->success []= $elem290; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\UnknownDBException(); - $xfer += $this->o3->read($input); + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -7226,18 +8950,18 @@ class ThriftHiveMetastore_get_fields_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result'); + $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::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter277) + foreach ($this->success as $iter291) { - $xfer += $iter277->write($output); + $xfer += $output->writeString($iter291); } } $output->writeListEnd(); @@ -7249,16 +8973,6 @@ class ThriftHiveMetastore_get_fields_result { $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; @@ -7266,11 +8980,10 @@ class ThriftHiveMetastore_get_fields_result { } -class ThriftHiveMetastore_get_schema_args { +class ThriftHiveMetastore_get_all_tables_args { static $_TSPEC; public $db_name = null; - public $table_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7279,24 +8992,17 @@ class ThriftHiveMetastore_get_schema_args { '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'; + return 'ThriftHiveMetastore_get_all_tables_args'; } public function read($input) @@ -7321,13 +9027,6 @@ class ThriftHiveMetastore_get_schema_args { $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; @@ -7340,17 +9039,12 @@ class ThriftHiveMetastore_get_schema_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + $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(); } - 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; @@ -7358,13 +9052,11 @@ class ThriftHiveMetastore_get_schema_args { } -class ThriftHiveMetastore_get_schema_result { +class ThriftHiveMetastore_get_all_tables_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7372,10 +9064,9 @@ class ThriftHiveMetastore_get_schema_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\FieldSchema', + 'type' => TType::STRING, ), ), 1 => array( @@ -7383,16 +9074,6 @@ class ThriftHiveMetastore_get_schema_result { '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)) { @@ -7402,17 +9083,11 @@ class ThriftHiveMetastore_get_schema_result { 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'; + return 'ThriftHiveMetastore_get_all_tables_result'; } public function read($input) @@ -7433,15 +9108,14 @@ class ThriftHiveMetastore_get_schema_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size278 = 0; - $_etype281 = 0; - $xfer += $input->readListBegin($_etype281, $_size278); - for ($_i282 = 0; $_i282 < $_size278; ++$_i282) + $_size292 = 0; + $_etype295 = 0; + $xfer += $input->readListBegin($_etype295, $_size292); + for ($_i296 = 0; $_i296 < $_size292; ++$_i296) { - $elem283 = null; - $elem283 = new \metastore\FieldSchema(); - $xfer += $elem283->read($input); - $this->success []= $elem283; + $elem297 = null; + $xfer += $input->readString($elem297); + $this->success []= $elem297; } $xfer += $input->readListEnd(); } else { @@ -7456,22 +9130,6 @@ class ThriftHiveMetastore_get_schema_result { $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; @@ -7484,18 +9142,18 @@ class ThriftHiveMetastore_get_schema_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result'); + $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::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter284) + foreach ($this->success as $iter298) { - $xfer += $iter284->write($output); + $xfer += $output->writeString($iter298); } } $output->writeListEnd(); @@ -7507,16 +9165,6 @@ class ThriftHiveMetastore_get_schema_result { $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; @@ -7524,30 +9172,37 @@ class ThriftHiveMetastore_get_schema_result { } -class ThriftHiveMetastore_create_table_args { +class ThriftHiveMetastore_get_table_args { static $_TSPEC; - public $tbl = null; + public $dbname = null; + public $tbl_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'tbl', - 'type' => TType::STRUCT, - 'class' => '\metastore\Table', + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_args'; + return 'ThriftHiveMetastore_get_table_args'; } public function read($input) @@ -7566,9 +9221,15 @@ class ThriftHiveMetastore_create_table_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->tbl = new \metastore\Table(); - $xfer += $this->tbl->read($input); + 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); } @@ -7585,13 +9246,15 @@ class ThriftHiveMetastore_create_table_args { 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->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(); @@ -7601,57 +9264,48 @@ class ThriftHiveMetastore_create_table_args { } -class ThriftHiveMetastore_create_table_result { +class ThriftHiveMetastore_get_table_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\Table', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', + 'class' => '\metastore\MetaException', ), 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['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_create_table_result'; + return 'ThriftHiveMetastore_get_table_result'; } public function read($input) @@ -7669,34 +9323,26 @@ class ThriftHiveMetastore_create_table_result { } 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: + case 0: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\InvalidObjectException(); - $xfer += $this->o2->read($input); + $this->success = new \metastore\Table(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\MetaException(); - $xfer += $this->o3->read($input); + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 4: + case 2: if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\NoSuchObjectException(); - $xfer += $this->o4->read($input); + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -7707,13 +9353,21 @@ class ThriftHiveMetastore_create_table_result { } $xfer += $input->readFieldEnd(); } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); + $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); @@ -7724,16 +9378,6 @@ class ThriftHiveMetastore_create_table_result { $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; @@ -7741,39 +9385,41 @@ class ThriftHiveMetastore_create_table_result { } -class ThriftHiveMetastore_create_table_with_environment_context_args { +class ThriftHiveMetastore_get_table_objects_by_name_args { static $_TSPEC; - public $tbl = null; - public $environment_context = null; + public $dbname = null; + public $tbl_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'tbl', - 'type' => TType::STRUCT, - 'class' => '\metastore\Table', + 'var' => 'dbname', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => '\metastore\EnvironmentContext', + 'var' => 'tbl_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['tbl_names'])) { + $this->tbl_names = $vals['tbl_names']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_with_environment_context_args'; + return 'ThriftHiveMetastore_get_table_objects_by_name_args'; } public function read($input) @@ -7792,17 +9438,25 @@ class ThriftHiveMetastore_create_table_with_environment_context_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->tbl = new \metastore\Table(); - $xfer += $this->tbl->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRUCT) { - $this->environment_context = new \metastore\EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::LST) { + $this->tbl_names = array(); + $_size299 = 0; + $_etype302 = 0; + $xfer += $input->readListBegin($_etype302, $_size299); + for ($_i303 = 0; $_i303 < $_size299; ++$_i303) + { + $elem304 = null; + $xfer += $input->readString($elem304); + $this->tbl_names []= $elem304; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7819,21 +9473,27 @@ class ThriftHiveMetastore_create_table_with_environment_context_args { 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->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->environment_context !== null) { - if (!is_object($this->environment_context)) { + if ($this->tbl_names !== null) { + if (!is_array($this->tbl_names)) { 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->writeFieldBegin('tbl_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->tbl_names)); + { + foreach ($this->tbl_names as $iter305) + { + $xfer += $output->writeString($iter305); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7843,40 +9503,47 @@ class ThriftHiveMetastore_create_table_with_environment_context_args { } -class ThriftHiveMetastore_create_table_with_environment_context_result { +class ThriftHiveMetastore_get_table_objects_by_name_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::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\InvalidOperationException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\UnknownDBException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -7886,14 +9553,11 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { 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'; + return 'ThriftHiveMetastore_get_table_objects_by_name_result'; } public function read($input) @@ -7911,9 +9575,27 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { } switch ($fid) { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size306 = 0; + $_etype309 = 0; + $xfer += $input->readListBegin($_etype309, $_size306); + for ($_i310 = 0; $_i310 < $_size306; ++$_i310) + { + $elem311 = null; + $elem311 = new \metastore\Table(); + $xfer += $elem311->read($input); + $this->success []= $elem311; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\AlreadyExistsException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -7921,7 +9603,7 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\InvalidObjectException(); + $this->o2 = new \metastore\InvalidOperationException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -7929,20 +9611,12 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\MetaException(); + $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\NoSuchObjectException(); - $xfer += $this->o4->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7955,7 +9629,24 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_result'); + $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 $iter312) + { + $xfer += $iter312->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -7971,11 +9662,6 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { $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; @@ -7983,12 +9669,12 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { } -class ThriftHiveMetastore_drop_table_args { +class ThriftHiveMetastore_get_table_names_by_filter_args { static $_TSPEC; public $dbname = null; - public $name = null; - public $deleteData = null; + public $filter = null; + public $max_tables = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7998,12 +9684,12 @@ class ThriftHiveMetastore_drop_table_args { 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'filter', 'type' => TType::STRING, ), 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'max_tables', + 'type' => TType::I16, ), ); } @@ -8011,17 +9697,17 @@ class ThriftHiveMetastore_drop_table_args { if (isset($vals['dbname'])) { $this->dbname = $vals['dbname']; } - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['max_tables'])) { + $this->max_tables = $vals['max_tables']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_args'; + return 'ThriftHiveMetastore_get_table_names_by_filter_args'; } public function read($input) @@ -8048,14 +9734,14 @@ class ThriftHiveMetastore_drop_table_args { break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->filter); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_tables); } else { $xfer += $input->skip($ftype); } @@ -8072,20 +9758,20 @@ class ThriftHiveMetastore_drop_table_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); + $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->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->name); + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); + $xfer += $output->writeString($this->filter); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); + 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(); @@ -8095,31 +9781,52 @@ class ThriftHiveMetastore_drop_table_args { } -class ThriftHiveMetastore_drop_table_result { +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\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + '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']; } @@ -8127,7 +9834,7 @@ class ThriftHiveMetastore_drop_table_result { } public function getName() { - return 'ThriftHiveMetastore_drop_table_result'; + return 'ThriftHiveMetastore_get_table_names_by_filter_result'; } public function read($input) @@ -8145,9 +9852,26 @@ class ThriftHiveMetastore_drop_table_result { } switch ($fid) { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size313 = 0; + $_etype316 = 0; + $xfer += $input->readListBegin($_etype316, $_size313); + for ($_i317 = 0; $_i317 < $_size313; ++$_i317) + { + $elem318 = null; + $xfer += $input->readString($elem318); + $this->success []= $elem318; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -8155,7 +9879,15 @@ class ThriftHiveMetastore_drop_table_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\MetaException(); + $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); @@ -8173,14 +9905,36 @@ class ThriftHiveMetastore_drop_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); + $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 $iter319) + { + $xfer += $output->writeString($iter319); + } + } + $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, 2); + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } @@ -8191,13 +9945,12 @@ class ThriftHiveMetastore_drop_table_result { } -class ThriftHiveMetastore_drop_table_with_environment_context_args { +class ThriftHiveMetastore_alter_table_args { static $_TSPEC; public $dbname = null; - public $name = null; - public $deleteData = null; - public $environment_context = null; + public $tbl_name = null; + public $new_tbl = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -8207,17 +9960,13 @@ class ThriftHiveMetastore_drop_table_with_environment_context_args { 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - 4 => array( - 'var' => 'environment_context', + 'var' => 'new_tbl', 'type' => TType::STRUCT, - 'class' => '\metastore\EnvironmentContext', + 'class' => '\metastore\Table', ), ); } @@ -8225,20 +9974,17 @@ class ThriftHiveMetastore_drop_table_with_environment_context_args { if (isset($vals['dbname'])) { $this->dbname = $vals['dbname']; } - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_with_environment_context_args'; + return 'ThriftHiveMetastore_alter_table_args'; } public function read($input) @@ -8265,22 +10011,15 @@ class ThriftHiveMetastore_drop_table_with_environment_context_args { break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: if ($ftype == TType::STRUCT) { - $this->environment_context = new \metastore\EnvironmentContext(); - $xfer += $this->environment_context->read($input); + $this->new_tbl = new \metastore\Table(); + $xfer += $this->new_tbl->read($input); } else { $xfer += $input->skip($ftype); } @@ -8297,28 +10036,23 @@ class ThriftHiveMetastore_drop_table_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_with_environment_context_args'); + $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->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); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->environment_context !== null) { - if (!is_object($this->environment_context)) { + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { 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->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8328,11 +10062,11 @@ class ThriftHiveMetastore_drop_table_with_environment_context_args { } -class ThriftHiveMetastore_drop_table_with_environment_context_result { +class ThriftHiveMetastore_alter_table_result { static $_TSPEC; public $o1 = null; - public $o3 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -8340,10 +10074,10 @@ class ThriftHiveMetastore_drop_table_with_environment_context_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\InvalidOperationException', ), 2 => array( - 'var' => 'o3', + 'var' => 'o2', 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), @@ -8353,14 +10087,14 @@ class ThriftHiveMetastore_drop_table_with_environment_context_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_with_environment_context_result'; + return 'ThriftHiveMetastore_alter_table_result'; } public function read($input) @@ -8380,7 +10114,7 @@ class ThriftHiveMetastore_drop_table_with_environment_context_result { { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $this->o1 = new \metastore\InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -8388,8 +10122,8 @@ class ThriftHiveMetastore_drop_table_with_environment_context_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -8406,15 +10140,15 @@ class ThriftHiveMetastore_drop_table_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_with_environment_context_result'); + $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->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); - $xfer += $this->o3->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8424,37 +10158,55 @@ class ThriftHiveMetastore_drop_table_with_environment_context_result { } -class ThriftHiveMetastore_get_tables_args { +class ThriftHiveMetastore_alter_table_with_environment_context_args { static $_TSPEC; - public $db_name = null; - public $pattern = null; + 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' => 'db_name', + 'var' => 'dbname', 'type' => TType::STRING, ), 2 => array( - 'var' => 'pattern', + '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['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; } - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + 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_get_tables_args'; + return 'ThriftHiveMetastore_alter_table_with_environment_context_args'; } public function read($input) @@ -8474,14 +10226,30 @@ class ThriftHiveMetastore_get_tables_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $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); } @@ -8498,15 +10266,31 @@ class ThriftHiveMetastore_get_tables_args { 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->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->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); - $xfer += $output->writeString($this->pattern); + 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(); @@ -8516,42 +10300,39 @@ class ThriftHiveMetastore_get_tables_args { } -class ThriftHiveMetastore_get_tables_result { +class ThriftHiveMetastore_alter_table_with_environment_context_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\InvalidOperationException', + ), + 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_tables_result'; + return 'ThriftHiveMetastore_alter_table_with_environment_context_result'; } public function read($input) @@ -8569,27 +10350,18 @@ class ThriftHiveMetastore_get_tables_result { } 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; - $xfer += $input->readString($elem290); - $this->success []= $elem290; - } - $xfer += $input->readListEnd(); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); - $xfer += $this->o1->read($input); + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -8606,29 +10378,17 @@ class ThriftHiveMetastore_get_tables_result { 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 $iter291) - { - $xfer += $output->writeString($iter291); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $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; @@ -8636,29 +10396,30 @@ class ThriftHiveMetastore_get_tables_result { } -class ThriftHiveMetastore_get_all_tables_args { +class ThriftHiveMetastore_add_partition_args { static $_TSPEC; - public $db_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, + '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['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_args'; + return 'ThriftHiveMetastore_add_partition_args'; } public function read($input) @@ -8677,8 +10438,9 @@ class ThriftHiveMetastore_get_all_tables_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -8695,10 +10457,13 @@ class ThriftHiveMetastore_get_all_tables_args { 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->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(); @@ -8708,26 +10473,35 @@ class ThriftHiveMetastore_get_all_tables_args { } -class ThriftHiveMetastore_get_all_tables_result { +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::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + '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', ), ); @@ -8739,11 +10513,17 @@ class ThriftHiveMetastore_get_all_tables_result { 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_all_tables_result'; + return 'ThriftHiveMetastore_add_partition_result'; } public function read($input) @@ -8762,30 +10542,37 @@ class ThriftHiveMetastore_get_all_tables_result { 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(); + 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(); + $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; @@ -8798,22 +10585,13 @@ class ThriftHiveMetastore_get_all_tables_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($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->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8821,6 +10599,16 @@ class ThriftHiveMetastore_get_all_tables_result { $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; @@ -8828,37 +10616,39 @@ class ThriftHiveMetastore_get_all_tables_result { } -class ThriftHiveMetastore_get_table_args { +class ThriftHiveMetastore_add_partition_with_environment_context_args { static $_TSPEC; - public $dbname = 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' => 'dbname', - 'type' => TType::STRING, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_args'; + return 'ThriftHiveMetastore_add_partition_with_environment_context_args'; } public function read($input) @@ -8877,15 +10667,17 @@ class ThriftHiveMetastore_get_table_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + 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::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -8902,15 +10694,21 @@ class ThriftHiveMetastore_get_table_args { 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->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->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + 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(); @@ -8920,12 +10718,13 @@ class ThriftHiveMetastore_get_table_args { } -class ThriftHiveMetastore_get_table_result { +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)) { @@ -8933,17 +10732,22 @@ class ThriftHiveMetastore_get_table_result { 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => '\metastore\Table', + 'class' => '\metastore\Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', ), ); } @@ -8957,11 +10761,14 @@ class ThriftHiveMetastore_get_table_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_table_result'; + return 'ThriftHiveMetastore_add_partition_with_environment_context_result'; } public function read($input) @@ -8981,7 +10788,7 @@ class ThriftHiveMetastore_get_table_result { { case 0: if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Table(); + $this->success = new \metastore\Partition(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -8989,16 +10796,24 @@ class ThriftHiveMetastore_get_table_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); + $this->o1 = new \metastore\InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + 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->o2 = new \metastore\NoSuchObjectException(); - $xfer += $this->o2->read($input); + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -9015,7 +10830,7 @@ class ThriftHiveMetastore_get_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + $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); @@ -9034,6 +10849,11 @@ class ThriftHiveMetastore_get_table_result { $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; @@ -9041,41 +10861,34 @@ class ThriftHiveMetastore_get_table_result { } -class ThriftHiveMetastore_get_table_objects_by_name_args { +class ThriftHiveMetastore_add_partitions_args { static $_TSPEC; - public $dbname = null; - public $tbl_names = null; + public $new_parts = 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', + 'var' => 'new_parts', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tbl_names'])) { - $this->tbl_names = $vals['tbl_names']; + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_objects_by_name_args'; + return 'ThriftHiveMetastore_add_partitions_args'; } public function read($input) @@ -9094,23 +10907,17 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { 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(); - $_size299 = 0; - $_etype302 = 0; - $xfer += $input->readListBegin($_etype302, $_size299); - for ($_i303 = 0; $_i303 < $_size299; ++$_i303) + $this->new_parts = array(); + $_size320 = 0; + $_etype323 = 0; + $xfer += $input->readListBegin($_etype323, $_size320); + for ($_i324 = 0; $_i324 < $_size320; ++$_i324) { - $elem304 = null; - $xfer += $input->readString($elem304); - $this->tbl_names []= $elem304; + $elem325 = null; + $elem325 = new \metastore\Partition(); + $xfer += $elem325->read($input); + $this->new_parts []= $elem325; } $xfer += $input->readListEnd(); } else { @@ -9129,23 +10936,18 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { 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)) { + $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('tbl_names', TType::LST, 2); + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 1); { - $output->writeListBegin(TType::STRING, count($this->tbl_names)); + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); { - foreach ($this->tbl_names as $iter305) + foreach ($this->new_parts as $iter326) { - $xfer += $output->writeString($iter305); + $xfer += $iter326->write($output); } } $output->writeListEnd(); @@ -9159,7 +10961,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { } -class ThriftHiveMetastore_get_table_objects_by_name_result { +class ThriftHiveMetastore_add_partitions_result { static $_TSPEC; public $success = null; @@ -9172,27 +10974,22 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Table', - ), + 'type' => TType::I32, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidOperationException', + 'class' => '\metastore\AlreadyExistsException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => '\metastore\UnknownDBException', + 'class' => '\metastore\MetaException', ), ); } @@ -9213,7 +11010,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_get_table_objects_by_name_result'; + return 'ThriftHiveMetastore_add_partitions_result'; } public function read($input) @@ -9232,26 +11029,15 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size306 = 0; - $_etype309 = 0; - $xfer += $input->readListBegin($_etype309, $_size306); - for ($_i310 = 0; $_i310 < $_size306; ++$_i310) - { - $elem311 = null; - $elem311 = new \metastore\Table(); - $xfer += $elem311->read($input); - $this->success []= $elem311; - } - $xfer += $input->readListEnd(); + 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\MetaException(); + $this->o1 = new \metastore\InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9259,7 +11045,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\InvalidOperationException(); + $this->o2 = new \metastore\AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -9267,7 +11053,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\UnknownDBException(); + $this->o3 = new \metastore\MetaException(); $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); @@ -9285,22 +11071,10 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_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 $iter312) - { - $xfer += $iter312->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9325,45 +11099,49 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { } -class ThriftHiveMetastore_get_table_names_by_filter_args { +class ThriftHiveMetastore_append_partition_args { static $_TSPEC; - public $dbname = null; - public $filter = null; - public $max_tables = -1; + 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' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'filter', + 'var' => 'tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_tables', - 'type' => TType::I16, + 'var' => 'part_vals', + '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['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['filter'])) { - $this->filter = $vals['filter']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_tables'])) { - $this->max_tables = $vals['max_tables']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_names_by_filter_args'; + return 'ThriftHiveMetastore_append_partition_args'; } public function read($input) @@ -9383,21 +11161,31 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->filter); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_tables); + 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); } @@ -9414,20 +11202,32 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { 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->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->filter !== null) { - $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); - $xfer += $output->writeString($this->filter); + 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_tables !== null) { - $xfer += $output->writeFieldBegin('max_tables', TType::I16, 3); - $xfer += $output->writeI16($this->max_tables); + 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 $iter333) + { + $xfer += $output->writeString($iter333); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9437,7 +11237,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { } -class ThriftHiveMetastore_get_table_names_by_filter_result { +class ThriftHiveMetastore_append_partition_result { static $_TSPEC; public $success = null; @@ -9450,26 +11250,23 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidOperationException', + 'class' => '\metastore\AlreadyExistsException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => '\metastore\UnknownDBException', + 'class' => '\metastore\MetaException', ), ); } @@ -9490,7 +11287,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { } public function getName() { - return 'ThriftHiveMetastore_get_table_names_by_filter_result'; + return 'ThriftHiveMetastore_append_partition_result'; } public function read($input) @@ -9509,25 +11306,16 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size313 = 0; - $_etype316 = 0; - $xfer += $input->readListBegin($_etype316, $_size313); - for ($_i317 = 0; $_i317 < $_size313; ++$_i317) - { - $elem318 = null; - $xfer += $input->readString($elem318); - $this->success []= $elem318; - } - $xfer += $input->readListEnd(); + 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(); + $this->o1 = new \metastore\InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9535,7 +11323,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\InvalidOperationException(); + $this->o2 = new \metastore\AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -9543,7 +11331,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\UnknownDBException(); + $this->o3 = new \metastore\MetaException(); $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); @@ -9561,22 +11349,13 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($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 $iter319) - { - $xfer += $output->writeString($iter319); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9601,46 +11380,30 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { } -class ThriftHiveMetastore_alter_table_args { +class ThriftHiveMetastore_add_partitions_req_args { static $_TSPEC; - public $dbname = null; - public $tbl_name = null; - public $new_tbl = null; + public $request = 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', + 'var' => 'request', 'type' => TType::STRUCT, - 'class' => '\metastore\Table', + 'class' => '\metastore\AddPartitionsRequest', ), ); } 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['request'])) { + $this->request = $vals['request']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_args'; + return 'ThriftHiveMetastore_add_partitions_req_args'; } public function read($input) @@ -9659,23 +11422,9 @@ class ThriftHiveMetastore_alter_table_args { 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); + $this->request = new \metastore\AddPartitionsRequest(); + $xfer += $this->request->read($input); } else { $xfer += $input->skip($ftype); } @@ -9692,23 +11441,13 @@ class ThriftHiveMetastore_alter_table_args { 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)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_req_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { 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->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9718,39 +11457,57 @@ class ThriftHiveMetastore_alter_table_args { } -class ThriftHiveMetastore_alter_table_result { +class ThriftHiveMetastore_add_partitions_req_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\AddPartitionsResult', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidOperationException', + '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_alter_table_result'; + return 'ThriftHiveMetastore_add_partitions_req_result'; } public function read($input) @@ -9768,9 +11525,17 @@ class ThriftHiveMetastore_alter_table_result { } switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\AddPartitionsResult(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\InvalidOperationException(); + $this->o1 = new \metastore\InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9778,12 +11543,20 @@ class ThriftHiveMetastore_alter_table_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $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; @@ -9796,7 +11569,15 @@ class ThriftHiveMetastore_alter_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_req_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); @@ -9807,6 +11588,11 @@ class ThriftHiveMetastore_alter_table_result { $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; @@ -9814,19 +11600,19 @@ class ThriftHiveMetastore_alter_table_result { } -class ThriftHiveMetastore_alter_table_with_environment_context_args { +class ThriftHiveMetastore_append_partition_with_environment_context_args { static $_TSPEC; - public $dbname = null; + public $db_name = null; public $tbl_name = null; - public $new_tbl = null; + public $part_vals = null; public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( @@ -9834,9 +11620,12 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_tbl', - 'type' => TType::STRUCT, - 'class' => '\metastore\Table', + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 4 => array( 'var' => 'environment_context', @@ -9846,14 +11635,14 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + 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_tbl'])) { - $this->new_tbl = $vals['new_tbl']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } if (isset($vals['environment_context'])) { $this->environment_context = $vals['environment_context']; @@ -9862,7 +11651,7 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { } public function getName() { - return 'ThriftHiveMetastore_alter_table_with_environment_context_args'; + return 'ThriftHiveMetastore_append_partition_with_environment_context_args'; } public function read($input) @@ -9882,7 +11671,7 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -9895,9 +11684,18 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_tbl = new \metastore\Table(); - $xfer += $this->new_tbl->read($input); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size334 = 0; + $_etype337 = 0; + $xfer += $input->readListBegin($_etype337, $_size334); + for ($_i338 = 0; $_i338 < $_size334; ++$_i338) + { + $elem339 = null; + $xfer += $input->readString($elem339); + $this->part_vals []= $elem339; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -9922,10 +11720,10 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { 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->writeStructBegin('ThriftHiveMetastore_append_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) { @@ -9933,12 +11731,21 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_tbl !== null) { - if (!is_object($this->new_tbl)) { + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { 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->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter340) + { + $xfer += $output->writeString($iter340); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->environment_context !== null) { @@ -9956,39 +11763,57 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { } -class ThriftHiveMetastore_alter_table_with_environment_context_result { +class ThriftHiveMetastore_append_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\InvalidOperationException', + '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_alter_table_with_environment_context_result'; + return 'ThriftHiveMetastore_append_partition_with_environment_context_result'; } public function read($input) @@ -10006,18 +11831,34 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { } 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\InvalidOperationException(); + $this->o1 = new \metastore\InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + 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->o2 = new \metastore\MetaException(); - $xfer += $this->o2->read($input); + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -10034,7 +11875,15 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_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); @@ -10045,6 +11894,11 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { $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; @@ -10052,30 +11906,45 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { } -class ThriftHiveMetastore_add_partition_args { +class ThriftHiveMetastore_append_partition_by_name_args { static $_TSPEC; - public $new_part = null; + 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' => 'new_part', - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', + '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['new_part'])) { - $this->new_part = $vals['new_part']; + 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_add_partition_args'; + return 'ThriftHiveMetastore_append_partition_by_name_args'; } public function read($input) @@ -10094,9 +11963,22 @@ class ThriftHiveMetastore_add_partition_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_part = new \metastore\Partition(); - $xfer += $this->new_part->read($input); + 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); } @@ -10113,13 +11995,20 @@ class ThriftHiveMetastore_add_partition_args { 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->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(); @@ -10129,7 +12018,7 @@ class ThriftHiveMetastore_add_partition_args { } -class ThriftHiveMetastore_add_partition_result { +class ThriftHiveMetastore_append_partition_by_name_result { static $_TSPEC; public $success = null; @@ -10179,7 +12068,7 @@ class ThriftHiveMetastore_add_partition_result { } public function getName() { - return 'ThriftHiveMetastore_add_partition_result'; + return 'ThriftHiveMetastore_append_partition_by_name_result'; } public function read($input) @@ -10241,7 +12130,7 @@ class ThriftHiveMetastore_add_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + $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); @@ -10272,21 +12161,30 @@ class ThriftHiveMetastore_add_partition_result { } -class ThriftHiveMetastore_add_partition_with_environment_context_args { +class ThriftHiveMetastore_append_partition_by_name_with_environment_context_args { static $_TSPEC; - public $new_part = null; + public $db_name = null; + public $tbl_name = null; + public $part_name = 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', + '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' => 'environment_context', 'type' => TType::STRUCT, 'class' => '\metastore\EnvironmentContext', @@ -10294,8 +12192,14 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { ); } if (is_array($vals)) { - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + 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['environment_context'])) { $this->environment_context = $vals['environment_context']; @@ -10304,7 +12208,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { } public function getName() { - return 'ThriftHiveMetastore_add_partition_with_environment_context_args'; + return 'ThriftHiveMetastore_append_partition_by_name_with_environment_context_args'; } public function read($input) @@ -10323,14 +12227,27 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_part = new \metastore\Partition(); - $xfer += $this->new_part->read($input); + 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::STRUCT) { $this->environment_context = new \metastore\EnvironmentContext(); $xfer += $this->environment_context->read($input); @@ -10350,20 +12267,27 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { 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->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_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->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); $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 += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); $xfer += $this->environment_context->write($output); $xfer += $output->writeFieldEnd(); } @@ -10374,7 +12298,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { } -class ThriftHiveMetastore_add_partition_with_environment_context_result { +class ThriftHiveMetastore_append_partition_by_name_with_environment_context_result { static $_TSPEC; public $success = null; @@ -10424,7 +12348,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { } public function getName() { - return 'ThriftHiveMetastore_add_partition_with_environment_context_result'; + return 'ThriftHiveMetastore_append_partition_by_name_with_environment_context_result'; } public function read($input) @@ -10486,7 +12410,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_with_environment_context_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -10517,34 +12441,57 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { } -class ThriftHiveMetastore_add_partitions_args { +class ThriftHiveMetastore_drop_partition_args { static $_TSPEC; - public $new_parts = null; + 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' => 'new_parts', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', + 'type' => TType::STRING, ), ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { - if (isset($vals['new_parts'])) { - $this->new_parts = $vals['new_parts']; + 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_add_partitions_args'; + return 'ThriftHiveMetastore_drop_partition_args'; } public function read($input) @@ -10563,23 +12510,43 @@ class ThriftHiveMetastore_add_partitions_args { 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(); - $_size320 = 0; - $_etype323 = 0; - $xfer += $input->readListBegin($_etype323, $_size320); - for ($_i324 = 0; $_i324 < $_size320; ++$_i324) + $this->part_vals = array(); + $_size341 = 0; + $_etype344 = 0; + $xfer += $input->readListBegin($_etype344, $_size341); + for ($_i345 = 0; $_i345 < $_size341; ++$_i345) { - $elem325 = null; - $elem325 = new \metastore\Partition(); - $xfer += $elem325->read($input); - $this->new_parts []= $elem325; + $elem346 = null; + $xfer += $input->readString($elem346); + $this->part_vals []= $elem346; } $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; @@ -10592,24 +12559,39 @@ class ThriftHiveMetastore_add_partitions_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_args'); - if ($this->new_parts !== null) { - if (!is_array($this->new_parts)) { + $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('new_parts', TType::LST, 1); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); { - $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->new_parts as $iter326) + foreach ($this->part_vals as $iter347) { - $xfer += $iter326->write($output); + $xfer += $output->writeString($iter347); } } $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; @@ -10617,34 +12599,28 @@ class ThriftHiveMetastore_add_partitions_args { } -class ThriftHiveMetastore_add_partitions_result { +class ThriftHiveMetastore_drop_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::I32, + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), ); @@ -10659,14 +12635,11 @@ class ThriftHiveMetastore_add_partitions_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_partitions_result'; + return 'ThriftHiveMetastore_drop_partition_result'; } public function read($input) @@ -10685,15 +12658,15 @@ class ThriftHiveMetastore_add_partitions_result { switch ($fid) { case 0: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->success); + 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\InvalidObjectException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -10701,20 +12674,12 @@ class ThriftHiveMetastore_add_partitions_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\AlreadyExistsException(); + $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\MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10727,10 +12692,10 @@ class ThriftHiveMetastore_add_partitions_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::I32, 0); - $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10743,11 +12708,6 @@ class ThriftHiveMetastore_add_partitions_result { $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; @@ -10755,12 +12715,14 @@ class ThriftHiveMetastore_add_partitions_result { } -class ThriftHiveMetastore_append_partition_args { +class ThriftHiveMetastore_drop_partition_with_environment_context_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; + public $deleteData = null; + public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10781,6 +12743,15 @@ class ThriftHiveMetastore_append_partition_args { 'type' => TType::STRING, ), ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), ); } if (is_array($vals)) { @@ -10793,11 +12764,17 @@ class ThriftHiveMetastore_append_partition_args { if (isset($vals['part_vals'])) { $this->part_vals = $vals['part_vals']; } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_args'; + return 'ThriftHiveMetastore_drop_partition_with_environment_context_args'; } public function read($input) @@ -10832,20 +12809,35 @@ class ThriftHiveMetastore_append_partition_args { 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) + $_size348 = 0; + $_etype351 = 0; + $xfer += $input->readListBegin($_etype351, $_size348); + for ($_i352 = 0; $_i352 < $_size348; ++$_i352) { - $elem332 = null; - $xfer += $input->readString($elem332); - $this->part_vals []= $elem332; + $elem353 = null; + $xfer += $input->readString($elem353); + $this->part_vals []= $elem353; } $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; + case 5: + 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; @@ -10858,7 +12850,7 @@ class ThriftHiveMetastore_append_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_with_environment_context_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -10877,15 +12869,28 @@ class ThriftHiveMetastore_append_partition_args { { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter333) + foreach ($this->part_vals as $iter354) { - $xfer += $output->writeString($iter333); + $xfer += $output->writeString($iter354); } } $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $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, 5); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10893,35 +12898,28 @@ class ThriftHiveMetastore_append_partition_args { } -class ThriftHiveMetastore_append_partition_result { +class ThriftHiveMetastore_drop_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', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), ); @@ -10936,14 +12934,11 @@ class ThriftHiveMetastore_append_partition_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_result'; + return 'ThriftHiveMetastore_drop_partition_with_environment_context_result'; } public function read($input) @@ -10962,16 +12957,15 @@ class ThriftHiveMetastore_append_partition_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Partition(); - $xfer += $this->success->read($input); + 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\InvalidObjectException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -10979,20 +12973,12 @@ class ThriftHiveMetastore_append_partition_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\AlreadyExistsException(); + $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\MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -11005,13 +12991,10 @@ class ThriftHiveMetastore_append_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -11024,11 +13007,6 @@ class ThriftHiveMetastore_append_partition_result { $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; @@ -11036,30 +13014,53 @@ class ThriftHiveMetastore_append_partition_result { } -class ThriftHiveMetastore_add_partitions_req_args { +class ThriftHiveMetastore_drop_partition_by_name_args { static $_TSPEC; - public $request = null; + 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' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddPartitionsRequest', + '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['request'])) { - $this->request = $vals['request']; + 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_add_partitions_req_args'; + return 'ThriftHiveMetastore_drop_partition_by_name_args'; } public function read($input) @@ -11078,9 +13079,29 @@ class ThriftHiveMetastore_add_partitions_req_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->request = new \metastore\AddPartitionsRequest(); - $xfer += $this->request->read($input); + 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); } @@ -11097,13 +13118,25 @@ class ThriftHiveMetastore_add_partitions_req_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_req_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); + $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(); @@ -11113,35 +13146,28 @@ class ThriftHiveMetastore_add_partitions_req_args { } -class ThriftHiveMetastore_add_partitions_req_result { +class ThriftHiveMetastore_drop_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\AddPartitionsResult', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), ); @@ -11156,14 +13182,11 @@ class ThriftHiveMetastore_add_partitions_req_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_partitions_req_result'; + return 'ThriftHiveMetastore_drop_partition_by_name_result'; } public function read($input) @@ -11182,16 +13205,15 @@ class ThriftHiveMetastore_add_partitions_req_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\AddPartitionsResult(); - $xfer += $this->success->read($input); + 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\InvalidObjectException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -11199,20 +13221,12 @@ class ThriftHiveMetastore_add_partitions_req_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\AlreadyExistsException(); + $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\MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -11225,13 +13239,10 @@ class ThriftHiveMetastore_add_partitions_req_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_req_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -11244,11 +13255,6 @@ class ThriftHiveMetastore_add_partitions_req_result { $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; @@ -11256,12 +13262,13 @@ class ThriftHiveMetastore_add_partitions_req_result { } -class ThriftHiveMetastore_append_partition_with_environment_context_args { +class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; + public $part_name = null; + public $deleteData = null; public $environment_context = null; public function __construct($vals=null) { @@ -11276,14 +13283,14 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'part_name', + 'type' => TType::STRING, ), 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 5 => array( 'var' => 'environment_context', 'type' => TType::STRUCT, 'class' => '\metastore\EnvironmentContext', @@ -11297,8 +13304,11 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args { 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['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } if (isset($vals['environment_context'])) { $this->environment_context = $vals['environment_context']; @@ -11307,7 +13317,7 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args { } public function getName() { - return 'ThriftHiveMetastore_append_partition_with_environment_context_args'; + return 'ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args'; } public function read($input) @@ -11340,23 +13350,20 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args { } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size334 = 0; - $_etype337 = 0; - $xfer += $input->readListBegin($_etype337, $_size334); - for ($_i338 = 0; $_i338 < $_size334; ++$_i338) - { - $elem339 = null; - $xfer += $input->readString($elem339); - $this->part_vals []= $elem339; - } - $xfer += $input->readListEnd(); + 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; + case 5: if ($ftype == TType::STRUCT) { $this->environment_context = new \metastore\EnvironmentContext(); $xfer += $this->environment_context->read($input); @@ -11376,7 +13383,7 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_with_environment_context_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -11387,28 +13394,21 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args { $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 $iter340) - { - $xfer += $output->writeString($iter340); - } - } - $output->writeListEnd(); - } + 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(); } 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 += $output->writeFieldBegin('environment_context', TType::STRUCT, 5); $xfer += $this->environment_context->write($output); $xfer += $output->writeFieldEnd(); } @@ -11419,35 +13419,28 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args { } -class ThriftHiveMetastore_append_partition_with_environment_context_result { +class ThriftHiveMetastore_drop_partition_by_name_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', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), ); @@ -11462,14 +13455,11 @@ class ThriftHiveMetastore_append_partition_with_environment_context_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_with_environment_context_result'; + return 'ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result'; } public function read($input) @@ -11488,16 +13478,15 @@ class ThriftHiveMetastore_append_partition_with_environment_context_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Partition(); - $xfer += $this->success->read($input); + 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\InvalidObjectException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -11505,20 +13494,12 @@ class ThriftHiveMetastore_append_partition_with_environment_context_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\AlreadyExistsException(); + $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\MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -11531,13 +13512,10 @@ class ThriftHiveMetastore_append_partition_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -11550,11 +13528,6 @@ class ThriftHiveMetastore_append_partition_with_environment_context_result { $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; @@ -11562,12 +13535,12 @@ class ThriftHiveMetastore_append_partition_with_environment_context_result { } -class ThriftHiveMetastore_append_partition_by_name_args { +class ThriftHiveMetastore_get_partition_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $part_vals = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -11581,8 +13554,12 @@ class ThriftHiveMetastore_append_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -11593,14 +13570,14 @@ class ThriftHiveMetastore_append_partition_by_name_args { 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['part_vals'])) { + $this->part_vals = $vals['part_vals']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partition_args'; } public function read($input) @@ -11633,8 +13610,18 @@ class ThriftHiveMetastore_append_partition_by_name_args { } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size355 = 0; + $_etype358 = 0; + $xfer += $input->readListBegin($_etype358, $_size355); + for ($_i359 = 0; $_i359 < $_size355; ++$_i359) + { + $elem360 = null; + $xfer += $input->readString($elem360); + $this->part_vals []= $elem360; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -11651,7 +13638,7 @@ class ThriftHiveMetastore_append_partition_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args'); + $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); @@ -11662,9 +13649,21 @@ class ThriftHiveMetastore_append_partition_by_name_args { $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); + 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 $iter361) + { + $xfer += $output->writeString($iter361); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11674,13 +13673,12 @@ class ThriftHiveMetastore_append_partition_by_name_args { } -class ThriftHiveMetastore_append_partition_by_name_result { +class ThriftHiveMetastore_get_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)) { @@ -11693,17 +13691,12 @@ class ThriftHiveMetastore_append_partition_by_name_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), ); } @@ -11717,14 +13710,11 @@ class ThriftHiveMetastore_append_partition_by_name_result { 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'; + return 'ThriftHiveMetastore_get_partition_result'; } public function read($input) @@ -11752,7 +13742,7 @@ class ThriftHiveMetastore_append_partition_by_name_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\InvalidObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -11760,20 +13750,12 @@ class ThriftHiveMetastore_append_partition_by_name_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\AlreadyExistsException(); + $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\MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -11786,7 +13768,7 @@ class ThriftHiveMetastore_append_partition_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + $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); @@ -11805,11 +13787,6 @@ class ThriftHiveMetastore_append_partition_by_name_result { $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; @@ -11817,54 +13794,69 @@ class ThriftHiveMetastore_append_partition_by_name_result { } -class ThriftHiveMetastore_append_partition_by_name_with_environment_context_args { +class ThriftHiveMetastore_exchange_partition_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_name = null; - public $environment_context = null; + public $partitionSpecs = null; + public $source_db = null; + public $source_table_name = null; + public $dest_db = null; + public $dest_table_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, + 'var' => 'partitionSpecs', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'source_db', 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', + 'var' => 'source_table_name', 'type' => TType::STRING, ), 4 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => '\metastore\EnvironmentContext', + 'var' => 'dest_db', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'dest_table_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['partitionSpecs'])) { + $this->partitionSpecs = $vals['partitionSpecs']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['source_db'])) { + $this->source_db = $vals['source_db']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['source_table_name'])) { + $this->source_table_name = $vals['source_table_name']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['dest_db'])) { + $this->dest_db = $vals['dest_db']; + } + if (isset($vals['dest_table_name'])) { + $this->dest_table_name = $vals['dest_table_name']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_with_environment_context_args'; + return 'ThriftHiveMetastore_exchange_partition_args'; } public function read($input) @@ -11883,30 +13875,49 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_args switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + if ($ftype == TType::MAP) { + $this->partitionSpecs = array(); + $_size362 = 0; + $_ktype363 = 0; + $_vtype364 = 0; + $xfer += $input->readMapBegin($_ktype363, $_vtype364, $_size362); + for ($_i366 = 0; $_i366 < $_size362; ++$_i366) + { + $key367 = ''; + $val368 = ''; + $xfer += $input->readString($key367); + $xfer += $input->readString($val368); + $this->partitionSpecs[$key367] = $val368; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->source_db); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->source_table_name); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->environment_context = new \metastore\EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dest_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dest_table_name); } else { $xfer += $input->skip($ftype); } @@ -11923,28 +13934,43 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_args public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_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->writeStructBegin('ThriftHiveMetastore_exchange_partition_args'); + if ($this->partitionSpecs !== null) { + if (!is_array($this->partitionSpecs)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionSpecs', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs)); + { + foreach ($this->partitionSpecs as $kiter369 => $viter370) + { + $xfer += $output->writeString($kiter369); + $xfer += $output->writeString($viter370); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->source_db !== null) { + $xfer += $output->writeFieldBegin('source_db', TType::STRING, 2); + $xfer += $output->writeString($this->source_db); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + if ($this->source_table_name !== null) { + $xfer += $output->writeFieldBegin('source_table_name', TType::STRING, 3); + $xfer += $output->writeString($this->source_table_name); $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); + if ($this->dest_db !== null) { + $xfer += $output->writeFieldBegin('dest_db', TType::STRING, 4); + $xfer += $output->writeString($this->dest_db); + $xfer += $output->writeFieldEnd(); + } + if ($this->dest_table_name !== null) { + $xfer += $output->writeFieldBegin('dest_table_name', TType::STRING, 5); + $xfer += $output->writeString($this->dest_table_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11954,13 +13980,14 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_args } -class ThriftHiveMetastore_append_partition_by_name_with_environment_context_result { +class ThriftHiveMetastore_exchange_partition_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)) { @@ -11973,17 +14000,22 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', + 'class' => '\metastore\NoSuchObjectException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', ), ); } @@ -12000,11 +14032,14 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_with_environment_context_result'; + return 'ThriftHiveMetastore_exchange_partition_result'; } public function read($input) @@ -12032,7 +14067,7 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\InvalidObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -12040,7 +14075,7 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\AlreadyExistsException(); + $this->o2 = new \metastore\NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -12048,12 +14083,20 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\MetaException(); + $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; @@ -12066,7 +14109,7 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_exchange_partition_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -12090,6 +14133,11 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu $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; @@ -12097,13 +14145,14 @@ class ThriftHiveMetastore_append_partition_by_name_with_environment_context_resu } -class ThriftHiveMetastore_drop_partition_args { +class ThriftHiveMetastore_get_partition_with_auth_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; - public $deleteData = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12125,8 +14174,16 @@ class ThriftHiveMetastore_drop_partition_args { ), ), 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -12140,14 +14197,17 @@ class ThriftHiveMetastore_drop_partition_args { if (isset($vals['part_vals'])) { $this->part_vals = $vals['part_vals']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + 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_drop_partition_args'; + return 'ThriftHiveMetastore_get_partition_with_auth_args'; } public function read($input) @@ -12182,23 +14242,40 @@ class ThriftHiveMetastore_drop_partition_args { case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size341 = 0; - $_etype344 = 0; - $xfer += $input->readListBegin($_etype344, $_size341); - for ($_i345 = 0; $_i345 < $_size341; ++$_i345) + $_size371 = 0; + $_etype374 = 0; + $xfer += $input->readListBegin($_etype374, $_size371); + for ($_i375 = 0; $_i375 < $_size371; ++$_i375) { - $elem346 = null; - $xfer += $input->readString($elem346); - $this->part_vals []= $elem346; + $elem376 = null; + $xfer += $input->readString($elem376); + $this->part_vals []= $elem376; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + 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(); + $_size377 = 0; + $_etype380 = 0; + $xfer += $input->readListBegin($_etype380, $_size377); + for ($_i381 = 0; $_i381 < $_size377; ++$_i381) + { + $elem382 = null; + $xfer += $input->readString($elem382); + $this->group_names []= $elem382; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -12215,7 +14292,7 @@ class ThriftHiveMetastore_drop_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + $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); @@ -12234,18 +14311,35 @@ class ThriftHiveMetastore_drop_partition_args { { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter347) + foreach ($this->part_vals as $iter383) { - $xfer += $output->writeString($iter347); + $xfer += $output->writeString($iter383); } } $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + 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 $iter384) + { + $xfer += $output->writeString($iter384); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -12255,7 +14349,7 @@ class ThriftHiveMetastore_drop_partition_args { } -class ThriftHiveMetastore_drop_partition_result { +class ThriftHiveMetastore_get_partition_with_auth_result { static $_TSPEC; public $success = null; @@ -12267,17 +14361,18 @@ class ThriftHiveMetastore_drop_partition_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), ); } @@ -12295,7 +14390,7 @@ class ThriftHiveMetastore_drop_partition_result { } public function getName() { - return 'ThriftHiveMetastore_drop_partition_result'; + return 'ThriftHiveMetastore_get_partition_with_auth_result'; } public function read($input) @@ -12314,15 +14409,16 @@ class ThriftHiveMetastore_drop_partition_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + 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\NoSuchObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -12330,7 +14426,7 @@ class ThriftHiveMetastore_drop_partition_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $this->o2 = new \metastore\NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -12348,10 +14444,13 @@ class ThriftHiveMetastore_drop_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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) { @@ -12371,14 +14470,12 @@ class ThriftHiveMetastore_drop_partition_result { } -class ThriftHiveMetastore_drop_partition_with_environment_context_args { +class ThriftHiveMetastore_get_partition_by_name_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $deleteData = null; - public $environment_context = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12392,21 +14489,8 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args { '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, - ), - 5 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => '\metastore\EnvironmentContext', + 'var' => 'part_name', + 'type' => TType::STRING, ), ); } @@ -12417,20 +14501,14 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args { 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']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_with_environment_context_args'; + return 'ThriftHiveMetastore_get_partition_by_name_args'; } public function read($input) @@ -12463,33 +14541,8 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args { } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size348 = 0; - $_etype351 = 0; - $xfer += $input->readListBegin($_etype351, $_size348); - for ($_i352 = 0; $_i352 < $_size348; ++$_i352) - { - $elem353 = null; - $xfer += $input->readString($elem353); - $this->part_vals []= $elem353; - } - $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; - case 5: - if ($ftype == TType::STRUCT) { - $this->environment_context = new \metastore\EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -12506,7 +14559,7 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_with_environment_context_args'); + $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); @@ -12517,34 +14570,9 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args { $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 $iter354) - { - $xfer += $output->writeString($iter354); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); - $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, 5); - $xfer += $this->environment_context->write($output); + 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(); @@ -12554,7 +14582,7 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args { } -class ThriftHiveMetastore_drop_partition_with_environment_context_result { +class ThriftHiveMetastore_get_partition_by_name_result { static $_TSPEC; public $success = null; @@ -12566,17 +14594,18 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), ); } @@ -12594,7 +14623,7 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_result { } public function getName() { - return 'ThriftHiveMetastore_drop_partition_with_environment_context_result'; + return 'ThriftHiveMetastore_get_partition_by_name_result'; } public function read($input) @@ -12613,15 +14642,16 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + 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\NoSuchObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -12629,7 +14659,7 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $this->o2 = new \metastore\NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -12647,10 +14677,13 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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) { @@ -12670,13 +14703,12 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_result { } -class ThriftHiveMetastore_drop_partition_by_name_args { +class ThriftHiveMetastore_get_partitions_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; - public $deleteData = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12690,12 +14722,8 @@ class ThriftHiveMetastore_drop_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -12706,17 +14734,14 @@ class ThriftHiveMetastore_drop_partition_by_name_args { 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']; + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partitions_args'; } public function read($input) @@ -12749,15 +14774,8 @@ class ThriftHiveMetastore_drop_partition_by_name_args { } 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); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -12774,7 +14792,7 @@ class ThriftHiveMetastore_drop_partition_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); + $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); @@ -12785,14 +14803,9 @@ class ThriftHiveMetastore_drop_partition_by_name_args { $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); + 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(); @@ -12802,7 +14815,7 @@ class ThriftHiveMetastore_drop_partition_by_name_args { } -class ThriftHiveMetastore_drop_partition_by_name_result { +class ThriftHiveMetastore_get_partitions_result { static $_TSPEC; public $success = null; @@ -12814,7 +14827,12 @@ class ThriftHiveMetastore_drop_partition_by_name_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), ), 1 => array( 'var' => 'o1', @@ -12842,7 +14860,7 @@ class ThriftHiveMetastore_drop_partition_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_result'; + return 'ThriftHiveMetastore_get_partitions_result'; } public function read($input) @@ -12861,8 +14879,19 @@ class ThriftHiveMetastore_drop_partition_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size385 = 0; + $_etype388 = 0; + $xfer += $input->readListBegin($_etype388, $_size385); + for ($_i389 = 0; $_i389 < $_size385; ++$_i389) + { + $elem390 = null; + $elem390 = new \metastore\Partition(); + $xfer += $elem390->read($input); + $this->success []= $elem390; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -12895,10 +14924,22 @@ class ThriftHiveMetastore_drop_partition_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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 $iter391) + { + $xfer += $iter391->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -12918,14 +14959,14 @@ class ThriftHiveMetastore_drop_partition_by_name_result { } -class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { +class ThriftHiveMetastore_get_partitions_with_auth_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; - public $deleteData = null; - public $environment_context = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12939,17 +14980,20 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'max_parts', + 'type' => TType::I16, ), 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'user_name', + 'type' => TType::STRING, ), 5 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => '\metastore\EnvironmentContext', + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -12960,20 +15004,20 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { 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['max_parts'])) { + $this->max_parts = $vals['max_parts']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args'; + return 'ThriftHiveMetastore_get_partitions_with_auth_args'; } public function read($input) @@ -13006,23 +15050,32 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 5: - if ($ftype == TType::STRUCT) { - $this->environment_context = new \metastore\EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size392 = 0; + $_etype395 = 0; + $xfer += $input->readListBegin($_etype395, $_size392); + for ($_i396 = 0; $_i396 < $_size392; ++$_i396) + { + $elem397 = null; + $xfer += $input->readString($elem397); + $this->group_names []= $elem397; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -13039,7 +15092,7 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args'); + $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); @@ -13050,22 +15103,31 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { $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); + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->environment_context !== null) { - if (!is_object($this->environment_context)) { + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 5); - $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter398) + { + $xfer += $output->writeString($iter398); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -13075,7 +15137,7 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { } -class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result { +class ThriftHiveMetastore_get_partitions_with_auth_result { static $_TSPEC; public $success = null; @@ -13087,7 +15149,12 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), ), 1 => array( 'var' => 'o1', @@ -13115,7 +15182,7 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result'; + return 'ThriftHiveMetastore_get_partitions_with_auth_result'; } public function read($input) @@ -13134,8 +15201,19 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size399 = 0; + $_etype402 = 0; + $xfer += $input->readListBegin($_etype402, $_size399); + for ($_i403 = 0; $_i403 < $_size399; ++$_i403) + { + $elem404 = null; + $elem404 = new \metastore\Partition(); + $xfer += $elem404->read($input); + $this->success []= $elem404; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -13168,10 +15246,22 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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 $iter405) + { + $xfer += $iter405->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -13191,12 +15281,12 @@ class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result } -class ThriftHiveMetastore_get_partition_args { +class ThriftHiveMetastore_get_partition_names_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)) { @@ -13210,12 +15300,8 @@ class ThriftHiveMetastore_get_partition_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -13226,14 +15312,14 @@ class ThriftHiveMetastore_get_partition_args { 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_args'; + return 'ThriftHiveMetastore_get_partition_names_args'; } public function read($input) @@ -13266,18 +15352,8 @@ class ThriftHiveMetastore_get_partition_args { } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size355 = 0; - $_etype358 = 0; - $xfer += $input->readListBegin($_etype358, $_size355); - for ($_i359 = 0; $_i359 < $_size355; ++$_i359) - { - $elem360 = null; - $xfer += $input->readString($elem360); - $this->part_vals []= $elem360; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -13294,7 +15370,7 @@ class ThriftHiveMetastore_get_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + $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); @@ -13305,21 +15381,9 @@ class ThriftHiveMetastore_get_partition_args { $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 $iter361) - { - $xfer += $output->writeString($iter361); - } - } - $output->writeListEnd(); - } + 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(); @@ -13329,11 +15393,10 @@ class ThriftHiveMetastore_get_partition_args { } -class ThriftHiveMetastore_get_partition_result { +class ThriftHiveMetastore_get_partition_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -13341,18 +15404,16 @@ class ThriftHiveMetastore_get_partition_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', + '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', + 'class' => '\metastore\MetaException', ), ); } @@ -13360,9 +15421,6 @@ class ThriftHiveMetastore_get_partition_result { if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } @@ -13370,7 +15428,7 @@ class ThriftHiveMetastore_get_partition_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_result'; + return 'ThriftHiveMetastore_get_partition_names_result'; } public function read($input) @@ -13389,24 +15447,25 @@ class ThriftHiveMetastore_get_partition_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size406 = 0; + $_etype409 = 0; + $xfer += $input->readListBegin($_etype409, $_size406); + for ($_i410 = 0; $_i410 < $_size406; ++$_i410) + { + $elem411 = null; + $xfer += $input->readString($elem411); + $this->success []= $elem411; + } + $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(); + $this->o2 = new \metastore\MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -13424,22 +15483,26 @@ class ThriftHiveMetastore_get_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter412) + { + $xfer += $output->writeString($iter412); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -13450,69 +15513,57 @@ class ThriftHiveMetastore_get_partition_result { } -class ThriftHiveMetastore_exchange_partition_args { +class ThriftHiveMetastore_get_partitions_ps_args { static $_TSPEC; - public $partitionSpecs = null; - public $source_db = null; - public $source_table_name = null; - public $dest_db = null; - public $dest_table_name = null; + 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' => 'partitionSpecs', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), + 'var' => 'db_name', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'source_db', + 'var' => 'tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'source_table_name', - 'type' => TType::STRING, + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 4 => array( - 'var' => 'dest_db', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'dest_table_name', - 'type' => TType::STRING, + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } if (is_array($vals)) { - if (isset($vals['partitionSpecs'])) { - $this->partitionSpecs = $vals['partitionSpecs']; - } - if (isset($vals['source_db'])) { - $this->source_db = $vals['source_db']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['source_table_name'])) { - $this->source_table_name = $vals['source_table_name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['dest_db'])) { - $this->dest_db = $vals['dest_db']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } - if (isset($vals['dest_table_name'])) { - $this->dest_table_name = $vals['dest_table_name']; + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_exchange_partition_args'; + return 'ThriftHiveMetastore_get_partitions_ps_args'; } public function read($input) @@ -13531,49 +15582,39 @@ class ThriftHiveMetastore_exchange_partition_args { switch ($fid) { case 1: - if ($ftype == TType::MAP) { - $this->partitionSpecs = array(); - $_size362 = 0; - $_ktype363 = 0; - $_vtype364 = 0; - $xfer += $input->readMapBegin($_ktype363, $_vtype364, $_size362); - for ($_i366 = 0; $_i366 < $_size362; ++$_i366) - { - $key367 = ''; - $val368 = ''; - $xfer += $input->readString($key367); - $xfer += $input->readString($val368); - $this->partitionSpecs[$key367] = $val368; - } - $xfer += $input->readMapEnd(); + 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->source_db); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->source_table_name); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size413 = 0; + $_etype416 = 0; + $xfer += $input->readListBegin($_etype416, $_size413); + for ($_i417 = 0; $_i417 < $_size413; ++$_i417) + { + $elem418 = null; + $xfer += $input->readString($elem418); + $this->part_vals []= $elem418; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dest_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dest_table_name); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -13590,43 +15631,37 @@ class ThriftHiveMetastore_exchange_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_exchange_partition_args'); - if ($this->partitionSpecs !== null) { - if (!is_array($this->partitionSpecs)) { + $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('partitionSpecs', TType::MAP, 1); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs)); + $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->partitionSpecs as $kiter369 => $viter370) + foreach ($this->part_vals as $iter419) { - $xfer += $output->writeString($kiter369); - $xfer += $output->writeString($viter370); + $xfer += $output->writeString($iter419); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->source_db !== null) { - $xfer += $output->writeFieldBegin('source_db', TType::STRING, 2); - $xfer += $output->writeString($this->source_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->source_table_name !== null) { - $xfer += $output->writeFieldBegin('source_table_name', TType::STRING, 3); - $xfer += $output->writeString($this->source_table_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->dest_db !== null) { - $xfer += $output->writeFieldBegin('dest_db', TType::STRING, 4); - $xfer += $output->writeString($this->dest_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->dest_table_name !== null) { - $xfer += $output->writeFieldBegin('dest_table_name', TType::STRING, 5); - $xfer += $output->writeString($this->dest_table_name); + 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(); @@ -13636,22 +15671,24 @@ class ThriftHiveMetastore_exchange_partition_args { } -class ThriftHiveMetastore_exchange_partition_result { +class ThriftHiveMetastore_get_partitions_ps_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\Partition', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), ), 1 => array( 'var' => 'o1', @@ -13663,16 +15700,6 @@ class ThriftHiveMetastore_exchange_partition_result { 'type' => TType::STRUCT, 'class' => '\metastore\NoSuchObjectException', ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), ); } if (is_array($vals)) { @@ -13685,17 +15712,11 @@ class ThriftHiveMetastore_exchange_partition_result { 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_exchange_partition_result'; + return 'ThriftHiveMetastore_get_partitions_ps_result'; } public function read($input) @@ -13714,9 +15735,19 @@ class ThriftHiveMetastore_exchange_partition_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size420 = 0; + $_etype423 = 0; + $xfer += $input->readListBegin($_etype423, $_size420); + for ($_i424 = 0; $_i424 < $_size420; ++$_i424) + { + $elem425 = null; + $elem425 = new \metastore\Partition(); + $xfer += $elem425->read($input); + $this->success []= $elem425; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -13737,22 +15768,6 @@ class ThriftHiveMetastore_exchange_partition_result { $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; @@ -13765,13 +15780,22 @@ class ThriftHiveMetastore_exchange_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_exchange_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter426) + { + $xfer += $iter426->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -13784,16 +15808,6 @@ class ThriftHiveMetastore_exchange_partition_result { $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; @@ -13801,12 +15815,13 @@ class ThriftHiveMetastore_exchange_partition_result { } -class ThriftHiveMetastore_get_partition_with_auth_args { +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; @@ -13830,10 +15845,14 @@ class ThriftHiveMetastore_get_partition_with_auth_args { ), ), 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 5 => array( 'var' => 'user_name', 'type' => TType::STRING, ), - 5 => array( + 6 => array( 'var' => 'group_names', 'type' => TType::LST, 'etype' => TType::STRING, @@ -13853,6 +15872,9 @@ class ThriftHiveMetastore_get_partition_with_auth_args { 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']; } @@ -13863,7 +15885,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } public function getName() { - return 'ThriftHiveMetastore_get_partition_with_auth_args'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; } public function read($input) @@ -13898,14 +15920,14 @@ class ThriftHiveMetastore_get_partition_with_auth_args { case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size371 = 0; - $_etype374 = 0; - $xfer += $input->readListBegin($_etype374, $_size371); - for ($_i375 = 0; $_i375 < $_size371; ++$_i375) + $_size427 = 0; + $_etype430 = 0; + $xfer += $input->readListBegin($_etype430, $_size427); + for ($_i431 = 0; $_i431 < $_size427; ++$_i431) { - $elem376 = null; - $xfer += $input->readString($elem376); - $this->part_vals []= $elem376; + $elem432 = null; + $xfer += $input->readString($elem432); + $this->part_vals []= $elem432; } $xfer += $input->readListEnd(); } else { @@ -13913,23 +15935,30 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } 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 5: + case 6: if ($ftype == TType::LST) { $this->group_names = array(); - $_size377 = 0; - $_etype380 = 0; - $xfer += $input->readListBegin($_etype380, $_size377); - for ($_i381 = 0; $_i381 < $_size377; ++$_i381) + $_size433 = 0; + $_etype436 = 0; + $xfer += $input->readListBegin($_etype436, $_size433); + for ($_i437 = 0; $_i437 < $_size433; ++$_i437) { - $elem382 = null; - $xfer += $input->readString($elem382); - $this->group_names []= $elem382; + $elem438 = null; + $xfer += $input->readString($elem438); + $this->group_names []= $elem438; } $xfer += $input->readListEnd(); } else { @@ -13948,7 +15977,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_args'); + $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); @@ -13967,17 +15996,22 @@ class ThriftHiveMetastore_get_partition_with_auth_args { { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter383) + foreach ($this->part_vals as $iter439) { - $xfer += $output->writeString($iter383); + $xfer += $output->writeString($iter439); } } $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, 4); + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } @@ -13985,13 +16019,13 @@ class ThriftHiveMetastore_get_partition_with_auth_args { if (!is_array($this->group_names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter384) + foreach ($this->group_names as $iter440) { - $xfer += $output->writeString($iter384); + $xfer += $output->writeString($iter440); } } $output->writeListEnd(); @@ -14005,7 +16039,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } -class ThriftHiveMetastore_get_partition_with_auth_result { +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { static $_TSPEC; public $success = null; @@ -14017,18 +16051,22 @@ class ThriftHiveMetastore_get_partition_with_auth_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), ); } @@ -14046,7 +16084,7 @@ class ThriftHiveMetastore_get_partition_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_with_auth_result'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; } public function read($input) @@ -14065,16 +16103,26 @@ class ThriftHiveMetastore_get_partition_with_auth_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size441 = 0; + $_etype444 = 0; + $xfer += $input->readListBegin($_etype444, $_size441); + for ($_i445 = 0; $_i445 < $_size441; ++$_i445) + { + $elem446 = null; + $elem446 = new \metastore\Partition(); + $xfer += $elem446->read($input); + $this->success []= $elem446; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -14082,7 +16130,7 @@ class ThriftHiveMetastore_get_partition_with_auth_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchObjectException(); + $this->o2 = new \metastore\MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -14100,13 +16148,22 @@ class ThriftHiveMetastore_get_partition_with_auth_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter447) + { + $xfer += $iter447->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -14126,12 +16183,13 @@ class ThriftHiveMetastore_get_partition_with_auth_result { } -class ThriftHiveMetastore_get_partition_by_name_args { +class ThriftHiveMetastore_get_partition_names_ps_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -14145,8 +16203,16 @@ class ThriftHiveMetastore_get_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -14157,14 +16223,17 @@ class ThriftHiveMetastore_get_partition_by_name_args { 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['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_by_name_args'; + return 'ThriftHiveMetastore_get_partition_names_ps_args'; } public function read($input) @@ -14197,8 +16266,25 @@ class ThriftHiveMetastore_get_partition_by_name_args { } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size448 = 0; + $_etype451 = 0; + $xfer += $input->readListBegin($_etype451, $_size448); + for ($_i452 = 0; $_i452 < $_size448; ++$_i452) + { + $elem453 = null; + $xfer += $input->readString($elem453); + $this->part_vals []= $elem453; + } + $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); } @@ -14215,7 +16301,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); + $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); @@ -14226,9 +16312,26 @@ class ThriftHiveMetastore_get_partition_by_name_args { $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); + 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 $iter454) + { + $xfer += $output->writeString($iter454); + } + } + $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(); @@ -14238,7 +16341,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { } -class ThriftHiveMetastore_get_partition_by_name_result { +class ThriftHiveMetastore_get_partition_names_ps_result { static $_TSPEC; public $success = null; @@ -14250,8 +16353,11 @@ class ThriftHiveMetastore_get_partition_by_name_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( 'var' => 'o1', @@ -14279,7 +16385,7 @@ class ThriftHiveMetastore_get_partition_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_result'; + return 'ThriftHiveMetastore_get_partition_names_ps_result'; } public function read($input) @@ -14298,9 +16404,18 @@ class ThriftHiveMetastore_get_partition_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size455 = 0; + $_etype458 = 0; + $xfer += $input->readListBegin($_etype458, $_size455); + for ($_i459 = 0; $_i459 < $_size455; ++$_i459) + { + $elem460 = null; + $xfer += $input->readString($elem460); + $this->success []= $elem460; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -14333,13 +16448,22 @@ class ThriftHiveMetastore_get_partition_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter461) + { + $xfer += $output->writeString($iter461); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -14359,11 +16483,12 @@ class ThriftHiveMetastore_get_partition_by_name_result { } -class ThriftHiveMetastore_get_partitions_args { +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) { @@ -14378,6 +16503,10 @@ class ThriftHiveMetastore_get_partitions_args { 'type' => TType::STRING, ), 3 => array( + 'var' => 'filter', + 'type' => TType::STRING, + ), + 4 => array( 'var' => 'max_parts', 'type' => TType::I16, ), @@ -14390,6 +16519,9 @@ class ThriftHiveMetastore_get_partitions_args { 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']; } @@ -14397,7 +16529,7 @@ class ThriftHiveMetastore_get_partitions_args { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_args'; + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; } public function read($input) @@ -14430,6 +16562,13 @@ class ThriftHiveMetastore_get_partitions_args { } 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 { @@ -14448,7 +16587,7 @@ class ThriftHiveMetastore_get_partitions_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); + $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); @@ -14459,8 +16598,13 @@ class ThriftHiveMetastore_get_partitions_args { $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, 3); + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } @@ -14471,7 +16615,7 @@ class ThriftHiveMetastore_get_partitions_args { } -class ThriftHiveMetastore_get_partitions_result { +class ThriftHiveMetastore_get_partitions_by_filter_result { static $_TSPEC; public $success = null; @@ -14493,12 +16637,12 @@ class ThriftHiveMetastore_get_partitions_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), ); } @@ -14516,7 +16660,7 @@ class ThriftHiveMetastore_get_partitions_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_result'; + return 'ThriftHiveMetastore_get_partitions_by_filter_result'; } public function read($input) @@ -14537,15 +16681,15 @@ class ThriftHiveMetastore_get_partitions_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size385 = 0; - $_etype388 = 0; - $xfer += $input->readListBegin($_etype388, $_size385); - for ($_i389 = 0; $_i389 < $_size385; ++$_i389) + $_size462 = 0; + $_etype465 = 0; + $xfer += $input->readListBegin($_etype465, $_size462); + for ($_i466 = 0; $_i466 < $_size462; ++$_i466) { - $elem390 = null; - $elem390 = new \metastore\Partition(); - $xfer += $elem390->read($input); - $this->success []= $elem390; + $elem467 = null; + $elem467 = new \metastore\Partition(); + $xfer += $elem467->read($input); + $this->success []= $elem467; } $xfer += $input->readListEnd(); } else { @@ -14554,7 +16698,7 @@ class ThriftHiveMetastore_get_partitions_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -14562,7 +16706,7 @@ class ThriftHiveMetastore_get_partitions_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $this->o2 = new \metastore\NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -14580,7 +16724,7 @@ class ThriftHiveMetastore_get_partitions_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); + $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); @@ -14589,9 +16733,9 @@ class ThriftHiveMetastore_get_partitions_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter391) + foreach ($this->success as $iter468) { - $xfer += $iter391->write($output); + $xfer += $iter468->write($output); } } $output->writeListEnd(); @@ -14615,65 +16759,30 @@ class ThriftHiveMetastore_get_partitions_result { } -class ThriftHiveMetastore_get_partitions_with_auth_args { +class ThriftHiveMetastore_get_partitions_by_expr_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_parts = -1; - public $user_name = null; - public $group_names = null; + public $req = 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, - ), + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionsByExprRequest', ), ); } 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']; + if (isset($vals['req'])) { + $this->req = $vals['req']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_with_auth_args'; + return 'ThriftHiveMetastore_get_partitions_by_expr_args'; } public function read($input) @@ -14692,46 +16801,9 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { 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(); - $_size392 = 0; - $_etype395 = 0; - $xfer += $input->readListBegin($_etype395, $_size392); - for ($_i396 = 0; $_i396 < $_size392; ++$_i396) - { - $elem397 = null; - $xfer += $input->readString($elem397); - $this->group_names []= $elem397; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->req = new \metastore\PartitionsByExprRequest(); + $xfer += $this->req->read($input); } else { $xfer += $input->skip($ftype); } @@ -14748,42 +16820,13 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { 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)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_expr_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { 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 $iter398) - { - $xfer += $output->writeString($iter398); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14793,7 +16836,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { } -class ThriftHiveMetastore_get_partitions_with_auth_result { +class ThriftHiveMetastore_get_partitions_by_expr_result { static $_TSPEC; public $success = null; @@ -14805,22 +16848,18 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionsByExprResult', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), ); } @@ -14838,7 +16877,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_with_auth_result'; + return 'ThriftHiveMetastore_get_partitions_by_expr_result'; } public function read($input) @@ -14857,26 +16896,16 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size399 = 0; - $_etype402 = 0; - $xfer += $input->readListBegin($_etype402, $_size399); - for ($_i403 = 0; $_i403 < $_size399; ++$_i403) - { - $elem404 = null; - $elem404 = new \metastore\Partition(); - $xfer += $elem404->read($input); - $this->success []= $elem404; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\PartitionsByExprResult(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -14884,7 +16913,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $this->o2 = new \metastore\NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -14902,22 +16931,13 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_expr_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($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 $iter405) - { - $xfer += $iter405->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -14937,12 +16957,12 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { } -class ThriftHiveMetastore_get_partition_names_args { +class ThriftHiveMetastore_get_partitions_by_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_parts = -1; + public $names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -14956,8 +16976,12 @@ class ThriftHiveMetastore_get_partition_names_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -14968,14 +16992,14 @@ class ThriftHiveMetastore_get_partition_names_args { 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['names'])) { + $this->names = $vals['names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_args'; + return 'ThriftHiveMetastore_get_partitions_by_names_args'; } public function read($input) @@ -15008,8 +17032,18 @@ class ThriftHiveMetastore_get_partition_names_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::LST) { + $this->names = array(); + $_size469 = 0; + $_etype472 = 0; + $xfer += $input->readListBegin($_etype472, $_size469); + for ($_i473 = 0; $_i473 < $_size469; ++$_i473) + { + $elem474 = null; + $xfer += $input->readString($elem474); + $this->names []= $elem474; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -15026,7 +17060,7 @@ class ThriftHiveMetastore_get_partition_names_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); + $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); @@ -15037,9 +17071,21 @@ class ThriftHiveMetastore_get_partition_names_args { $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); + 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 $iter475) + { + $xfer += $output->writeString($iter475); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -15049,10 +17095,11 @@ class ThriftHiveMetastore_get_partition_names_args { } -class ThriftHiveMetastore_get_partition_names_result { +class ThriftHiveMetastore_get_partitions_by_names_result { static $_TSPEC; public $success = null; + public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -15061,22 +17108,31 @@ class ThriftHiveMetastore_get_partition_names_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), ), 1 => array( - 'var' => 'o2', + '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']; } @@ -15084,7 +17140,7 @@ class ThriftHiveMetastore_get_partition_names_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_result'; + return 'ThriftHiveMetastore_get_partitions_by_names_result'; } public function read($input) @@ -15105,14 +17161,15 @@ class ThriftHiveMetastore_get_partition_names_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size406 = 0; - $_etype409 = 0; - $xfer += $input->readListBegin($_etype409, $_size406); - for ($_i410 = 0; $_i410 < $_size406; ++$_i410) + $_size476 = 0; + $_etype479 = 0; + $xfer += $input->readListBegin($_etype479, $_size476); + for ($_i480 = 0; $_i480 < $_size476; ++$_i480) { - $elem411 = null; - $xfer += $input->readString($elem411); - $this->success []= $elem411; + $elem481 = null; + $elem481 = new \metastore\Partition(); + $xfer += $elem481->read($input); + $this->success []= $elem481; } $xfer += $input->readListEnd(); } else { @@ -15121,7 +17178,15 @@ class ThriftHiveMetastore_get_partition_names_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $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); @@ -15139,26 +17204,31 @@ class ThriftHiveMetastore_get_partition_names_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); + $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::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter412) + foreach ($this->success as $iter482) { - $xfer += $output->writeString($iter412); + $xfer += $iter482->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, 1); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -15169,13 +17239,12 @@ class ThriftHiveMetastore_get_partition_names_result { } -class ThriftHiveMetastore_get_partitions_ps_args { +class ThriftHiveMetastore_alter_partition_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -15189,16 +17258,9 @@ class ThriftHiveMetastore_get_partitions_ps_args { '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, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), ); } @@ -15209,17 +17271,14 @@ class ThriftHiveMetastore_get_partitions_ps_args { 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['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_args'; + return 'ThriftHiveMetastore_alter_partition_args'; } public function read($input) @@ -15252,25 +17311,9 @@ class ThriftHiveMetastore_get_partitions_ps_args { } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size413 = 0; - $_etype416 = 0; - $xfer += $input->readListBegin($_etype416, $_size413); - for ($_i417 = 0; $_i417 < $_size413; ++$_i417) - { - $elem418 = null; - $xfer += $input->readString($elem418); - $this->part_vals []= $elem418; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -15287,7 +17330,7 @@ class ThriftHiveMetastore_get_partitions_ps_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); + $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); @@ -15298,26 +17341,12 @@ class ThriftHiveMetastore_get_partitions_ps_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { 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 $iter419) - { - $xfer += $output->writeString($iter419); - } - } - $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->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -15327,41 +17356,28 @@ class ThriftHiveMetastore_get_partitions_ps_args { } -class ThriftHiveMetastore_get_partitions_ps_result { +class ThriftHiveMetastore_alter_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::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -15372,7 +17388,7 @@ class ThriftHiveMetastore_get_partitions_ps_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_result'; + return 'ThriftHiveMetastore_alter_partition_result'; } public function read($input) @@ -15390,27 +17406,9 @@ class ThriftHiveMetastore_get_partitions_ps_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size420 = 0; - $_etype423 = 0; - $xfer += $input->readListBegin($_etype423, $_size420); - for ($_i424 = 0; $_i424 < $_size420; ++$_i424) - { - $elem425 = null; - $elem425 = new \metastore\Partition(); - $xfer += $elem425->read($input); - $this->success []= $elem425; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); + $this->o1 = new \metastore\InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -15418,42 +17416,25 @@ class ThriftHiveMetastore_get_partitions_ps_result { 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 $iter426) - { - $xfer += $iter426->write($output); + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); } - } - $output->writeListEnd(); + break; + default: + $xfer += $input->skip($ftype); + break; } - $xfer += $output->writeFieldEnd(); + $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); @@ -15471,15 +17452,12 @@ class ThriftHiveMetastore_get_partitions_ps_result { } -class ThriftHiveMetastore_get_partitions_ps_with_auth_args { +class ThriftHiveMetastore_alter_partitions_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 $new_parts = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -15493,27 +17471,12 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { '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', + 'var' => 'new_parts', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), ), ); @@ -15525,23 +17488,14 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { 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']; + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; + return 'ThriftHiveMetastore_alter_partitions_args'; } public function read($input) @@ -15575,46 +17529,16 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { break; case 3: if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size427 = 0; - $_etype430 = 0; - $xfer += $input->readListBegin($_etype430, $_size427); - for ($_i431 = 0; $_i431 < $_size427; ++$_i431) - { - $elem432 = null; - $xfer += $input->readString($elem432); - $this->part_vals []= $elem432; - } - $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(); - $_size433 = 0; - $_etype436 = 0; - $xfer += $input->readListBegin($_etype436, $_size433); - for ($_i437 = 0; $_i437 < $_size433; ++$_i437) + $this->new_parts = array(); + $_size483 = 0; + $_etype486 = 0; + $xfer += $input->readListBegin($_etype486, $_size483); + for ($_i487 = 0; $_i487 < $_size483; ++$_i487) { - $elem438 = null; - $xfer += $input->readString($elem438); - $this->group_names []= $elem438; + $elem488 = null; + $elem488 = new \metastore\Partition(); + $xfer += $elem488->read($input); + $this->new_parts []= $elem488; } $xfer += $input->readListEnd(); } else { @@ -15633,7 +17557,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_args'); + $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); @@ -15644,44 +17568,17 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { $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 $iter439) - { - $xfer += $output->writeString($iter439); - } - } - $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)) { + if ($this->new_parts !== null) { + if (!is_array($this->new_parts)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 3); { - $output->writeListBegin(TType::STRING, count($this->group_names)); + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); { - foreach ($this->group_names as $iter440) + foreach ($this->new_parts as $iter489) { - $xfer += $output->writeString($iter440); + $xfer += $iter489->write($output); } } $output->writeListEnd(); @@ -15695,29 +17592,19 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { } -class ThriftHiveMetastore_get_partitions_ps_with_auth_result { +class ThriftHiveMetastore_alter_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', + 'class' => '\metastore\InvalidOperationException', ), 2 => array( 'var' => 'o2', @@ -15727,9 +17614,6 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -15740,7 +17624,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; + return 'ThriftHiveMetastore_alter_partitions_result'; } public function read($input) @@ -15758,27 +17642,9 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size441 = 0; - $_etype444 = 0; - $xfer += $input->readListBegin($_etype444, $_size441); - for ($_i445 = 0; $_i445 < $_size441; ++$_i445) - { - $elem446 = null; - $elem446 = new \metastore\Partition(); - $xfer += $elem446->read($input); - $this->success []= $elem446; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $this->o1 = new \metastore\InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -15804,24 +17670,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { 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 $iter447) - { - $xfer += $iter447->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -15839,13 +17688,13 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { } -class ThriftHiveMetastore_get_partition_names_ps_args { +class ThriftHiveMetastore_alter_partition_with_environment_context_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; + public $new_part = null; + public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -15859,16 +17708,14 @@ class ThriftHiveMetastore_get_partition_names_ps_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', ), ); } @@ -15879,17 +17726,17 @@ class ThriftHiveMetastore_get_partition_names_ps_args { 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']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_args'; + return 'ThriftHiveMetastore_alter_partition_with_environment_context_args'; } public function read($input) @@ -15918,29 +17765,21 @@ class ThriftHiveMetastore_get_partition_names_ps_args { 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(); - $_size448 = 0; - $_etype451 = 0; - $xfer += $input->readListBegin($_etype451, $_size448); - for ($_i452 = 0; $_i452 < $_size448; ++$_i452) - { - $elem453 = null; - $xfer += $input->readString($elem453); - $this->part_vals []= $elem453; - } - $xfer += $input->readListEnd(); + $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::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -15957,7 +17796,7 @@ class ThriftHiveMetastore_get_partition_names_ps_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); + $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); @@ -15968,26 +17807,20 @@ class ThriftHiveMetastore_get_partition_names_ps_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { 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 $iter454) - { - $xfer += $output->writeString($iter454); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + 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(); @@ -15997,40 +17830,28 @@ class ThriftHiveMetastore_get_partition_names_ps_args { } -class ThriftHiveMetastore_get_partition_names_ps_result { +class ThriftHiveMetastore_alter_partition_with_environment_context_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', + 'class' => '\metastore\InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -16041,7 +17862,7 @@ class ThriftHiveMetastore_get_partition_names_ps_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_result'; + return 'ThriftHiveMetastore_alter_partition_with_environment_context_result'; } public function read($input) @@ -16059,26 +17880,9 @@ class ThriftHiveMetastore_get_partition_names_ps_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size455 = 0; - $_etype458 = 0; - $xfer += $input->readListBegin($_etype458, $_size455); - for ($_i459 = 0; $_i459 < $_size455; ++$_i459) - { - $elem460 = null; - $xfer += $input->readString($elem460); - $this->success []= $elem460; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); + $this->o1 = new \metastore\InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -16086,7 +17890,7 @@ class ThriftHiveMetastore_get_partition_names_ps_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchObjectException(); + $this->o2 = new \metastore\MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -16104,24 +17908,7 @@ class ThriftHiveMetastore_get_partition_names_ps_result { 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 $iter461) - { - $xfer += $output->writeString($iter461); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $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); @@ -16139,13 +17926,13 @@ class ThriftHiveMetastore_get_partition_names_ps_result { } -class ThriftHiveMetastore_get_partitions_by_filter_args { +class ThriftHiveMetastore_rename_partition_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $filter = null; - public $max_parts = -1; + public $part_vals = null; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -16159,12 +17946,17 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'filter', - 'type' => TType::STRING, + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', ), ); } @@ -16175,17 +17967,17 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['filter'])) { - $this->filter = $vals['filter']; + 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['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_args'; + return 'ThriftHiveMetastore_rename_partition_args'; } public function read($input) @@ -16218,15 +18010,26 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->filter); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size490 = 0; + $_etype493 = 0; + $xfer += $input->readListBegin($_etype493, $_size490); + for ($_i494 = 0; $_i494 < $_size490; ++$_i494) + { + $elem495 = null; + $xfer += $input->readString($elem495); + $this->part_vals []= $elem495; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -16243,7 +18046,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); + $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); @@ -16254,14 +18057,29 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { $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); + 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 $iter496) + { + $xfer += $output->writeString($iter496); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + 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(); @@ -16271,41 +18089,28 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { } -class ThriftHiveMetastore_get_partitions_by_filter_result { +class ThriftHiveMetastore_rename_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::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -16316,7 +18121,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_result'; + return 'ThriftHiveMetastore_rename_partition_result'; } public function read($input) @@ -16334,27 +18139,9 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size462 = 0; - $_etype465 = 0; - $xfer += $input->readListBegin($_etype465, $_size462); - for ($_i466 = 0; $_i466 < $_size462; ++$_i466) - { - $elem467 = null; - $elem467 = new \metastore\Partition(); - $xfer += $elem467->read($input); - $this->success []= $elem467; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); + $this->o1 = new \metastore\InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -16362,7 +18149,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchObjectException(); + $this->o2 = new \metastore\MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -16380,24 +18167,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { 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 $iter468) - { - $xfer += $iter468->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -16415,30 +18185,41 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { } -class ThriftHiveMetastore_get_partitions_by_expr_args { +class ThriftHiveMetastore_partition_name_has_valid_characters_args { static $_TSPEC; - public $req = null; + public $part_vals = null; + public $throw_exception = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionsByExprRequest', + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'throw_exception', + 'type' => TType::BOOL, ), ); } if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['throw_exception'])) { + $this->throw_exception = $vals['throw_exception']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_expr_args'; + return 'ThriftHiveMetastore_partition_name_has_valid_characters_args'; } public function read($input) @@ -16457,9 +18238,25 @@ class ThriftHiveMetastore_get_partitions_by_expr_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->req = new \metastore\PartitionsByExprRequest(); - $xfer += $this->req->read($input); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size497 = 0; + $_etype500 = 0; + $xfer += $input->readListBegin($_etype500, $_size497); + for ($_i501 = 0; $_i501 < $_size497; ++$_i501) + { + $elem502 = null; + $xfer += $input->readString($elem502); + $this->part_vals []= $elem502; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->throw_exception); } else { $xfer += $input->skip($ftype); } @@ -16476,13 +18273,27 @@ class ThriftHiveMetastore_get_partitions_by_expr_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_expr_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_has_valid_characters_args'); + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 1); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter503) + { + $xfer += $output->writeString($iter503); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->throw_exception !== null) { + $xfer += $output->writeFieldBegin('throw_exception', TType::BOOL, 2); + $xfer += $output->writeBool($this->throw_exception); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -16492,31 +18303,24 @@ class ThriftHiveMetastore_get_partitions_by_expr_args { } -class ThriftHiveMetastore_get_partitions_by_expr_result { +class ThriftHiveMetastore_partition_name_has_valid_characters_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\PartitionsByExprResult', + '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)) { @@ -16526,14 +18330,11 @@ class ThriftHiveMetastore_get_partitions_by_expr_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_expr_result'; + return 'ThriftHiveMetastore_partition_name_has_valid_characters_result'; } public function read($input) @@ -16552,9 +18353,8 @@ class ThriftHiveMetastore_get_partitions_by_expr_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\PartitionsByExprResult(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -16567,14 +18367,6 @@ class ThriftHiveMetastore_get_partitions_by_expr_result { $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; @@ -16587,13 +18379,10 @@ class ThriftHiveMetastore_get_partitions_by_expr_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_expr_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_has_valid_characters_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -16601,11 +18390,6 @@ class ThriftHiveMetastore_get_partitions_by_expr_result { $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; @@ -16613,49 +18397,37 @@ class ThriftHiveMetastore_get_partitions_by_expr_result { } -class ThriftHiveMetastore_get_partitions_by_names_args { +class ThriftHiveMetastore_get_config_value_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $names = null; + public $name = null; + public $defaultValue = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'defaultValue', '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['name'])) { + $this->name = $vals['name']; } - if (isset($vals['names'])) { - $this->names = $vals['names']; + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_names_args'; + return 'ThriftHiveMetastore_get_config_value_args'; } public function read($input) @@ -16675,31 +18447,14 @@ class ThriftHiveMetastore_get_partitions_by_names_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->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(); - $_size469 = 0; - $_etype472 = 0; - $xfer += $input->readListBegin($_etype472, $_size469); - for ($_i473 = 0; $_i473 < $_size469; ++$_i473) - { - $elem474 = null; - $xfer += $input->readString($elem474); - $this->names []= $elem474; - } - $xfer += $input->readListEnd(); + $xfer += $input->readString($this->defaultValue); } else { $xfer += $input->skip($ftype); } @@ -16716,32 +18471,15 @@ class ThriftHiveMetastore_get_partitions_by_names_args { 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->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->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 $iter475) - { - $xfer += $output->writeString($iter475); - } - } - $output->writeListEnd(); - } + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -16751,34 +18489,23 @@ class ThriftHiveMetastore_get_partitions_by_names_args { } -class ThriftHiveMetastore_get_partitions_by_names_result { +class ThriftHiveMetastore_get_config_value_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', - ), + 'type' => TType::STRING, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\ConfigValSecurityException', ), ); } @@ -16789,14 +18516,11 @@ class ThriftHiveMetastore_get_partitions_by_names_result { 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'; + return 'ThriftHiveMetastore_get_config_value_result'; } public function read($input) @@ -16815,67 +18539,36 @@ class ThriftHiveMetastore_get_partitions_by_names_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size476 = 0; - $_etype479 = 0; - $xfer += $input->readListBegin($_etype479, $_size476); - for ($_i480 = 0; $_i480 < $_size476; ++$_i480) - { - $elem481 = null; - $elem481 = new \metastore\Partition(); - $xfer += $elem481->read($input); - $this->success []= $elem481; - } - $xfer += $input->readListEnd(); + 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(); + $this->o1 = new \metastore\ConfigValSecurityException(); $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 $iter482) - { - $xfer += $iter482->write($output); - } - } - $output->writeListEnd(); + $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) { @@ -16883,11 +18576,6 @@ class ThriftHiveMetastore_get_partitions_by_names_result { $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; @@ -16895,46 +18583,29 @@ class ThriftHiveMetastore_get_partitions_by_names_result { } -class ThriftHiveMetastore_alter_partition_args { +class ThriftHiveMetastore_partition_name_to_vals_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $new_part = 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', + 'var' => 'part_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']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_args'; + return 'ThriftHiveMetastore_partition_name_to_vals_args'; } public function read($input) @@ -16954,22 +18625,7 @@ class ThriftHiveMetastore_alter_partition_args { { 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); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -16986,23 +18642,10 @@ class ThriftHiveMetastore_alter_partition_args { 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->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(); @@ -17012,39 +18655,42 @@ class ThriftHiveMetastore_alter_partition_args { } -class ThriftHiveMetastore_alter_partition_result { +class ThriftHiveMetastore_partition_name_to_vals_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\InvalidOperationException', - ), - 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_alter_partition_result'; + return 'ThriftHiveMetastore_partition_name_to_vals_result'; } public function read($input) @@ -17062,18 +18708,27 @@ class ThriftHiveMetastore_alter_partition_result { } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\InvalidOperationException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size504 = 0; + $_etype507 = 0; + $xfer += $input->readListBegin($_etype507, $_size504); + for ($_i508 = 0; $_i508 < $_size504; ++$_i508) + { + $elem509 = null; + $xfer += $input->readString($elem509); + $this->success []= $elem509; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -17090,17 +18745,29 @@ class ThriftHiveMetastore_alter_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); + $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 $iter510) + { + $xfer += $output->writeString($iter510); + } + } + $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; @@ -17108,50 +18775,29 @@ class ThriftHiveMetastore_alter_partition_result { } -class ThriftHiveMetastore_alter_partitions_args { +class ThriftHiveMetastore_partition_name_to_spec_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $new_parts = 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', + 'var' => 'part_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']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partitions_args'; + return 'ThriftHiveMetastore_partition_name_to_spec_args'; } public function read($input) @@ -17171,74 +18817,27 @@ class ThriftHiveMetastore_alter_partitions_args { { 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(); - $_size483 = 0; - $_etype486 = 0; - $xfer += $input->readListBegin($_etype486, $_size483); - for ($_i487 = 0; $_i487 < $_size483; ++$_i487) - { - $elem488 = null; - $elem488 = new \metastore\Partition(); - $xfer += $elem488->read($input); - $this->new_parts []= $elem488; - } - $xfer += $input->readListEnd(); + $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_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 $iter489) - { - $xfer += $iter489->write($output); - } - } - $output->writeListEnd(); + 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(); @@ -17248,39 +18847,46 @@ class ThriftHiveMetastore_alter_partitions_args { } -class ThriftHiveMetastore_alter_partitions_result { +class ThriftHiveMetastore_partition_name_to_spec_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::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\InvalidOperationException', - ), - 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_alter_partitions_result'; + return 'ThriftHiveMetastore_partition_name_to_spec_result'; } public function read($input) @@ -17298,18 +18904,30 @@ class ThriftHiveMetastore_alter_partitions_result { } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\InvalidOperationException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::MAP) { + $this->success = array(); + $_size511 = 0; + $_ktype512 = 0; + $_vtype513 = 0; + $xfer += $input->readMapBegin($_ktype512, $_vtype513, $_size511); + for ($_i515 = 0; $_i515 < $_size511; ++$_i515) + { + $key516 = ''; + $val517 = ''; + $xfer += $input->readString($key516); + $xfer += $input->readString($val517); + $this->success[$key516] = $val517; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -17326,17 +18944,30 @@ class ThriftHiveMetastore_alter_partitions_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_result'); + $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 $kiter518 => $viter519) + { + $xfer += $output->writeString($kiter518); + $xfer += $output->writeString($viter519); + } + } + $output->writeMapEnd(); + } + $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; @@ -17344,13 +18975,13 @@ class ThriftHiveMetastore_alter_partitions_result { } -class ThriftHiveMetastore_alter_partition_with_environment_context_args { +class ThriftHiveMetastore_markPartitionForEvent_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $new_part = null; - public $environment_context = null; + public $part_vals = null; + public $eventType = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -17364,14 +18995,20 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', + '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' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => '\metastore\EnvironmentContext', + 'var' => 'eventType', + 'type' => TType::I32, ), ); } @@ -17382,17 +19019,17 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { 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['part_vals'])) { + $this->part_vals = $vals['part_vals']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_with_environment_context_args'; + return 'ThriftHiveMetastore_markPartitionForEvent_args'; } public function read($input) @@ -17425,17 +19062,28 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_part = new \metastore\Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::MAP) { + $this->part_vals = array(); + $_size520 = 0; + $_ktype521 = 0; + $_vtype522 = 0; + $xfer += $input->readMapBegin($_ktype521, $_vtype522, $_size520); + for ($_i524 = 0; $_i524 < $_size520; ++$_i524) + { + $key525 = ''; + $val526 = ''; + $xfer += $input->readString($key525); + $xfer += $input->readString($val526); + $this->part_vals[$key525] = $val526; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->environment_context = new \metastore\EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); } else { $xfer += $input->skip($ftype); } @@ -17452,7 +19100,7 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_args'); + $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); @@ -17463,20 +19111,27 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { 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->writeFieldBegin('part_vals', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $kiter527 => $viter528) + { + $xfer += $output->writeString($kiter527); + $xfer += $output->writeString($viter528); + } + } + $output->writeMapEnd(); + } $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); + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -17486,11 +19141,15 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { } -class ThriftHiveMetastore_alter_partition_with_environment_context_result { +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)) { @@ -17498,12 +19157,32 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidOperationException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + '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', ), ); } @@ -17514,11 +19193,23 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { 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_alter_partition_with_environment_context_result'; + return 'ThriftHiveMetastore_markPartitionForEvent_result'; } public function read($input) @@ -17538,16 +19229,48 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\InvalidOperationException(); - $xfer += $this->o1->read($input); + $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 2: + case 6: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); - $xfer += $this->o2->read($input); + $this->o6 = new \metastore\InvalidPartitionException(); + $xfer += $this->o6->read($input); } else { $xfer += $input->skip($ftype); } @@ -17564,7 +19287,7 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -17575,6 +19298,26 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { $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; @@ -17582,13 +19325,13 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { } -class ThriftHiveMetastore_rename_partition_args { +class ThriftHiveMetastore_isPartitionMarkedForEvent_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; - public $new_part = null; + public $eventType = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -17603,16 +19346,19 @@ class ThriftHiveMetastore_rename_partition_args { ), 3 => array( 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( 'type' => TType::STRING, ), ), 4 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', + 'var' => 'eventType', + 'type' => TType::I32, ), ); } @@ -17626,14 +19372,14 @@ class ThriftHiveMetastore_rename_partition_args { if (isset($vals['part_vals'])) { $this->part_vals = $vals['part_vals']; } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; } } } public function getName() { - return 'ThriftHiveMetastore_rename_partition_args'; + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_args'; } public function read($input) @@ -17666,26 +19412,28 @@ class ThriftHiveMetastore_rename_partition_args { } break; case 3: - if ($ftype == TType::LST) { + if ($ftype == TType::MAP) { $this->part_vals = array(); - $_size490 = 0; - $_etype493 = 0; - $xfer += $input->readListBegin($_etype493, $_size490); - for ($_i494 = 0; $_i494 < $_size490; ++$_i494) + $_size529 = 0; + $_ktype530 = 0; + $_vtype531 = 0; + $xfer += $input->readMapBegin($_ktype530, $_vtype531, $_size529); + for ($_i533 = 0; $_i533 < $_size529; ++$_i533) { - $elem495 = null; - $xfer += $input->readString($elem495); - $this->part_vals []= $elem495; + $key534 = ''; + $val535 = ''; + $xfer += $input->readString($key534); + $xfer += $input->readString($val535); + $this->part_vals[$key534] = $val535; } - $xfer += $input->readListEnd(); + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->new_part = new \metastore\Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); } else { $xfer += $input->skip($ftype); } @@ -17702,7 +19450,7 @@ class ThriftHiveMetastore_rename_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_args'); + $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); @@ -17717,25 +19465,23 @@ class ThriftHiveMetastore_rename_partition_args { if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); { - $output->writeListBegin(TType::STRING, count($this->part_vals)); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter496) + foreach ($this->part_vals as $kiter536 => $viter537) { - $xfer += $output->writeString($iter496); + $xfer += $output->writeString($kiter536); + $xfer += $output->writeString($viter537); } } - $output->writeListEnd(); + $output->writeMapEnd(); } $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); + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -17745,39 +19491,83 @@ class ThriftHiveMetastore_rename_partition_args { } -class ThriftHiveMetastore_rename_partition_result { +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\InvalidOperationException', + 'class' => '\metastore\MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + '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_rename_partition_result'; + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_result'; } public function read($input) @@ -17795,9 +19585,16 @@ class ThriftHiveMetastore_rename_partition_result { } 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\InvalidOperationException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -17805,12 +19602,44 @@ class ThriftHiveMetastore_rename_partition_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $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; @@ -17823,7 +19652,12 @@ class ThriftHiveMetastore_rename_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_result'); + $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); @@ -17834,6 +19668,26 @@ class ThriftHiveMetastore_rename_partition_result { $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; @@ -17841,41 +19695,39 @@ class ThriftHiveMetastore_rename_partition_result { } -class ThriftHiveMetastore_partition_name_has_valid_characters_args { +class ThriftHiveMetastore_add_index_args { static $_TSPEC; - public $part_vals = null; - public $throw_exception = null; + public $new_index = null; + public $index_table = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', ), 2 => array( - 'var' => 'throw_exception', - 'type' => TType::BOOL, + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', ), ); } if (is_array($vals)) { - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['throw_exception'])) { - $this->throw_exception = $vals['throw_exception']; + 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_partition_name_has_valid_characters_args'; + return 'ThriftHiveMetastore_add_index_args'; } public function read($input) @@ -17894,25 +19746,17 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_args { switch ($fid) { case 1: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size497 = 0; - $_etype500 = 0; - $xfer += $input->readListBegin($_etype500, $_size497); - for ($_i501 = 0; $_i501 < $_size497; ++$_i501) - { - $elem502 = null; - $xfer += $input->readString($elem502); - $this->part_vals []= $elem502; - } - $xfer += $input->readListEnd(); + 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::BOOL) { - $xfer += $input->readBool($this->throw_exception); + if ($ftype == TType::STRUCT) { + $this->index_table = new \metastore\Table(); + $xfer += $this->index_table->read($input); } else { $xfer += $input->skip($ftype); } @@ -17929,27 +19773,21 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_has_valid_characters_args'); - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + $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('part_vals', TType::LST, 1); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter503) - { - $xfer += $output->writeString($iter503); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); + $xfer += $this->new_index->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->throw_exception !== null) { - $xfer += $output->writeFieldBegin('throw_exception', TType::BOOL, 2); - $xfer += $output->writeBool($this->throw_exception); + 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(); @@ -17959,22 +19797,35 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_args { } -class ThriftHiveMetastore_partition_name_has_valid_characters_result { +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::BOOL, + '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', ), ); @@ -17986,11 +19837,17 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_result { 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_partition_name_has_valid_characters_result'; + return 'ThriftHiveMetastore_add_index_result'; } public function read($input) @@ -18009,20 +19866,37 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + 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(); + $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; @@ -18035,10 +19909,13 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_has_valid_characters_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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) { @@ -18046,6 +19923,16 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_result { $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; @@ -18053,37 +19940,54 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_result { } -class ThriftHiveMetastore_get_config_value_args { +class ThriftHiveMetastore_alter_index_args { static $_TSPEC; - public $name = null; - public $defaultValue = null; + 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' => 'name', + 'var' => 'dbname', 'type' => TType::STRING, ), 2 => array( - 'var' => 'defaultValue', + '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['name'])) { - $this->name = $vals['name']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; } - if (isset($vals['defaultValue'])) { - $this->defaultValue = $vals['defaultValue']; + 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_get_config_value_args'; + return 'ThriftHiveMetastore_alter_index_args'; } public function read($input) @@ -18103,14 +20007,29 @@ class ThriftHiveMetastore_get_config_value_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->defaultValue); + $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); } @@ -18127,15 +20046,28 @@ class ThriftHiveMetastore_get_config_value_args { 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->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->defaultValue !== null) { - $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); - $xfer += $output->writeString($this->defaultValue); + 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(); @@ -18145,38 +20077,39 @@ class ThriftHiveMetastore_get_config_value_args { } -class ThriftHiveMetastore_get_config_value_result { +class ThriftHiveMetastore_alter_index_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::STRING, - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\ConfigValSecurityException', + 'class' => '\metastore\InvalidOperationException', + ), + 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_config_value_result'; + return 'ThriftHiveMetastore_alter_index_result'; } public function read($input) @@ -18194,17 +20127,18 @@ class ThriftHiveMetastore_get_config_value_result { } switch ($fid) { - case 0: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->success); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\ConfigValSecurityException(); - $xfer += $this->o1->read($input); + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -18221,17 +20155,17 @@ class ThriftHiveMetastore_get_config_value_result { 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(); - } + $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; @@ -18239,29 +20173,53 @@ class ThriftHiveMetastore_get_config_value_result { } -class ThriftHiveMetastore_partition_name_to_vals_args { +class ThriftHiveMetastore_drop_index_by_name_args { static $_TSPEC; - public $part_name = null; + 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' => 'part_name', + '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['part_name'])) { - $this->part_name = $vals['part_name']; + 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_partition_name_to_vals_args'; + return 'ThriftHiveMetastore_drop_index_by_name_args'; } public function read($input) @@ -18281,7 +20239,28 @@ class ThriftHiveMetastore_partition_name_to_vals_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $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); } @@ -18298,10 +20277,25 @@ class ThriftHiveMetastore_partition_name_to_vals_args { 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->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(); @@ -18311,26 +20305,28 @@ class ThriftHiveMetastore_partition_name_to_vals_args { } -class ThriftHiveMetastore_partition_name_to_vals_result { +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::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => '\metastore\MetaException', ), ); @@ -18342,11 +20338,14 @@ class ThriftHiveMetastore_partition_name_to_vals_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_result'; + return 'ThriftHiveMetastore_drop_index_by_name_result'; } public function read($input) @@ -18365,30 +20364,28 @@ class ThriftHiveMetastore_partition_name_to_vals_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size504 = 0; - $_etype507 = 0; - $xfer += $input->readListBegin($_etype507, $_size504); - for ($_i508 = 0; $_i508 < $_size504; ++$_i508) - { - $elem509 = null; - $xfer += $input->readString($elem509); - $this->success []= $elem509; - } - $xfer += $input->readListEnd(); + 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(); + $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; @@ -18401,22 +20398,10 @@ class ThriftHiveMetastore_partition_name_to_vals_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_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::STRING, count($this->success)); - { - foreach ($this->success as $iter510) - { - $xfer += $output->writeString($iter510); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -18424,6 +20409,11 @@ class ThriftHiveMetastore_partition_name_to_vals_result { $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; @@ -18431,29 +20421,45 @@ class ThriftHiveMetastore_partition_name_to_vals_result { } -class ThriftHiveMetastore_partition_name_to_spec_args { +class ThriftHiveMetastore_get_index_by_name_args { static $_TSPEC; - public $part_name = null; + 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' => 'part_name', + '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['part_name'])) { - $this->part_name = $vals['part_name']; + 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_partition_name_to_spec_args'; + return 'ThriftHiveMetastore_get_index_by_name_args'; } public function read($input) @@ -18473,7 +20479,21 @@ class ThriftHiveMetastore_partition_name_to_spec_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $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); } @@ -18490,10 +20510,20 @@ class ThriftHiveMetastore_partition_name_to_spec_args { 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->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(); @@ -18503,32 +20533,31 @@ class ThriftHiveMetastore_partition_name_to_spec_args { } -class ThriftHiveMetastore_partition_name_to_spec_result { +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::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), + '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)) { @@ -18538,11 +20567,14 @@ class ThriftHiveMetastore_partition_name_to_spec_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_result'; + return 'ThriftHiveMetastore_get_index_by_name_result'; } public function read($input) @@ -18561,21 +20593,9 @@ class ThriftHiveMetastore_partition_name_to_spec_result { switch ($fid) { case 0: - if ($ftype == TType::MAP) { - $this->success = array(); - $_size511 = 0; - $_ktype512 = 0; - $_vtype513 = 0; - $xfer += $input->readMapBegin($_ktype512, $_vtype513, $_size511); - for ($_i515 = 0; $_i515 < $_size511; ++$_i515) - { - $key516 = ''; - $val517 = ''; - $xfer += $input->readString($key516); - $xfer += $input->readString($val517); - $this->success[$key516] = $val517; - } - $xfer += $input->readMapEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Index(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -18588,6 +20608,14 @@ class ThriftHiveMetastore_partition_name_to_spec_result { $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; @@ -18600,23 +20628,13 @@ class ThriftHiveMetastore_partition_name_to_spec_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($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 $kiter518 => $viter519) - { - $xfer += $output->writeString($kiter518); - $xfer += $output->writeString($viter519); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -18624,6 +20642,11 @@ class ThriftHiveMetastore_partition_name_to_spec_result { $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; @@ -18631,13 +20654,12 @@ class ThriftHiveMetastore_partition_name_to_spec_result { } -class ThriftHiveMetastore_markPartitionForEvent_args { +class ThriftHiveMetastore_get_indexes_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $eventType = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -18651,20 +20673,8 @@ class ThriftHiveMetastore_markPartitionForEvent_args { '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, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -18675,17 +20685,14 @@ class ThriftHiveMetastore_markPartitionForEvent_args { 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']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_markPartitionForEvent_args'; + return 'ThriftHiveMetastore_get_indexes_args'; } public function read($input) @@ -18718,28 +20725,8 @@ class ThriftHiveMetastore_markPartitionForEvent_args { } break; case 3: - if ($ftype == TType::MAP) { - $this->part_vals = array(); - $_size520 = 0; - $_ktype521 = 0; - $_vtype522 = 0; - $xfer += $input->readMapBegin($_ktype521, $_vtype522, $_size520); - for ($_i524 = 0; $_i524 < $_size520; ++$_i524) - { - $key525 = ''; - $val526 = ''; - $xfer += $input->readString($key525); - $xfer += $input->readString($val526); - $this->part_vals[$key525] = $val526; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->eventType); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -18756,7 +20743,7 @@ class ThriftHiveMetastore_markPartitionForEvent_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_args'); + $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); @@ -18767,27 +20754,9 @@ class ThriftHiveMetastore_markPartitionForEvent_args { $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 $kiter527 => $viter528) - { - $xfer += $output->writeString($kiter527); - $xfer += $output->writeString($viter528); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->eventType !== null) { - $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); - $xfer += $output->writeI32($this->eventType); + 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(); @@ -18797,75 +20766,52 @@ class ThriftHiveMetastore_markPartitionForEvent_args { } -class ThriftHiveMetastore_markPartitionForEvent_result { +class ThriftHiveMetastore_get_indexes_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::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), 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', + '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']; - } - 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'; + return 'ThriftHiveMetastore_get_indexes_result'; } public function read($input) @@ -18883,50 +20829,36 @@ class ThriftHiveMetastore_markPartitionForEvent_result { } 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); + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size538 = 0; + $_etype541 = 0; + $xfer += $input->readListBegin($_etype541, $_size538); + for ($_i542 = 0; $_i542 < $_size538; ++$_i542) + { + $elem543 = null; + $elem543 = new \metastore\Index(); + $xfer += $elem543->read($input); + $this->success []= $elem543; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 5: + case 1: if ($ftype == TType::STRUCT) { - $this->o5 = new \metastore\UnknownPartitionException(); - $xfer += $this->o5->read($input); + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 6: + case 2: if ($ftype == TType::STRUCT) { - $this->o6 = new \metastore\InvalidPartitionException(); - $xfer += $this->o6->read($input); + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -18943,35 +20875,32 @@ class ThriftHiveMetastore_markPartitionForEvent_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_result'); + $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 $iter544) + { + $xfer += $iter544->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(); - } - 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); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -18981,13 +20910,12 @@ class ThriftHiveMetastore_markPartitionForEvent_result { } -class ThriftHiveMetastore_isPartitionMarkedForEvent_args { +class ThriftHiveMetastore_get_index_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $eventType = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -19001,20 +20929,8 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { '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, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -19025,17 +20941,14 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { 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']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_isPartitionMarkedForEvent_args'; + return 'ThriftHiveMetastore_get_index_names_args'; } public function read($input) @@ -19068,28 +20981,8 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { } break; case 3: - if ($ftype == TType::MAP) { - $this->part_vals = array(); - $_size529 = 0; - $_ktype530 = 0; - $_vtype531 = 0; - $xfer += $input->readMapBegin($_ktype530, $_vtype531, $_size529); - for ($_i533 = 0; $_i533 < $_size529; ++$_i533) - { - $key534 = ''; - $val535 = ''; - $xfer += $input->readString($key534); - $xfer += $input->readString($val535); - $this->part_vals[$key534] = $val535; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->eventType); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -19106,7 +20999,7 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_args'); + $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); @@ -19117,27 +21010,9 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { $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 $kiter536 => $viter537) - { - $xfer += $output->writeString($kiter536); - $xfer += $output->writeString($viter537); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->eventType !== null) { - $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); - $xfer += $output->writeI32($this->eventType); + 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(); @@ -19147,53 +21022,27 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { } -class ThriftHiveMetastore_isPartitionMarkedForEvent_result { +class ThriftHiveMetastore_get_index_names_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, + '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', - ), - 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', + 'class' => '\metastore\MetaException', ), ); } @@ -19201,29 +21050,14 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { 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'; + return 'ThriftHiveMetastore_get_index_names_result'; } public function read($input) @@ -19242,60 +21076,30 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size545 = 0; + $_etype548 = 0; + $xfer += $input->readListBegin($_etype548, $_size545); + for ($_i549 = 0; $_i549 < $_size545; ++$_i549) + { + $elem550 = null; + $xfer += $input->readString($elem550); + $this->success []= $elem550; + } + $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(); + $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\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; @@ -19308,42 +21112,29 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_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); + 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 $iter551) + { + $xfer += $output->writeString($iter551); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $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; @@ -19351,39 +21142,30 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { } -class ThriftHiveMetastore_add_index_args { +class ThriftHiveMetastore_update_table_column_statistics_args { static $_TSPEC; - public $new_index = null; - public $index_table = null; + public $stats_obj = 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', + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stats_obj', 'type' => TType::STRUCT, - 'class' => '\metastore\Table', + 'class' => '\metastore\ColumnStatistics', ), ); } 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']; + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; } } } public function getName() { - return 'ThriftHiveMetastore_add_index_args'; + return 'ThriftHiveMetastore_update_table_column_statistics_args'; } public function read($input) @@ -19403,16 +21185,8 @@ class ThriftHiveMetastore_add_index_args { { 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); + $this->stats_obj = new \metastore\ColumnStatistics(); + $xfer += $this->stats_obj->read($input); } else { $xfer += $input->skip($ftype); } @@ -19429,21 +21203,13 @@ class ThriftHiveMetastore_add_index_args { 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)) { + $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('index_table', TType::STRUCT, 2); - $xfer += $this->index_table->write($output); + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -19453,37 +21219,42 @@ class ThriftHiveMetastore_add_index_args { } -class ThriftHiveMetastore_add_index_result { +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::STRUCT, - 'class' => '\metastore\Index', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\AlreadyExistsException', + '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)) { @@ -19499,11 +21270,14 @@ class ThriftHiveMetastore_add_index_result { if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_add_index_result'; + return 'ThriftHiveMetastore_update_table_column_statistics_result'; } public function read($input) @@ -19522,16 +21296,15 @@ class ThriftHiveMetastore_add_index_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Index(); - $xfer += $this->success->read($input); + 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\InvalidObjectException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -19539,7 +21312,7 @@ class ThriftHiveMetastore_add_index_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\AlreadyExistsException(); + $this->o2 = new \metastore\InvalidObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -19553,6 +21326,14 @@ class ThriftHiveMetastore_add_index_result { $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; @@ -19565,13 +21346,10 @@ class ThriftHiveMetastore_add_index_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_update_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -19589,6 +21367,11 @@ class ThriftHiveMetastore_add_index_result { $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; @@ -19596,54 +21379,30 @@ class ThriftHiveMetastore_add_index_result { } -class ThriftHiveMetastore_alter_index_args { +class ThriftHiveMetastore_update_partition_column_statistics_args { static $_TSPEC; - public $dbname = null; - public $base_tbl_name = null; - public $idx_name = null; - public $new_idx = null; + public $stats_obj = 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', + 'var' => 'stats_obj', 'type' => TType::STRUCT, - 'class' => '\metastore\Index', + 'class' => '\metastore\ColumnStatistics', ), ); } 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']; + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_args'; + return 'ThriftHiveMetastore_update_partition_column_statistics_args'; } public function read($input) @@ -19662,30 +21421,9 @@ class ThriftHiveMetastore_alter_index_args { 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); + $this->stats_obj = new \metastore\ColumnStatistics(); + $xfer += $this->stats_obj->read($input); } else { $xfer += $input->skip($ftype); } @@ -19702,28 +21440,13 @@ class ThriftHiveMetastore_alter_index_args { 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)) { + $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('new_idx', TType::STRUCT, 4); - $xfer += $this->new_idx->write($output); + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -19733,39 +21456,65 @@ class ThriftHiveMetastore_alter_index_args { } -class ThriftHiveMetastore_alter_index_result { +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\InvalidOperationException', + '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_alter_index_result'; + return 'ThriftHiveMetastore_update_partition_column_statistics_result'; } public function read($input) @@ -19783,9 +21532,16 @@ class ThriftHiveMetastore_alter_index_result { } 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\InvalidOperationException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -19793,12 +21549,28 @@ class ThriftHiveMetastore_alter_index_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $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; @@ -19811,7 +21583,12 @@ class ThriftHiveMetastore_alter_index_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); + $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); @@ -19822,6 +21599,16 @@ class ThriftHiveMetastore_alter_index_result { $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; @@ -19829,13 +21616,12 @@ class ThriftHiveMetastore_alter_index_result { } -class ThriftHiveMetastore_drop_index_by_name_args { +class ThriftHiveMetastore_get_table_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $index_name = null; - public $deleteData = null; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -19849,13 +21635,9 @@ class ThriftHiveMetastore_drop_index_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'index_name', + 'var' => 'col_name', 'type' => TType::STRING, ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), ); } if (is_array($vals)) { @@ -19865,17 +21647,14 @@ class ThriftHiveMetastore_drop_index_by_name_args { 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']; + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_index_by_name_args'; + return 'ThriftHiveMetastore_get_table_column_statistics_args'; } public function read($input) @@ -19909,14 +21688,7 @@ class ThriftHiveMetastore_drop_index_by_name_args { 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); + $xfer += $input->readString($this->col_name); } else { $xfer += $input->skip($ftype); } @@ -19933,7 +21705,7 @@ class ThriftHiveMetastore_drop_index_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + $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); @@ -19944,14 +21716,9 @@ class ThriftHiveMetastore_drop_index_by_name_args { $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); + 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(); @@ -19961,19 +21728,22 @@ class ThriftHiveMetastore_drop_index_by_name_args { } -class ThriftHiveMetastore_drop_index_by_name_result { +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::BOOL, + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', ), 1 => array( 'var' => 'o1', @@ -19985,6 +21755,16 @@ class ThriftHiveMetastore_drop_index_by_name_result { '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)) { @@ -19997,11 +21777,17 @@ class ThriftHiveMetastore_drop_index_by_name_result { 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_drop_index_by_name_result'; + return 'ThriftHiveMetastore_get_table_column_statistics_result'; } public function read($input) @@ -20020,8 +21806,9 @@ class ThriftHiveMetastore_drop_index_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\ColumnStatistics(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -20042,6 +21829,22 @@ class ThriftHiveMetastore_drop_index_by_name_result { $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; @@ -20054,10 +21857,13 @@ class ThriftHiveMetastore_drop_index_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_column_statistics_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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) { @@ -20070,6 +21876,16 @@ class ThriftHiveMetastore_drop_index_by_name_result { $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; @@ -20077,12 +21893,13 @@ class ThriftHiveMetastore_drop_index_by_name_result { } -class ThriftHiveMetastore_get_index_by_name_args { +class ThriftHiveMetastore_get_partition_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $index_name = null; + public $part_name = null; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -20096,7 +21913,11 @@ class ThriftHiveMetastore_get_index_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'index_name', + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'col_name', 'type' => TType::STRING, ), ); @@ -20108,14 +21929,17 @@ class ThriftHiveMetastore_get_index_by_name_args { 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['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_index_by_name_args'; + return 'ThriftHiveMetastore_get_partition_column_statistics_args'; } public function read($input) @@ -20149,7 +21973,14 @@ class ThriftHiveMetastore_get_index_by_name_args { break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); + $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); } @@ -20166,7 +21997,7 @@ class ThriftHiveMetastore_get_index_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); + $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); @@ -20177,9 +22008,14 @@ class ThriftHiveMetastore_get_index_by_name_args { $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); + 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(); @@ -20189,12 +22025,14 @@ class ThriftHiveMetastore_get_index_by_name_args { } -class ThriftHiveMetastore_get_index_by_name_result { +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)) { @@ -20202,17 +22040,27 @@ class ThriftHiveMetastore_get_index_by_name_result { 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => '\metastore\Index', + 'class' => '\metastore\ColumnStatistics', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', + 'class' => '\metastore\NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', ), ); } @@ -20226,11 +22074,17 @@ class ThriftHiveMetastore_get_index_by_name_result { 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_index_by_name_result'; + return 'ThriftHiveMetastore_get_partition_column_statistics_result'; } public function read($input) @@ -20250,7 +22104,7 @@ class ThriftHiveMetastore_get_index_by_name_result { { case 0: if ($ftype == TType::STRUCT) { - $this->success = new \metastore\Index(); + $this->success = new \metastore\ColumnStatistics(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -20258,7 +22112,7 @@ class ThriftHiveMetastore_get_index_by_name_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\MetaException(); + $this->o1 = new \metastore\NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -20266,12 +22120,28 @@ class ThriftHiveMetastore_get_index_by_name_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchObjectException(); + $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; @@ -20284,7 +22154,7 @@ class ThriftHiveMetastore_get_index_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); + $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); @@ -20303,6 +22173,16 @@ class ThriftHiveMetastore_get_index_by_name_result { $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; @@ -20310,12 +22190,13 @@ class ThriftHiveMetastore_get_index_by_name_result { } -class ThriftHiveMetastore_get_indexes_args { +class ThriftHiveMetastore_delete_partition_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_indexes = -1; + public $part_name = null; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -20329,8 +22210,12 @@ class ThriftHiveMetastore_get_indexes_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'col_name', + 'type' => TType::STRING, ), ); } @@ -20341,14 +22226,17 @@ class ThriftHiveMetastore_get_indexes_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + 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_indexes_args'; + return 'ThriftHiveMetastore_delete_partition_column_statistics_args'; } public function read($input) @@ -20381,8 +22269,15 @@ class ThriftHiveMetastore_get_indexes_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + 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); } @@ -20399,7 +22294,7 @@ class ThriftHiveMetastore_get_indexes_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); + $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); @@ -20410,9 +22305,14 @@ class ThriftHiveMetastore_get_indexes_args { $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); + 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(); @@ -20422,24 +22322,21 @@ class ThriftHiveMetastore_get_indexes_args { } -class ThriftHiveMetastore_get_indexes_result { +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::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Index', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', @@ -20451,6 +22348,16 @@ class ThriftHiveMetastore_get_indexes_result { '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)) { @@ -20463,11 +22370,17 @@ class ThriftHiveMetastore_get_indexes_result { 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_indexes_result'; + return 'ThriftHiveMetastore_delete_partition_column_statistics_result'; } public function read($input) @@ -20486,19 +22399,8 @@ class ThriftHiveMetastore_get_indexes_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size538 = 0; - $_etype541 = 0; - $xfer += $input->readListBegin($_etype541, $_size538); - for ($_i542 = 0; $_i542 < $_size538; ++$_i542) - { - $elem543 = null; - $elem543 = new \metastore\Index(); - $xfer += $elem543->read($input); - $this->success []= $elem543; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -20519,6 +22421,22 @@ class ThriftHiveMetastore_get_indexes_result { $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; @@ -20531,22 +22449,10 @@ class ThriftHiveMetastore_get_indexes_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_partition_column_statistics_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 $iter544) - { - $xfer += $iter544->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -20559,6 +22465,16 @@ class ThriftHiveMetastore_get_indexes_result { $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; @@ -20566,12 +22482,12 @@ class ThriftHiveMetastore_get_indexes_result { } -class ThriftHiveMetastore_get_index_names_args { +class ThriftHiveMetastore_delete_table_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_indexes = -1; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -20585,8 +22501,8 @@ class ThriftHiveMetastore_get_index_names_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'col_name', + 'type' => TType::STRING, ), ); } @@ -20597,14 +22513,14 @@ class ThriftHiveMetastore_get_index_names_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_args'; + return 'ThriftHiveMetastore_delete_table_column_statistics_args'; } public function read($input) @@ -20637,8 +22553,8 @@ class ThriftHiveMetastore_get_index_names_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); } else { $xfer += $input->skip($ftype); } @@ -20655,7 +22571,7 @@ class ThriftHiveMetastore_get_index_names_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); + $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); @@ -20666,9 +22582,9 @@ class ThriftHiveMetastore_get_index_names_args { $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); + 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(); @@ -20678,42 +22594,65 @@ class ThriftHiveMetastore_get_index_names_args { } -class ThriftHiveMetastore_get_index_names_result { +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::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + '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_get_index_names_result'; + return 'ThriftHiveMetastore_delete_table_column_statistics_result'; } public function read($input) @@ -20732,30 +22671,44 @@ class ThriftHiveMetastore_get_index_names_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size545 = 0; - $_etype548 = 0; - $xfer += $input->readListBegin($_etype548, $_size545); - for ($_i549 = 0; $_i549 < $_size545; ++$_i549) - { - $elem550 = null; - $xfer += $input->readString($elem550); - $this->success []= $elem550; - } - $xfer += $input->readListEnd(); + 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; @@ -20768,29 +22721,32 @@ class ThriftHiveMetastore_get_index_names_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_table_column_statistics_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 $iter551) - { - $xfer += $output->writeString($iter551); - } - } - $output->writeListEnd(); - } + $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, 1); + $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; @@ -20798,30 +22754,30 @@ class ThriftHiveMetastore_get_index_names_result { } -class ThriftHiveMetastore_update_table_column_statistics_args { +class ThriftHiveMetastore_create_function_args { static $_TSPEC; - public $stats_obj = null; + public $func = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'stats_obj', + 'var' => 'func', 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatistics', + 'class' => '\metastore\Function', ), ); } if (is_array($vals)) { - if (isset($vals['stats_obj'])) { - $this->stats_obj = $vals['stats_obj']; + if (isset($vals['func'])) { + $this->func = $vals['func']; } } } public function getName() { - return 'ThriftHiveMetastore_update_table_column_statistics_args'; + return 'ThriftHiveMetastore_create_function_args'; } public function read($input) @@ -20841,8 +22797,8 @@ class ThriftHiveMetastore_update_table_column_statistics_args { { case 1: if ($ftype == TType::STRUCT) { - $this->stats_obj = new \metastore\ColumnStatistics(); - $xfer += $this->stats_obj->read($input); + $this->func = new \metastore\Function(); + $xfer += $this->func->read($input); } else { $xfer += $input->skip($ftype); } @@ -20859,13 +22815,13 @@ class ThriftHiveMetastore_update_table_column_statistics_args { 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)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_function_args'); + if ($this->func !== null) { + if (!is_object($this->func)) { 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->writeFieldBegin('func', TType::STRUCT, 1); + $xfer += $this->func->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -20875,10 +22831,9 @@ class ThriftHiveMetastore_update_table_column_statistics_args { } -class ThriftHiveMetastore_update_table_column_statistics_result { +class ThriftHiveMetastore_create_function_result { static $_TSPEC; - public $success = null; public $o1 = null; public $o2 = null; public $o3 = null; @@ -20887,14 +22842,10 @@ class ThriftHiveMetastore_update_table_column_statistics_result { 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', + 'class' => '\metastore\AlreadyExistsException', ), 2 => array( 'var' => 'o2', @@ -20909,14 +22860,11 @@ class ThriftHiveMetastore_update_table_column_statistics_result { 4 => array( 'var' => 'o4', 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', + 'class' => '\metastore\NoSuchObjectException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -20933,7 +22881,7 @@ class ThriftHiveMetastore_update_table_column_statistics_result { } public function getName() { - return 'ThriftHiveMetastore_update_table_column_statistics_result'; + return 'ThriftHiveMetastore_create_function_result'; } public function read($input) @@ -20951,16 +22899,9 @@ class ThriftHiveMetastore_update_table_column_statistics_result { } 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(); + $this->o1 = new \metastore\AlreadyExistsException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -20984,7 +22925,7 @@ class ThriftHiveMetastore_update_table_column_statistics_result { break; case 4: if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\InvalidInputException(); + $this->o4 = new \metastore\NoSuchObjectException(); $xfer += $this->o4->read($input); } else { $xfer += $input->skip($ftype); @@ -21002,12 +22943,7 @@ class ThriftHiveMetastore_update_table_column_statistics_result { 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(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_function_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -21035,30 +22971,37 @@ class ThriftHiveMetastore_update_table_column_statistics_result { } -class ThriftHiveMetastore_update_partition_column_statistics_args { +class ThriftHiveMetastore_drop_function_args { static $_TSPEC; - public $stats_obj = null; + public $dbName = null; + public $funcName = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'stats_obj', - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatistics', + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'funcName', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['stats_obj'])) { - $this->stats_obj = $vals['stats_obj']; + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['funcName'])) { + $this->funcName = $vals['funcName']; } } } public function getName() { - return 'ThriftHiveMetastore_update_partition_column_statistics_args'; + return 'ThriftHiveMetastore_drop_function_args'; } public function read($input) @@ -21077,9 +23020,15 @@ class ThriftHiveMetastore_update_partition_column_statistics_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->stats_obj = new \metastore\ColumnStatistics(); - $xfer += $this->stats_obj->read($input); + 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->funcName); } else { $xfer += $input->skip($ftype); } @@ -21096,13 +23045,15 @@ class ThriftHiveMetastore_update_partition_column_statistics_args { 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->writeStructBegin('ThriftHiveMetastore_drop_function_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->funcName !== null) { + $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); + $xfer += $output->writeString($this->funcName); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -21112,65 +23063,39 @@ class ThriftHiveMetastore_update_partition_column_statistics_args { } -class ThriftHiveMetastore_update_partition_column_statistics_result { +class ThriftHiveMetastore_drop_function_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'; + return 'ThriftHiveMetastore_drop_function_result'; } public function read($input) @@ -21188,13 +23113,6 @@ class ThriftHiveMetastore_update_partition_column_statistics_result { } 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(); @@ -21205,28 +23123,12 @@ class ThriftHiveMetastore_update_partition_column_statistics_result { 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; @@ -21239,32 +23141,17 @@ class ThriftHiveMetastore_update_partition_column_statistics_result { 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(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_function_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 += $output->writeFieldBegin('o3', TType::STRUCT, 2); $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; @@ -21272,45 +23159,46 @@ class ThriftHiveMetastore_update_partition_column_statistics_result { } -class ThriftHiveMetastore_get_table_column_statistics_args { +class ThriftHiveMetastore_alter_function_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $col_name = null; + public $dbName = null; + public $funcName = null; + public $newFunc = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'dbName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'funcName', 'type' => TType::STRING, ), 3 => array( - 'var' => 'col_name', - 'type' => TType::STRING, + 'var' => 'newFunc', + 'type' => TType::STRUCT, + 'class' => '\metastore\Function', ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['funcName'])) { + $this->funcName = $vals['funcName']; } - if (isset($vals['col_name'])) { - $this->col_name = $vals['col_name']; + if (isset($vals['newFunc'])) { + $this->newFunc = $vals['newFunc']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_column_statistics_args'; + return 'ThriftHiveMetastore_alter_function_args'; } public function read($input) @@ -21330,21 +23218,22 @@ class ThriftHiveMetastore_get_table_column_statistics_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->dbName); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->funcName); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->col_name); + if ($ftype == TType::STRUCT) { + $this->newFunc = new \metastore\Function(); + $xfer += $this->newFunc->read($input); } else { $xfer += $input->skip($ftype); } @@ -21361,20 +23250,23 @@ class ThriftHiveMetastore_get_table_column_statistics_args { 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->writeStructBegin('ThriftHiveMetastore_alter_function_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); + if ($this->funcName !== null) { + $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); + $xfer += $output->writeString($this->funcName); $xfer += $output->writeFieldEnd(); } - if ($this->col_name !== null) { - $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); - $xfer += $output->writeString($this->col_name); + if ($this->newFunc !== null) { + if (!is_object($this->newFunc)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('newFunc', TType::STRUCT, 3); + $xfer += $this->newFunc->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -21384,66 +23276,39 @@ class ThriftHiveMetastore_get_table_column_statistics_args { } -class ThriftHiveMetastore_get_table_column_statistics_result { +class ThriftHiveMetastore_alter_function_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', + 'class' => '\metastore\InvalidOperationException', ), 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'; + return 'ThriftHiveMetastore_alter_function_result'; } public function read($input) @@ -21461,17 +23326,9 @@ class ThriftHiveMetastore_get_table_column_statistics_result { } 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(); + $this->o1 = new \metastore\InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -21485,22 +23342,6 @@ class ThriftHiveMetastore_get_table_column_statistics_result { $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; @@ -21513,15 +23354,7 @@ class ThriftHiveMetastore_get_table_column_statistics_result { 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(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_function_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -21532,16 +23365,6 @@ class ThriftHiveMetastore_get_table_column_statistics_result { $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; @@ -21549,53 +23372,37 @@ class ThriftHiveMetastore_get_table_column_statistics_result { } -class ThriftHiveMetastore_get_partition_column_statistics_args { +class ThriftHiveMetastore_get_functions_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_name = null; - public $col_name = null; + public $dbName = null; + public $pattern = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'dbName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'col_name', + 'var' => 'pattern', '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['dbName'])) { + $this->dbName = $vals['dbName']; } - if (isset($vals['col_name'])) { - $this->col_name = $vals['col_name']; + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_column_statistics_args'; + return 'ThriftHiveMetastore_get_functions_args'; } public function read($input) @@ -21615,28 +23422,14 @@ class ThriftHiveMetastore_get_partition_column_statistics_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $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::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); + $xfer += $input->readString($this->pattern); } else { $xfer += $input->skip($ftype); } @@ -21653,25 +23446,15 @@ class ThriftHiveMetastore_get_partition_column_statistics_args { 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->writeStructBegin('ThriftHiveMetastore_get_functions_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); $xfer += $output->writeFieldEnd(); } - if ($this->col_name !== null) { - $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); - $xfer += $output->writeString($this->col_name); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -21681,43 +23464,28 @@ class ThriftHiveMetastore_get_partition_column_statistics_args { } -class ThriftHiveMetastore_get_partition_column_statistics_result { +class ThriftHiveMetastore_get_functions_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', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 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)) { @@ -21727,20 +23495,11 @@ class ThriftHiveMetastore_get_partition_column_statistics_result { 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'; + return 'ThriftHiveMetastore_get_functions_result'; } public function read($input) @@ -21759,45 +23518,30 @@ class ThriftHiveMetastore_get_partition_column_statistics_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \metastore\ColumnStatistics(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size552 = 0; + $_etype555 = 0; + $xfer += $input->readListBegin($_etype555, $_size552); + for ($_i556 = 0; $_i556 < $_size552; ++$_i556) + { + $elem557 = null; + $xfer += $input->readString($elem557); + $this->success []= $elem557; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $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\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; @@ -21810,13 +23554,22 @@ class ThriftHiveMetastore_get_partition_column_statistics_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_column_statistics_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_functions_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter558) + { + $xfer += $output->writeString($iter558); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -21824,21 +23577,6 @@ class ThriftHiveMetastore_get_partition_column_statistics_result { $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; @@ -21846,53 +23584,29 @@ class ThriftHiveMetastore_get_partition_column_statistics_result { } -class ThriftHiveMetastore_delete_partition_column_statistics_args { +class ThriftHiveMetastore_get_all_functions_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_name = null; - public $col_name = null; + public $dbName = 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', + 'var' => 'dbName', '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']; + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; } } } public function getName() { - return 'ThriftHiveMetastore_delete_partition_column_statistics_args'; + return 'ThriftHiveMetastore_get_all_functions_args'; } public function read($input) @@ -21912,28 +23626,7 @@ class ThriftHiveMetastore_delete_partition_column_statistics_args { { 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); + $xfer += $input->readString($this->dbName); } else { $xfer += $input->skip($ftype); } @@ -21950,25 +23643,10 @@ class ThriftHiveMetastore_delete_partition_column_statistics_args { 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->writeStructBegin('ThriftHiveMetastore_get_all_functions_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -21978,42 +23656,28 @@ class ThriftHiveMetastore_delete_partition_column_statistics_args { } -class ThriftHiveMetastore_delete_partition_column_statistics_result { +class ThriftHiveMetastore_get_all_functions_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, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 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)) { @@ -22023,20 +23687,11 @@ class ThriftHiveMetastore_delete_partition_column_statistics_result { 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'; + return 'ThriftHiveMetastore_get_all_functions_result'; } public function read($input) @@ -22054,45 +23709,31 @@ class ThriftHiveMetastore_delete_partition_column_statistics_result { } switch ($fid) { - case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size559 = 0; + $_etype562 = 0; + $xfer += $input->readListBegin($_etype562, $_size559); + for ($_i563 = 0; $_i563 < $_size559; ++$_i563) + { + $elem564 = null; + $xfer += $input->readString($elem564); + $this->success []= $elem564; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $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\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; @@ -22105,10 +23746,22 @@ class ThriftHiveMetastore_delete_partition_column_statistics_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_partition_column_statistics_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_functions_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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 $iter565) + { + $xfer += $output->writeString($iter565); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -22116,21 +23769,6 @@ class ThriftHiveMetastore_delete_partition_column_statistics_result { $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; @@ -22138,45 +23776,37 @@ class ThriftHiveMetastore_delete_partition_column_statistics_result { } -class ThriftHiveMetastore_delete_table_column_statistics_args { +class ThriftHiveMetastore_get_function_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $col_name = null; + public $dbName = null; + public $funcName = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'dbName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'col_name', + 'var' => 'funcName', '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['dbName'])) { + $this->dbName = $vals['dbName']; } - if (isset($vals['col_name'])) { - $this->col_name = $vals['col_name']; + if (isset($vals['funcName'])) { + $this->funcName = $vals['funcName']; } } } public function getName() { - return 'ThriftHiveMetastore_delete_table_column_statistics_args'; + return 'ThriftHiveMetastore_get_function_args'; } public function read($input) @@ -22196,21 +23826,14 @@ class ThriftHiveMetastore_delete_table_column_statistics_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $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::STRING) { - $xfer += $input->readString($this->col_name); + $xfer += $input->readString($this->funcName); } else { $xfer += $input->skip($ftype); } @@ -22227,20 +23850,15 @@ class ThriftHiveMetastore_delete_table_column_statistics_args { 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->writeStructBegin('ThriftHiveMetastore_get_function_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); $xfer += $output->writeFieldEnd(); } - if ($this->col_name !== null) { - $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); - $xfer += $output->writeString($this->col_name); + if ($this->funcName !== null) { + $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); + $xfer += $output->writeString($this->funcName); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -22250,41 +23868,30 @@ class ThriftHiveMetastore_delete_table_column_statistics_args { } -class ThriftHiveMetastore_delete_table_column_statistics_result { +class ThriftHiveMetastore_get_function_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, + 'type' => TType::STRUCT, + 'class' => '\metastore\Function', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', + 'class' => '\metastore\MetaException', ), 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', + 'class' => '\metastore\NoSuchObjectException', ), ); } @@ -22298,17 +23905,11 @@ class ThriftHiveMetastore_delete_table_column_statistics_result { 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'; + return 'ThriftHiveMetastore_get_function_result'; } public function read($input) @@ -22327,15 +23928,16 @@ class ThriftHiveMetastore_delete_table_column_statistics_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Function(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchObjectException(); + $this->o1 = new \metastore\MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -22343,28 +23945,12 @@ class ThriftHiveMetastore_delete_table_column_statistics_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\MetaException(); + $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\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; @@ -22377,10 +23963,13 @@ class ThriftHiveMetastore_delete_table_column_statistics_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_table_column_statistics_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_function_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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) { @@ -22393,16 +23982,6 @@ class ThriftHiveMetastore_delete_table_column_statistics_result { $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; @@ -22853,14 +24432,14 @@ class ThriftHiveMetastore_get_role_names_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size552 = 0; - $_etype555 = 0; - $xfer += $input->readListBegin($_etype555, $_size552); - for ($_i556 = 0; $_i556 < $_size552; ++$_i556) + $_size566 = 0; + $_etype569 = 0; + $xfer += $input->readListBegin($_etype569, $_size566); + for ($_i570 = 0; $_i570 < $_size566; ++$_i570) { - $elem557 = null; - $xfer += $input->readString($elem557); - $this->success []= $elem557; + $elem571 = null; + $xfer += $input->readString($elem571); + $this->success []= $elem571; } $xfer += $input->readListEnd(); } else { @@ -22896,9 +24475,9 @@ class ThriftHiveMetastore_get_role_names_result { { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter558) + foreach ($this->success as $iter572) { - $xfer += $output->writeString($iter558); + $xfer += $output->writeString($iter572); } } $output->writeListEnd(); @@ -23538,15 +25117,15 @@ class ThriftHiveMetastore_list_roles_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size559 = 0; - $_etype562 = 0; - $xfer += $input->readListBegin($_etype562, $_size559); - for ($_i563 = 0; $_i563 < $_size559; ++$_i563) + $_size573 = 0; + $_etype576 = 0; + $xfer += $input->readListBegin($_etype576, $_size573); + for ($_i577 = 0; $_i577 < $_size573; ++$_i577) { - $elem564 = null; - $elem564 = new \metastore\Role(); - $xfer += $elem564->read($input); - $this->success []= $elem564; + $elem578 = null; + $elem578 = new \metastore\Role(); + $xfer += $elem578->read($input); + $this->success []= $elem578; } $xfer += $input->readListEnd(); } else { @@ -23582,9 +25161,9 @@ class ThriftHiveMetastore_list_roles_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter565) + foreach ($this->success as $iter579) { - $xfer += $iter565->write($output); + $xfer += $iter579->write($output); } } $output->writeListEnd(); @@ -23682,14 +25261,14 @@ class ThriftHiveMetastore_get_privilege_set_args { case 3: if ($ftype == TType::LST) { $this->group_names = array(); - $_size566 = 0; - $_etype569 = 0; - $xfer += $input->readListBegin($_etype569, $_size566); - for ($_i570 = 0; $_i570 < $_size566; ++$_i570) + $_size580 = 0; + $_etype583 = 0; + $xfer += $input->readListBegin($_etype583, $_size580); + for ($_i584 = 0; $_i584 < $_size580; ++$_i584) { - $elem571 = null; - $xfer += $input->readString($elem571); - $this->group_names []= $elem571; + $elem585 = null; + $xfer += $input->readString($elem585); + $this->group_names []= $elem585; } $xfer += $input->readListEnd(); } else { @@ -23730,9 +25309,9 @@ class ThriftHiveMetastore_get_privilege_set_args { { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter572) + foreach ($this->group_names as $iter586) { - $xfer += $output->writeString($iter572); + $xfer += $output->writeString($iter586); } } $output->writeListEnd(); @@ -24019,15 +25598,15 @@ class ThriftHiveMetastore_list_privileges_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size573 = 0; - $_etype576 = 0; - $xfer += $input->readListBegin($_etype576, $_size573); - for ($_i577 = 0; $_i577 < $_size573; ++$_i577) + $_size587 = 0; + $_etype590 = 0; + $xfer += $input->readListBegin($_etype590, $_size587); + for ($_i591 = 0; $_i591 < $_size587; ++$_i591) { - $elem578 = null; - $elem578 = new \metastore\HiveObjectPrivilege(); - $xfer += $elem578->read($input); - $this->success []= $elem578; + $elem592 = null; + $elem592 = new \metastore\HiveObjectPrivilege(); + $xfer += $elem592->read($input); + $this->success []= $elem592; } $xfer += $input->readListEnd(); } else { @@ -24063,9 +25642,9 @@ class ThriftHiveMetastore_list_privileges_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter579) + foreach ($this->success as $iter593) { - $xfer += $iter579->write($output); + $xfer += $iter593->write($output); } } $output->writeListEnd(); @@ -24488,14 +26067,14 @@ class ThriftHiveMetastore_set_ugi_args { case 2: if ($ftype == TType::LST) { $this->group_names = array(); - $_size580 = 0; - $_etype583 = 0; - $xfer += $input->readListBegin($_etype583, $_size580); - for ($_i584 = 0; $_i584 < $_size580; ++$_i584) + $_size594 = 0; + $_etype597 = 0; + $xfer += $input->readListBegin($_etype597, $_size594); + for ($_i598 = 0; $_i598 < $_size594; ++$_i598) { - $elem585 = null; - $xfer += $input->readString($elem585); - $this->group_names []= $elem585; + $elem599 = null; + $xfer += $input->readString($elem599); + $this->group_names []= $elem599; } $xfer += $input->readListEnd(); } else { @@ -24528,9 +26107,9 @@ class ThriftHiveMetastore_set_ugi_args { { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter586) + foreach ($this->group_names as $iter600) { - $xfer += $output->writeString($iter586); + $xfer += $output->writeString($iter600); } } $output->writeListEnd(); @@ -24600,14 +26179,14 @@ class ThriftHiveMetastore_set_ugi_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size587 = 0; - $_etype590 = 0; - $xfer += $input->readListBegin($_etype590, $_size587); - for ($_i591 = 0; $_i591 < $_size587; ++$_i591) + $_size601 = 0; + $_etype604 = 0; + $xfer += $input->readListBegin($_etype604, $_size601); + for ($_i605 = 0; $_i605 < $_size601; ++$_i605) { - $elem592 = null; - $xfer += $input->readString($elem592); - $this->success []= $elem592; + $elem606 = null; + $xfer += $input->readString($elem606); + $this->success []= $elem606; } $xfer += $input->readListEnd(); } else { @@ -24643,9 +26222,9 @@ class ThriftHiveMetastore_set_ugi_result { { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter593) + foreach ($this->success as $iter607) { - $xfer += $output->writeString($iter593); + $xfer += $output->writeString($iter607); } } $output->writeListEnd(); diff --git metastore/src/gen/thrift/gen-php/metastore/Types.php metastore/src/gen/thrift/gen-php/metastore/Types.php index 2e77f4d..f138b61 100644 --- metastore/src/gen/thrift/gen-php/metastore/Types.php +++ metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -5437,6 +5437,178 @@ class AddPartitionsRequest { } +class Function { + static $_TSPEC; + + public $functionName = null; + public $dbName = null; + public $className = null; + public $owner = null; + public $createTime = null; + public $functionType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'functionName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'className', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'owner', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'functionType', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['functionName'])) { + $this->functionName = $vals['functionName']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['className'])) { + $this->className = $vals['className']; + } + if (isset($vals['owner'])) { + $this->owner = $vals['owner']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['functionType'])) { + $this->functionType = $vals['functionType']; + } + } + } + + public function getName() { + return 'Function'; + } + + 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->functionName); + } 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->className); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->owner); + } 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::STRING) { + $xfer += $input->readString($this->functionType); + } 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('Function'); + if ($this->functionName !== null) { + $xfer += $output->writeFieldBegin('functionName', TType::STRING, 1); + $xfer += $output->writeString($this->functionName); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->className !== null) { + $xfer += $output->writeFieldBegin('className', TType::STRING, 3); + $xfer += $output->writeString($this->className); + $xfer += $output->writeFieldEnd(); + } + if ($this->owner !== null) { + $xfer += $output->writeFieldBegin('owner', TType::STRING, 4); + $xfer += $output->writeString($this->owner); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->functionType !== null) { + $xfer += $output->writeFieldBegin('functionType', TType::STRING, 6); + $xfer += $output->writeString($this->functionType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class MetaException extends TException { static $_TSPEC; diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote old mode 100644 new mode 100755 index 30c0f04..57d7d5b --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -93,6 +93,12 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' ColumnStatistics get_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)' print ' bool delete_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)' print ' bool delete_table_column_statistics(string db_name, string tbl_name, string col_name)' + print ' void create_function(Function func)' + print ' void drop_function(string dbName, string funcName)' + print ' void alter_function(string dbName, string funcName, Function newFunc)' + print ' get_functions(string dbName, string pattern)' + print ' get_all_functions(string dbName)' + print ' Function get_function(string dbName, string funcName)' print ' bool create_role(Role role)' print ' bool drop_role(string role_name)' print ' get_role_names()' @@ -578,6 +584,42 @@ elif cmd == 'delete_table_column_statistics': sys.exit(1) pp.pprint(client.delete_table_column_statistics(args[0],args[1],args[2],)) +elif cmd == 'create_function': + if len(args) != 1: + print 'create_function requires 1 args' + sys.exit(1) + pp.pprint(client.create_function(eval(args[0]),)) + +elif cmd == 'drop_function': + if len(args) != 2: + print 'drop_function requires 2 args' + sys.exit(1) + pp.pprint(client.drop_function(args[0],args[1],)) + +elif cmd == 'alter_function': + if len(args) != 3: + print 'alter_function requires 3 args' + sys.exit(1) + pp.pprint(client.alter_function(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_functions': + if len(args) != 2: + print 'get_functions requires 2 args' + sys.exit(1) + pp.pprint(client.get_functions(args[0],args[1],)) + +elif cmd == 'get_all_functions': + if len(args) != 1: + print 'get_all_functions requires 1 args' + sys.exit(1) + pp.pprint(client.get_all_functions(args[0],)) + +elif cmd == 'get_function': + if len(args) != 2: + print 'get_function requires 2 args' + sys.exit(1) + pp.pprint(client.get_function(args[0],args[1],)) + elif cmd == 'create_role': if len(args) != 1: print 'create_role requires 1 args' diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py index 574fb15..4721e5f 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -631,6 +631,53 @@ def delete_table_column_statistics(self, db_name, tbl_name, col_name): """ pass + def create_function(self, func): + """ + Parameters: + - func + """ + pass + + def drop_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + pass + + def alter_function(self, dbName, funcName, newFunc): + """ + Parameters: + - dbName + - funcName + - newFunc + """ + pass + + def get_functions(self, dbName, pattern): + """ + Parameters: + - dbName + - pattern + """ + pass + + def get_all_functions(self, dbName): + """ + Parameters: + - dbName + """ + pass + + def get_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + pass + def create_role(self, role): """ Parameters: @@ -3400,6 +3447,214 @@ def recv_delete_table_column_statistics(self, ): raise result.o4 raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); + def create_function(self, func): + """ + Parameters: + - func + """ + self.send_create_function(func) + self.recv_create_function() + + def send_create_function(self, func): + self._oprot.writeMessageBegin('create_function', TMessageType.CALL, self._seqid) + args = create_function_args() + args.func = func + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_function(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = create_function_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def drop_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + self.send_drop_function(dbName, funcName) + self.recv_drop_function() + + def send_drop_function(self, dbName, funcName): + self._oprot.writeMessageBegin('drop_function', TMessageType.CALL, self._seqid) + args = drop_function_args() + args.dbName = dbName + args.funcName = funcName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_function(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_function_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def alter_function(self, dbName, funcName, newFunc): + """ + Parameters: + - dbName + - funcName + - newFunc + """ + self.send_alter_function(dbName, funcName, newFunc) + self.recv_alter_function() + + def send_alter_function(self, dbName, funcName, newFunc): + self._oprot.writeMessageBegin('alter_function', TMessageType.CALL, self._seqid) + args = alter_function_args() + args.dbName = dbName + args.funcName = funcName + args.newFunc = newFunc + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_function(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = alter_function_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_functions(self, dbName, pattern): + """ + Parameters: + - dbName + - pattern + """ + self.send_get_functions(dbName, pattern) + return self.recv_get_functions() + + def send_get_functions(self, dbName, pattern): + self._oprot.writeMessageBegin('get_functions', TMessageType.CALL, self._seqid) + args = get_functions_args() + args.dbName = dbName + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_functions(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_functions_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_functions failed: unknown result"); + + def get_all_functions(self, dbName): + """ + Parameters: + - dbName + """ + self.send_get_all_functions(dbName) + return self.recv_get_all_functions() + + def send_get_all_functions(self, dbName): + self._oprot.writeMessageBegin('get_all_functions', TMessageType.CALL, self._seqid) + args = get_all_functions_args() + args.dbName = dbName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_functions(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_all_functions_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_functions failed: unknown result"); + + def get_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + self.send_get_function(dbName, funcName) + return self.recv_get_function() + + def send_get_function(self, dbName, funcName): + self._oprot.writeMessageBegin('get_function', TMessageType.CALL, self._seqid) + args = get_function_args() + args.dbName = dbName + args.funcName = funcName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_function(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_function_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_function failed: unknown result"); + def create_role(self, role): """ Parameters: @@ -3943,6 +4198,12 @@ def __init__(self, handler): self._processMap["get_partition_column_statistics"] = Processor.process_get_partition_column_statistics self._processMap["delete_partition_column_statistics"] = Processor.process_delete_partition_column_statistics self._processMap["delete_table_column_statistics"] = Processor.process_delete_table_column_statistics + self._processMap["create_function"] = Processor.process_create_function + self._processMap["drop_function"] = Processor.process_drop_function + self._processMap["alter_function"] = Processor.process_alter_function + self._processMap["get_functions"] = Processor.process_get_functions + self._processMap["get_all_functions"] = Processor.process_get_all_functions + self._processMap["get_function"] = Processor.process_get_function self._processMap["create_role"] = Processor.process_create_role self._processMap["drop_role"] = Processor.process_drop_role self._processMap["get_role_names"] = Processor.process_get_role_names @@ -5155,6 +5416,102 @@ def process_delete_table_column_statistics(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() + def process_create_function(self, seqid, iprot, oprot): + args = create_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_function_result() + try: + self._handler.create_function(args.func) + except AlreadyExistsException as o1: + result.o1 = o1 + except InvalidObjectException as o2: + result.o2 = o2 + except MetaException as o3: + result.o3 = o3 + except NoSuchObjectException as o4: + result.o4 = o4 + oprot.writeMessageBegin("create_function", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_function(self, seqid, iprot, oprot): + args = drop_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_function_result() + try: + self._handler.drop_function(args.dbName, args.funcName) + except NoSuchObjectException as o1: + result.o1 = o1 + except MetaException as o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_function", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_function(self, seqid, iprot, oprot): + args = alter_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_function_result() + try: + self._handler.alter_function(args.dbName, args.funcName, args.newFunc) + except InvalidOperationException as o1: + result.o1 = o1 + except MetaException as o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_function", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_functions(self, seqid, iprot, oprot): + args = get_functions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_functions_result() + try: + result.success = self._handler.get_functions(args.dbName, args.pattern) + except MetaException as o1: + result.o1 = o1 + oprot.writeMessageBegin("get_functions", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_functions(self, seqid, iprot, oprot): + args = get_all_functions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_functions_result() + try: + result.success = self._handler.get_all_functions(args.dbName) + except MetaException as o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_functions", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_function(self, seqid, iprot, oprot): + args = get_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_function_result() + try: + result.success = self._handler.get_function(args.dbName, args.funcName) + except MetaException as o1: + result.o1 = o1 + except NoSuchObjectException as o2: + result.o2 = o2 + oprot.writeMessageBegin("get_function", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_create_role(self, seqid, iprot, oprot): args = create_role_args() args.read(iprot) @@ -17606,19 +17963,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class create_role_args: +class create_function_args: """ Attributes: - - role + - func """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'role', (Role, Role.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'func', (Function, Function.thrift_spec), None, ), # 1 ) - def __init__(self, role=None,): - self.role = role + def __init__(self, func=None,): + self.func = func def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -17631,8 +17988,8 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.role = Role() - self.role.read(iprot) + self.func = Function() + self.func.read(iprot) else: iprot.skip(ftype) else: @@ -17644,10 +18001,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_role_args') - if self.role is not None: - oprot.writeFieldBegin('role', TType.STRUCT, 1) - self.role.write(oprot) + oprot.writeStructBegin('create_function_args') + if self.func is not None: + oprot.writeFieldBegin('func', TType.STRUCT, 1) + self.func.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -17667,19 +18024,935 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class create_role_result: +class create_function_result: """ Attributes: - - success - o1 + - o2 + - o3 + - o4 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 ) - def __init__(self, success=None, o1=None,): + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_function_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_function_args: + """ + Attributes: + - dbName + - funcName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'funcName', None, None, ), # 2 + ) + + def __init__(self, dbName=None, funcName=None,): + self.dbName = dbName + self.funcName = funcName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_function_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin('funcName', TType.STRING, 2) + oprot.writeString(self.funcName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_function_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_function_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_function_args: + """ + Attributes: + - dbName + - funcName + - newFunc + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'funcName', None, None, ), # 2 + (3, TType.STRUCT, 'newFunc', (Function, Function.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbName=None, funcName=None, newFunc=None,): + self.dbName = dbName + self.funcName = funcName + self.newFunc = newFunc + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.newFunc = Function() + self.newFunc.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_function_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin('funcName', TType.STRING, 2) + oprot.writeString(self.funcName) + oprot.writeFieldEnd() + if self.newFunc is not None: + oprot.writeFieldBegin('newFunc', TType.STRUCT, 3) + self.newFunc.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_function_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_function_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_functions_args: + """ + Attributes: + - dbName + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'pattern', None, None, ), # 2 + ) + + def __init__(self, dbName=None, pattern=None,): + self.dbName = dbName + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_functions_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.pattern is not None: + oprot.writeFieldBegin('pattern', TType.STRING, 2) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_functions_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype555, _size552) = iprot.readListBegin() + for _i556 in xrange(_size552): + _elem557 = iprot.readString(); + self.success.append(_elem557) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_functions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter558 in self.success: + oprot.writeString(iter558) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_functions_args: + """ + Attributes: + - dbName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + ) + + def __init__(self, dbName=None,): + self.dbName = dbName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_functions_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_functions_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype562, _size559) = iprot.readListBegin() + for _i563 in xrange(_size559): + _elem564 = iprot.readString(); + self.success.append(_elem564) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_functions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter565 in self.success: + oprot.writeString(iter565) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_function_args: + """ + Attributes: + - dbName + - funcName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'funcName', None, None, ), # 2 + ) + + def __init__(self, dbName=None, funcName=None,): + self.dbName = dbName + self.funcName = funcName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_function_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin('funcName', TType.STRING, 2) + oprot.writeString(self.funcName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_function_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Function, Function.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Function() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_function_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_role_args: + """ + Attributes: + - role + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'role', (Role, Role.thrift_spec), None, ), # 1 + ) + + def __init__(self, role=None,): + self.role = role + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.role = Role() + self.role.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_role_args') + if self.role is not None: + oprot.writeFieldBegin('role', TType.STRUCT, 1) + self.role.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 @@ -17941,10 +19214,10 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype555, _size552) = iprot.readListBegin() - for _i556 in xrange(_size552): - _elem557 = iprot.readString(); - self.success.append(_elem557) + (_etype569, _size566) = iprot.readListBegin() + for _i570 in xrange(_size566): + _elem571 = iprot.readString(); + self.success.append(_elem571) iprot.readListEnd() else: iprot.skip(ftype) @@ -17967,8 +19240,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter558 in self.success: - oprot.writeString(iter558) + for iter572 in self.success: + oprot.writeString(iter572) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -18441,11 +19714,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype562, _size559) = iprot.readListBegin() - for _i563 in xrange(_size559): - _elem564 = Role() - _elem564.read(iprot) - self.success.append(_elem564) + (_etype576, _size573) = iprot.readListBegin() + for _i577 in xrange(_size573): + _elem578 = Role() + _elem578.read(iprot) + self.success.append(_elem578) iprot.readListEnd() else: iprot.skip(ftype) @@ -18468,8 +19741,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter565 in self.success: - iter565.write(oprot) + for iter579 in self.success: + iter579.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -18537,10 +19810,10 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.group_names = [] - (_etype569, _size566) = iprot.readListBegin() - for _i570 in xrange(_size566): - _elem571 = iprot.readString(); - self.group_names.append(_elem571) + (_etype583, _size580) = iprot.readListBegin() + for _i584 in xrange(_size580): + _elem585 = iprot.readString(); + self.group_names.append(_elem585) iprot.readListEnd() else: iprot.skip(ftype) @@ -18565,8 +19838,8 @@ def write(self, oprot): if self.group_names is not None: oprot.writeFieldBegin('group_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter572 in self.group_names: - oprot.writeString(iter572) + for iter586 in self.group_names: + oprot.writeString(iter586) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -18773,11 +20046,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype576, _size573) = iprot.readListBegin() - for _i577 in xrange(_size573): - _elem578 = HiveObjectPrivilege() - _elem578.read(iprot) - self.success.append(_elem578) + (_etype590, _size587) = iprot.readListBegin() + for _i591 in xrange(_size587): + _elem592 = HiveObjectPrivilege() + _elem592.read(iprot) + self.success.append(_elem592) iprot.readListEnd() else: iprot.skip(ftype) @@ -18800,8 +20073,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter579 in self.success: - iter579.write(oprot) + for iter593 in self.success: + iter593.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -19126,10 +20399,10 @@ def read(self, iprot): elif fid == 2: if ftype == TType.LIST: self.group_names = [] - (_etype583, _size580) = iprot.readListBegin() - for _i584 in xrange(_size580): - _elem585 = iprot.readString(); - self.group_names.append(_elem585) + (_etype597, _size594) = iprot.readListBegin() + for _i598 in xrange(_size594): + _elem599 = iprot.readString(); + self.group_names.append(_elem599) iprot.readListEnd() else: iprot.skip(ftype) @@ -19150,8 +20423,8 @@ def write(self, oprot): if self.group_names is not None: oprot.writeFieldBegin('group_names', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter586 in self.group_names: - oprot.writeString(iter586) + for iter600 in self.group_names: + oprot.writeString(iter600) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19200,10 +20473,10 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype590, _size587) = iprot.readListBegin() - for _i591 in xrange(_size587): - _elem592 = iprot.readString(); - self.success.append(_elem592) + (_etype604, _size601) = iprot.readListBegin() + for _i605 in xrange(_size601): + _elem606 = iprot.readString(); + self.success.append(_elem606) iprot.readListEnd() else: iprot.skip(ftype) @@ -19226,8 +20499,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter593 in self.success: - oprot.writeString(iter593) + for iter607 in self.success: + oprot.writeString(iter607) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 8aeb52e..3629f1c 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -3606,6 +3606,126 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +class Function: + """ + Attributes: + - functionName + - dbName + - className + - owner + - createTime + - functionType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'functionName', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'className', None, None, ), # 3 + (4, TType.STRING, 'owner', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'functionType', None, None, ), # 6 + ) + + def __init__(self, functionName=None, dbName=None, className=None, owner=None, createTime=None, functionType=None,): + self.functionName = functionName + self.dbName = dbName + self.className = className + self.owner = owner + self.createTime = createTime + self.functionType = functionType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.functionName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.className = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.owner = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.functionType = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Function') + if self.functionName is not None: + oprot.writeFieldBegin('functionName', TType.STRING, 1) + oprot.writeString(self.functionName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.className is not None: + oprot.writeFieldBegin('className', TType.STRING, 3) + oprot.writeString(self.className) + oprot.writeFieldEnd() + if self.owner is not None: + oprot.writeFieldBegin('owner', TType.STRING, 4) + oprot.writeString(self.owner) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.functionType is not None: + oprot.writeFieldBegin('functionType', TType.STRING, 6) + oprot.writeString(self.functionType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class MetaException(TException): """ Attributes: diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb index 525cd33..9861a78 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -817,6 +817,32 @@ class AddPartitionsRequest ::Thrift::Struct.generate_accessors self end +class Function + include ::Thrift::Struct, ::Thrift::Struct_Union + FUNCTIONNAME = 1 + DBNAME = 2 + CLASSNAME = 3 + OWNER = 4 + CREATETIME = 5 + FUNCTIONTYPE = 6 + + FIELDS = { + FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + CLASSNAME => {:type => ::Thrift::Types::STRING, :name => 'className'}, + OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + FUNCTIONTYPE => {:type => ::Thrift::Types::STRING, :name => 'functionType'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + class MetaException < ::Thrift::Exception include ::Thrift::Struct, ::Thrift::Struct_Union def initialize(message=nil) diff --git metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb index 78a8405..6d03ca3 100644 --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -1218,6 +1218,105 @@ module ThriftHiveMetastore raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_table_column_statistics failed: unknown result') end + def create_function(func) + send_create_function(func) + recv_create_function() + end + + def send_create_function(func) + send_message('create_function', Create_function_args, :func => func) + end + + def recv_create_function() + result = receive_message(Create_function_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + return + end + + def drop_function(dbName, funcName) + send_drop_function(dbName, funcName) + recv_drop_function() + end + + def send_drop_function(dbName, funcName) + send_message('drop_function', Drop_function_args, :dbName => dbName, :funcName => funcName) + end + + def recv_drop_function() + result = receive_message(Drop_function_result) + raise result.o1 unless result.o1.nil? + raise result.o3 unless result.o3.nil? + return + end + + def alter_function(dbName, funcName, newFunc) + send_alter_function(dbName, funcName, newFunc) + recv_alter_function() + end + + def send_alter_function(dbName, funcName, newFunc) + send_message('alter_function', Alter_function_args, :dbName => dbName, :funcName => funcName, :newFunc => newFunc) + end + + def recv_alter_function() + result = receive_message(Alter_function_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def get_functions(dbName, pattern) + send_get_functions(dbName, pattern) + return recv_get_functions() + end + + def send_get_functions(dbName, pattern) + send_message('get_functions', Get_functions_args, :dbName => dbName, :pattern => pattern) + end + + def recv_get_functions() + result = receive_message(Get_functions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_functions failed: unknown result') + end + + def get_all_functions(dbName) + send_get_all_functions(dbName) + return recv_get_all_functions() + end + + def send_get_all_functions(dbName) + send_message('get_all_functions', Get_all_functions_args, :dbName => dbName) + end + + def recv_get_all_functions() + result = receive_message(Get_all_functions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_functions failed: unknown result') + end + + def get_function(dbName, funcName) + send_get_function(dbName, funcName) + return recv_get_function() + end + + def send_get_function(dbName, funcName) + send_message('get_function', Get_function_args, :dbName => dbName, :funcName => funcName) + end + + def recv_get_function() + result = receive_message(Get_function_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_function failed: unknown result') + end + def create_role(role) send_create_role(role) return recv_create_role() @@ -2418,6 +2517,84 @@ module ThriftHiveMetastore write_result(result, oprot, 'delete_table_column_statistics', seqid) end + def process_create_function(seqid, iprot, oprot) + args = read_args(iprot, Create_function_args) + result = Create_function_result.new() + begin + @handler.create_function(args.func) + rescue ::AlreadyExistsException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::NoSuchObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'create_function', seqid) + end + + def process_drop_function(seqid, iprot, oprot) + args = read_args(iprot, Drop_function_args) + result = Drop_function_result.new() + begin + @handler.drop_function(args.dbName, args.funcName) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_function', seqid) + end + + def process_alter_function(seqid, iprot, oprot) + args = read_args(iprot, Alter_function_args) + result = Alter_function_result.new() + begin + @handler.alter_function(args.dbName, args.funcName, args.newFunc) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_function', seqid) + end + + def process_get_functions(seqid, iprot, oprot) + args = read_args(iprot, Get_functions_args) + result = Get_functions_result.new() + begin + result.success = @handler.get_functions(args.dbName, args.pattern) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_functions', seqid) + end + + def process_get_all_functions(seqid, iprot, oprot) + args = read_args(iprot, Get_all_functions_args) + result = Get_all_functions_result.new() + begin + result.success = @handler.get_all_functions(args.dbName) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_functions', seqid) + end + + def process_get_function(seqid, iprot, oprot) + args = read_args(iprot, Get_function_args) + result = Get_function_result.new() + begin + result.success = @handler.get_function(args.dbName, args.funcName) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_function', seqid) + end + def process_create_role(seqid, iprot, oprot) args = read_args(iprot, Create_role_args) result = Create_role_result.new() @@ -5379,6 +5556,226 @@ module ThriftHiveMetastore ::Thrift::Struct.generate_accessors self end + class Create_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + FUNC = 1 + + FIELDS = { + FUNC => {:type => ::Thrift::Types::STRUCT, :name => 'func', :class => ::Function} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FUNCNAME = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O3 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FUNCNAME = 2 + NEWFUNC = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'}, + NEWFUNC => {:type => ::Thrift::Types::STRUCT, :name => 'newFunc', :class => ::Function} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_functions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + PATTERN = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_functions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_functions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_functions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FUNCNAME = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Function}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Create_role_args include ::Thrift::Struct, ::Thrift::Struct_Union ROLE = 1 diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index 58f9957..582c883 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -50,6 +50,7 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hive.common.JavaUtils; import org.apache.hadoop.hive.common.LogUtils; import org.apache.hadoop.hive.common.LogUtils.LogInitializationException; import org.apache.hadoop.hive.common.classification.InterfaceAudience; @@ -68,6 +69,7 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.EnvironmentContext; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.HiveObjectType; @@ -686,7 +688,9 @@ private void drop_database_core(RawStore ms, firePreEvent(new PreDropDatabaseEvent(db, this)); List allTables = get_all_tables(db.getName()); - if (!cascade && !allTables.isEmpty()) { + List allFunctions = get_all_functions(db.getName()); + + if (!cascade && (!allTables.isEmpty() || !allFunctions.isEmpty())) { throw new InvalidOperationException("Database " + db.getName() + " is not empty"); } Path path = new Path(db.getLocationUri()).getParent(); @@ -698,7 +702,12 @@ private void drop_database_core(RawStore ms, Path databasePath = wh.getDnsPath(wh.getDatabasePath(db)); - // first drop tables + // drop any functions before dropping db + for (String funcName : allFunctions) { + drop_function(name, funcName); + } + + // drop tables before dropping db int tableBatchSize = HiveConf.getIntVar(hiveConf, ConfVars.METASTORE_BATCH_RETRIEVE_MAX); @@ -3392,6 +3401,17 @@ public PartitionsByExprResult get_partitions_by_expr( return ret; } + private void rethrowAsMetaException(Exception e) + throws MetaException { + if (e instanceof MetaException) { + throw (MetaException) e; + } else { + MetaException me = new MetaException(e.toString()); + me.initCause(e); + throw me; + } + } + private void rethrowException(Exception e) throws MetaException, NoSuchObjectException, TException { // TODO: Both of these are TException, why do we need these separate clauses? @@ -4126,6 +4146,169 @@ private static MetaException newMetaException(Exception e) { me.initCause(e); return me; } + + private void validateFunctionInfo(Function func) throws InvalidObjectException, MetaException { + if (!MetaStoreUtils.validateName(func.getFunctionName())) { + throw new InvalidObjectException(func.getFunctionName() + " is not a valid object name"); + } + String className = func.getClassName(); + if (className == null) { + throw new InvalidObjectException("Function class name cannot be null"); + } + + // Not sure if we can verify that the class is actually a UDF, + // since from metastore we do not have access to ql where UDF classes live. + // We can at least verify that the class name is a valid class. + try { + Class functionClass = Class.forName(className, true, JavaUtils.getClassLoader()); + if (functionClass == null) { + throw new ClassNotFoundException(className + " was null"); + } + } catch (ClassNotFoundException e) { + throw new MetaException("Cannot load class " + className + " for function " + + func.getDbName() + "." + func.getFunctionName() + ": " + e); + } + } + + @Override + public void create_function(Function func) throws AlreadyExistsException, + InvalidObjectException, MetaException, NoSuchObjectException, + TException { + validateFunctionInfo(func); + + boolean success = false; + RawStore ms = getMS(); + try { + ms.openTransaction(); + + Database db = ms.getDatabase(func.getDbName()); + if (db == null) { + throw new NoSuchObjectException("The database " + func.getDbName() + " does not exist"); + } + Function existingFunc = ms.getFunction(func.getDbName(), func.getFunctionName()); + if (existingFunc != null) { + throw new AlreadyExistsException( + "Function " + func.getFunctionName() + " already exists"); + } + + // set create time + long time = System.currentTimeMillis() / 1000; + func.setCreateTime((int) time); + ms.createFunction(func); + success = ms.commitTransaction(); + } finally { + if (!success) { + ms.rollbackTransaction(); + } + } + } + + @Override + public void drop_function(String dbName, String funcName) + throws NoSuchObjectException, MetaException, + InvalidObjectException, InvalidInputException { + boolean success = false; + Function func = null; + RawStore ms = getMS(); + + try { + ms.openTransaction(); + + func = ms.getFunction(dbName, funcName); + if (func == null) { + throw new NoSuchObjectException("Function " + funcName + " does not exist"); + } + ms.dropFunction(dbName, funcName); + success = ms.commitTransaction(); + } finally { + if (!success) { + ms.rollbackTransaction(); + } + } + } + + @Override + public void alter_function(String dbName, String funcName, Function newFunc) + throws InvalidOperationException, MetaException, TException { + validateFunctionInfo(newFunc); + boolean success = false; + RawStore ms = getMS(); + try { + ms.openTransaction(); + ms.alterFunction(dbName, funcName, newFunc); + success = ms.commitTransaction(); + } finally { + if (!success) { + ms.rollbackTransaction(); + } + } + } + + @Override + public List get_functions(String dbName, String pattern) + throws MetaException { + startFunction("get_functions", ": db=" + dbName + " pat=" + pattern); + + RawStore ms = getMS(); + Exception ex = null; + List funcNames = null; + + try { + funcNames = ms.getFunctions(dbName, pattern); + } catch (Exception e) { + ex = e; + rethrowAsMetaException(e); + } finally { + endFunction("get_functions", funcNames != null, ex); + } + + return funcNames; + } + + @Override + public List get_all_functions(String dbName) throws MetaException { + startFunction("get_all_functions", ": db=" + dbName); + + RawStore ms = getMS(); + Exception ex = null; + List funcNames = null; + + try { + funcNames = ms.getAllFunctions(dbName); + } catch (Exception e) { + ex = e; + rethrowAsMetaException(e); + } finally { + endFunction("get_all_functions", funcNames != null, ex); + } + + return funcNames; + } + + @Override + public Function get_function(String dbName, String funcName) + throws MetaException, NoSuchObjectException, TException { + startFunction("get_function", ": " + dbName + "." + funcName); + + RawStore ms = getMS(); + Function func = null; + Exception ex = null; + + try { + func = ms.getFunction(dbName, funcName); + if (func == null) { + throw new NoSuchObjectException( + "Function " + dbName + "." + funcName + " does not exist"); + } + } catch (Exception e) { + ex = e; + rethrowAsMetaException(e); + } finally { + endFunction("get_database", func != null, ex); + } + + return func; + } } public static IHMSHandler newHMSHandler(String name, HiveConf hiveConf) throws MetaException { diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index ed05790..723045f 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -53,6 +53,7 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.EnvironmentContext; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.Index; @@ -1258,6 +1259,14 @@ private FieldSchema deepCopy(FieldSchema schema) { return copy; } + private Function deepCopy(Function func) { + Function copy = null; + if (func != null) { + copy = new Function(func); + } + return copy; + } + private List deepCopyPartitions(List partitions) { return deepCopyPartitions(partitions, null); } @@ -1460,4 +1469,41 @@ public boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map getFunctions(String dbName, String pattern) + throws MetaException, TException { + return client.get_functions(dbName, pattern); + } + + @Override + public List getAllFunctions(String dbName) + throws MetaException, TException { + return client.get_all_functions(dbName); + } } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index 4288781..9df1f39 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -27,6 +27,7 @@ import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.Index; @@ -1016,6 +1017,24 @@ public String getDelegationToken(String owner, String renewerKerberosPrincipalNa */ public void cancelDelegationToken(String tokenStrForm) throws MetaException, TException; + public void createFunction(Function func) + throws InvalidObjectException, MetaException, TException; + + public void alterFunction(String dbName, String funcName, Function newFunction) + throws InvalidObjectException, MetaException, TException; + + public void dropFunction(String dbName, String funcName) throws MetaException, + NoSuchObjectException, InvalidObjectException, InvalidInputException, TException; + + public Function getFunction(String dbName, String funcName) + throws MetaException, TException; + + public List getFunctions(String dbName, String pattern) + throws MetaException, TException; + + public List getAllFunctions(String dbName) + throws MetaException, TException; + public class IncompatibleMetastoreException extends MetaException { public IncompatibleMetastoreException(String message) { diff --git metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 794fadd..bff967d 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -69,6 +69,7 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.HiveObjectType; @@ -101,6 +102,7 @@ import org.apache.hadoop.hive.metastore.model.MDatabase; import org.apache.hadoop.hive.metastore.model.MDelegationToken; import org.apache.hadoop.hive.metastore.model.MFieldSchema; +import org.apache.hadoop.hive.metastore.model.MFunction; import org.apache.hadoop.hive.metastore.model.MGlobalPrivilege; import org.apache.hadoop.hive.metastore.model.MIndex; import org.apache.hadoop.hive.metastore.model.MMasterKey; @@ -6088,4 +6090,189 @@ private void debugLexer(CommonTokenStream stream, FilterLexer lexer) { LOG.error("LEXER: tokens (error)", t); } } + + private Function convertToFunction(MFunction mfunc) { + if (mfunc == null) { + return null; + } + + Function func = new Function(mfunc.getFunctionName(), + mfunc.getDatabase().getName(), + mfunc.getClassName(), + mfunc.getOwner(), + mfunc.getCreateTime(), + mfunc.getFunctionType()); + return func; + } + + private MFunction convertToMFunction(Function func) throws InvalidObjectException { + if (func == null) { + return null; + } + + MDatabase mdb = null; + try { + mdb = getMDatabase(func.getDbName()); + } catch (NoSuchObjectException e) { + LOG.error(StringUtils.stringifyException(e)); + throw new InvalidObjectException("Database " + func.getDbName() + " doesn't exist."); + } + + MFunction mfunc = new MFunction(func.getFunctionName(), + mdb, + func.getClassName(), + func.getOwner(), + func.getCreateTime(), + func.getFunctionType()); + return mfunc; + } + + public void createFunction(Function func) throws InvalidObjectException, MetaException { + boolean committed = false; + try { + openTransaction(); + MFunction mfunc = convertToMFunction(func); + pm.makePersistent(mfunc); + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + } + + public void alterFunction(String dbName, String funcName, Function newFunction) + throws InvalidObjectException, MetaException { + boolean success = false; + try { + openTransaction(); + funcName = funcName.toLowerCase(); + dbName = dbName.toLowerCase(); + MFunction newf = convertToMFunction(newFunction); + if (newf == null) { + throw new InvalidObjectException("new function is invalid"); + } + + MFunction oldf = getMFunction(dbName, funcName); + if (oldf == null) { + throw new MetaException("function " + funcName + " doesn't exist"); + } + + // For now only alter name, owner, class name, type + oldf.setFunctionName(newf.getFunctionName().toLowerCase()); + oldf.setDatabase(newf.getDatabase()); + oldf.setOwner(newf.getOwner()); + oldf.setClassName(newf.getClassName()); + oldf.setFunctionType(newf.getFunctionType()); + + // commit the changes + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + } + + public void dropFunction(String dbName, String funcName) throws MetaException, + NoSuchObjectException, InvalidObjectException, InvalidInputException { + boolean success = false; + try { + openTransaction(); + MFunction mfunc = getMFunction(dbName, funcName); + pm.retrieve(mfunc); + if (mfunc != null) { + // TODO: Delete any privileges + pm.deletePersistentAll(mfunc); + } + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + } + + private MFunction getMFunction(String db, String function) { + MFunction mfunc = null; + boolean commited = false; + try { + openTransaction(); + db = db.toLowerCase().trim(); + function = function.toLowerCase().trim(); + Query query = pm.newQuery(MFunction.class, "functionName == function && database.name == db"); + query.declareParameters("java.lang.String function, java.lang.String db"); + query.setUnique(true); + mfunc = (MFunction) query.execute(function, db); + pm.retrieve(mfunc); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mfunc; + } + + public Function getFunction(String dbName, String funcName) throws MetaException { + boolean commited = false; + Function func = null; + try { + openTransaction(); + func = convertToFunction(getMFunction(dbName, funcName)); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return func; + } + + public List getFunctions(String dbName, String pattern) + throws MetaException { + boolean commited = false; + List funcs = null; + try { + openTransaction(); + dbName = dbName.toLowerCase().trim(); + // Take the pattern and split it on the | to get all the composing + // patterns + String[] subpatterns = pattern.trim().split("\\|"); + String query = + "select functionName from org.apache.hadoop.hive.metastore.model.MFunction " + + "where database.name == dbName && ("; + boolean first = true; + for (String subpattern : subpatterns) { + subpattern = "(?i)" + subpattern.replaceAll("\\*", ".*"); + if (!first) { + query = query + " || "; + } + query = query + " functionName.matches(\"" + subpattern + "\")"; + first = false; + } + query = query + ")"; + + Query q = pm.newQuery(query); + q.declareParameters("java.lang.String dbName"); + q.setResult("functionName"); + q.setOrdering("functionName ascending"); + Collection names = (Collection) q.execute(dbName); + funcs = new ArrayList(); + for (Iterator i = names.iterator(); i.hasNext();) { + funcs.add((String) i.next()); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return funcs; + } + + public List getAllFunctions(String dbName) throws MetaException { + return getFunctions(dbName, ".*"); + } + } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java index f5ea2ef..cc5699b 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java @@ -29,6 +29,7 @@ import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; @@ -467,4 +468,64 @@ public abstract void updateMasterKey(Integer seqNo, String key) public abstract String getMetaStoreSchemaVersion() throws MetaException; public abstract void setMetaStoreSchemaVersion(String version, String comment) throws MetaException; + + /** + * Register a user-defined function based on the function specification passed in. + * @param func + * @throws InvalidObjectException + * @throws MetaException + */ + public void createFunction(Function func) + throws InvalidObjectException, MetaException; + + /** + * Alter function based on new function specs. + * @param dbName + * @param name + * @param newFunction + * @throws InvalidObjectException + * @throws MetaException + */ + public void alterFunction(String dbName, String funcName, Function newFunction) + throws InvalidObjectException, MetaException; + + /** + * Drop a function definition. + * @param dbName + * @param functionName + * @return + * @throws MetaException + * @throws NoSuchObjectException + * @throws InvalidObjectException + * @throws InvalidInputException + */ + public void dropFunction(String dbName, String funcName) + throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException; + + /** + * Retrieve function by name. + * @param dbName + * @param functionName + * @return + * @throws MetaException + */ + public Function getFunction(String dbName, String funcName) throws MetaException; + + /** + * Retrieve list of function names based on name pattern. + * @param dbName + * @param pattern + * @return + * @throws MetaException + */ + public List getFunctions(String dbName, String pattern) throws MetaException; + + /** + * Retrieve all function names for a given database name. + * @param dbName + * @return + * @throws MetaException + */ + public List getAllFunctions(String dbName) throws MetaException; + } diff --git metastore/src/model/org/apache/hadoop/hive/metastore/model/MFunction.java metastore/src/model/org/apache/hadoop/hive/metastore/model/MFunction.java new file mode 100644 index 0000000..77ac8ec --- /dev/null +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MFunction.java @@ -0,0 +1,94 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MFunction { + + private String functionName; + private MDatabase database; + private String className; + private String owner; + private int createTime; + private String functionType; + + public MFunction() { + } + + public MFunction(String functionName, + MDatabase database, + String className, + String owner, + int createTime, + String functionType) { + this.setFunctionName(functionName); + this.setDatabase(database); + this.setFunctionType(functionType); + this.setClassName(className); + this.setOwner(owner); + this.setCreateTime(createTime); + } + + public String getFunctionName() { + return functionName; + } + + public void setFunctionName(String functionName) { + this.functionName = functionName; + } + + public MDatabase getDatabase() { + return database; + } + + public void setDatabase(MDatabase database) { + this.database = database; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public int getCreateTime() { + return createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getFunctionType() { + return functionType; + } + + public void setFunctionType(String functionType) { + this.functionType = functionType; + } +} diff --git metastore/src/model/package.jdo metastore/src/model/package.jdo index 49f2aac..c1c8ec9 100644 --- metastore/src/model/package.jdo +++ metastore/src/model/package.jdo @@ -911,6 +911,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java index 003dc9c..2a7acf9 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java @@ -27,6 +27,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; @@ -596,4 +597,39 @@ public boolean addPartitions(String dbName, String tblName, List part return objectStore.addPartitions(dbName, tblName, parts); } + public void createFunction(Function func) throws InvalidObjectException, + MetaException { + objectStore.createFunction(func); + } + + @Override + public void alterFunction(String dbName, String funcName, Function newFunction) + throws InvalidObjectException, MetaException { + objectStore.alterFunction(dbName, funcName, newFunction); + } + + @Override + public void dropFunction(String dbName, String funcName) + throws MetaException, NoSuchObjectException, InvalidObjectException, + InvalidInputException { + objectStore.dropFunction(dbName, funcName); + } + + @Override + public Function getFunction(String dbName, String funcName) + throws MetaException { + return objectStore.getFunction(dbName, funcName); + } + + @Override + public List getFunctions(String dbName, String pattern) + throws MetaException { + return objectStore.getFunctions(dbName, pattern); + } + + @Override + public List getAllFunctions(String dbName) throws MetaException { + return objectStore.getAllFunctions(dbName); + } + } diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java index 6dd0852..d04ce23 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java @@ -28,6 +28,7 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; @@ -626,6 +627,38 @@ public boolean addPartitions(String dbName, String tblName, List part throws InvalidObjectException, MetaException { return false; } + + public void createFunction(Function func) throws InvalidObjectException, + MetaException { + } + + @Override + public void alterFunction(String dbName, String funcName, Function newFunction) + throws InvalidObjectException, MetaException { + } + + @Override + public void dropFunction(String dbName, String funcName) + throws MetaException, NoSuchObjectException, InvalidObjectException, + InvalidInputException { + } + + @Override + public Function getFunction(String dbName, String funcName) + throws MetaException { + return null; + } + + @Override + public List getFunctions(String dbName, String pattern) + throws MetaException { + return null; + } + + @Override + public List getAllFunctions(String dbName) throws MetaException { + return null; + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java index 28df22d..5693d7e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hive.ql.exec; +import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Method; import java.net.URL; @@ -39,7 +40,12 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hive.common.JavaUtils; import org.apache.hadoop.hive.common.type.HiveDecimal; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.Function; +import org.apache.hadoop.hive.ql.exec.FunctionUtils.UDFClassType; +import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.parse.SemanticException; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; @@ -517,9 +523,55 @@ public static void registerGenericUDTF(boolean isNative, String functionName, } } + private static FunctionInfo getFunctionInfoFromMetastore(String functionName) { + FunctionInfo ret = null; + + try { + String dbName; + String fName; + if (FunctionUtils.isQualifiedFunctionName(functionName)) { + String[] parts = FunctionUtils.splitQualifiedFunctionName(functionName); + dbName = parts[0]; + fName = parts[1]; + } else { + // otherwise, qualify using current db + dbName = SessionState.get().getCurrentDatabase(); + fName = functionName; + } + + // Try looking up function in the metastore + HiveConf conf = SessionState.get().getConf(); + Function func = Hive.get(conf).getFunction(dbName, fName); + if (func != null) { + // Found UDF in metastore - now add it to the function registry + // At this point we should add any relevant jars that would be needed for the UDf. + Class udfClass = Class.forName(func.getClassName(), true, JavaUtils.getClassLoader()); + if (registerTemporaryFunction(functionName, udfClass)) { + ret = mFunctions.get(functionName); + } else { + LOG.error(func.getClassName() + " is not a valid UDF class and was not registered."); + } + } + } catch (HiveException e) { + LOG.info("Unable to lookup UDF in metastore: " + e); + } catch (ClassNotFoundException e) { + // Lookup of UDf class failed + LOG.error("Unable to load UDF class: " + e); + } + + return ret; + } + private static T getQualifiedFunctionInfo(Map mFunctions, String functionName) { T functionInfo = mFunctions.get(functionName); - // Eventually this would check metastore for registered functions. + if (functionInfo == null) { + // Try looking up in metastore. + FunctionInfo fi = getFunctionInfoFromMetastore(functionName); + if (fi != null) { + // metastore lookup resulted in function getting added to mFunctions, try again + functionInfo = mFunctions.get(functionName); + } + } return functionInfo; } @@ -552,7 +604,33 @@ public static FunctionInfo getFunctionInfo(String functionName) { * @return set of strings contains function names */ public static Set getFunctionNames() { - return mFunctions.keySet(); + return getFunctionNames(true); + } + + public static Set getFunctionNames(boolean searchMetastore) { + Set functionNames = mFunctions.keySet(); + if (searchMetastore) { + functionNames = new HashSet(functionNames); + try { + Hive db = getHive(); + List dbNames = db.getAllDatabases(); + + for (String dbName : dbNames) { + List funcNames = db.getAllFunctions(dbName); + for (String funcName : funcNames) { + functionNames.add(FunctionUtils.qualifyFunctionName(funcName, dbName)); + } + } + } catch (HiveException e) { + LOG.error(e); + // Continue on, we can still return the functions we've gotten to this point. + } + } + return functionNames; + } + + public static Hive getHive() throws HiveException { + return Hive.get(SessionState.get().getConf()); } /** @@ -1591,29 +1669,38 @@ public static boolean isOpPreserveInputName(ExprNodeDesc desc) { public static boolean registerTemporaryFunction( String functionName, Class udfClass) { - if (UDF.class.isAssignableFrom(udfClass)) { + UDFClassType udfClassType = FunctionUtils.getUDFClassType(udfClass); + switch (udfClassType) { + case UDF: FunctionRegistry.registerTemporaryUDF( functionName, (Class) udfClass, false); - } else if (GenericUDF.class.isAssignableFrom(udfClass)) { + break; + case GENERIC_UDF: FunctionRegistry.registerTemporaryGenericUDF( functionName, (Class) udfClass); - } else if (GenericUDTF.class.isAssignableFrom(udfClass)) { + break; + case GENERIC_UDTF: FunctionRegistry.registerTemporaryGenericUDTF( functionName, (Class) udfClass); - } else if (UDAF.class.isAssignableFrom(udfClass)) { + break; + case UDAF: FunctionRegistry.registerTemporaryUDAF( functionName, (Class) udfClass); - } else if (GenericUDAFResolver.class.isAssignableFrom(udfClass)) { + break; + case GENERIC_UDAF_RESOLVER: FunctionRegistry.registerTemporaryGenericUDAF( functionName, (GenericUDAFResolver) ReflectionUtils.newInstance(udfClass, null)); - } else if(TableFunctionResolver.class.isAssignableFrom(udfClass)) { + break; + case TABLE_FUNCTION_RESOLVER: FunctionRegistry.registerTableFunction( functionName, (Class)udfClass); - } else { + break; + default: return false; } return true; + } /** diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java index 988b389..ef0adba 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java @@ -18,13 +18,21 @@ package org.apache.hadoop.hive.ql.exec; +import static org.apache.hadoop.util.StringUtils.stringifyException; + +import java.io.IOException; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.common.JavaUtils; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.ql.Context; import org.apache.hadoop.hive.ql.DriverContext; import org.apache.hadoop.hive.ql.QueryPlan; +import org.apache.hadoop.hive.ql.exec.FunctionUtils.FunctionType; +import org.apache.hadoop.hive.ql.exec.FunctionUtils.UDFClassType; +import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.plan.CreateFunctionDesc; import org.apache.hadoop.hive.ql.plan.DropFunctionDesc; @@ -32,6 +40,7 @@ import org.apache.hadoop.hive.ql.plan.DropMacroDesc; import org.apache.hadoop.hive.ql.plan.FunctionWork; import org.apache.hadoop.hive.ql.plan.api.StageType; +import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver; import org.apache.hadoop.hive.ql.udf.generic.GenericUDF; import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF; @@ -62,12 +71,32 @@ public void initialize(HiveConf conf, QueryPlan queryPlan, DriverContext ctx) { public int execute(DriverContext driverContext) { CreateFunctionDesc createFunctionDesc = work.getCreateFunctionDesc(); if (createFunctionDesc != null) { - return createFunction(createFunctionDesc); + if (createFunctionDesc.isTemp()) { + return createTemporaryFunction(createFunctionDesc); + } else { + try { + return createPermanentFunction(Hive.get(conf), createFunctionDesc); + } catch (Exception e) { + setException(e); + LOG.error(stringifyException(e)); + return 1; + } + } } DropFunctionDesc dropFunctionDesc = work.getDropFunctionDesc(); if (dropFunctionDesc != null) { - return dropFunction(dropFunctionDesc); + if (dropFunctionDesc.isTemp()) { + return dropTemporaryFunction(dropFunctionDesc); + } else { + try { + return dropPermanentFunction(Hive.get(conf), dropFunctionDesc); + } catch (Exception e) { + setException(e); + LOG.error(stringifyException(e)); + return 1; + } + } } CreateMacroDesc createMacroDesc = work.getCreateMacroDesc(); @@ -82,7 +111,55 @@ public int execute(DriverContext driverContext) { return 0; } - private int createFunction(CreateFunctionDesc createFunctionDesc) { + private int createPermanentFunction(Hive db, CreateFunctionDesc createFunctionDesc) + throws HiveException, IOException { + String[] qualifiedNameParts = FunctionUtils.getQualifiedFunctionNameParts( + createFunctionDesc.getFunctionName()); + String dbName = qualifiedNameParts[0]; + String funcName = qualifiedNameParts[1]; + String registeredName = FunctionUtils.qualifyFunctionName(funcName, dbName); + String className = createFunctionDesc.getClassName(); + boolean addedToRegistry = false; + + try { + // UDF class should exist + Class udfClass = getUdfClass(createFunctionDesc); + if (FunctionUtils.getUDFClassType(udfClass) == UDFClassType.NOT_UDF) { + console.printError("FAILED: Class " + createFunctionDesc.getClassName() + + " does not implement UDF, GenericUDF, or UDAF"); + return 1; + } + + // TODO: There should be a registerPermanentFunction() + addedToRegistry = FunctionRegistry.registerTemporaryFunction(registeredName, udfClass); + if (!addedToRegistry) { + console.printError("Failed to register " + registeredName + + " using class " + createFunctionDesc.getClassName()); + return 1; + } + + // Add to metastore + Function func = new Function( + funcName, + dbName, + className, + conf.getUser(), + (int) (System.currentTimeMillis() / 1000), + FunctionType.JAVA.toString() + ); + db.createFunction(func); + return 0; + } catch (ClassNotFoundException e) { + console.printError("FAILED: Class " + createFunctionDesc.getClassName() + " not found"); + LOG.info("create function: " + StringUtils.stringifyException(e)); + if (addedToRegistry) { + FunctionRegistry.unregisterTemporaryUDF(registeredName); + } + return 1; + } + } + + private int createTemporaryFunction(CreateFunctionDesc createFunctionDesc) { try { Class udfClass = getUdfClass(createFunctionDesc); boolean registered = FunctionRegistry.registerTemporaryFunction( @@ -121,7 +198,26 @@ private int dropMacro(DropMacroDesc dropMacroDesc) { } } - private int dropFunction(DropFunctionDesc dropFunctionDesc) { + private int dropPermanentFunction(Hive db, DropFunctionDesc dropFunctionDesc) { + try { + String[] qualifiedNameParts = FunctionUtils.getQualifiedFunctionNameParts( + dropFunctionDesc.getFunctionName()); + String dbName = qualifiedNameParts[0]; + String funcName = qualifiedNameParts[1]; + + String registeredName = FunctionUtils.qualifyFunctionName(funcName, dbName); + // TODO: there should be a unregisterPermanentUDF() + FunctionRegistry.unregisterTemporaryUDF(registeredName); + db.dropFunction(dbName, funcName); + + return 0; + } catch (Exception e) { + LOG.info("drop function: " + StringUtils.stringifyException(e)); + return 1; + } + } + + private int dropTemporaryFunction(DropFunctionDesc dropFunctionDesc) { try { FunctionRegistry.unregisterTemporaryUDF(dropFunctionDesc .getFunctionName()); diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionUtils.java ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionUtils.java index aedc5cd..76b3ddf 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionUtils.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionUtils.java @@ -1,6 +1,11 @@ package org.apache.hadoop.hive.ql.exec; import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.session.SessionState; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDF; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF; +import org.apache.hadoop.hive.ql.udf.ptf.TableFunctionResolver; public class FunctionUtils { @@ -33,4 +38,55 @@ public static String qualifyFunctionName(String functionName, String dbName) { return names; } + public static String[] getQualifiedFunctionNameParts(String name) throws HiveException { + if (isQualifiedFunctionName(name)) { + return splitQualifiedFunctionName(name); + } + String dbName = SessionState.get().getCurrentDatabase(); + return new String[] { dbName, name }; + } + + /** + * Function type, for permanent functions. + * Currently just JAVA, though we could support Groovy later on. + */ + public enum FunctionType { + JAVA, + } + + /** + * Enum type to describe what kind of UDF implementation class + */ + public enum UDFClassType { + NOT_UDF, + UDF, + GENERIC_UDF, + GENERIC_UDTF, + UDAF, + GENERIC_UDAF_RESOLVER, + TABLE_FUNCTION_RESOLVER, + } + + /** + * Determine the UDF class type of the class + * @param udfClass + * @return UDFClassType enum corresponding to the class type of the UDF + */ + public static UDFClassType getUDFClassType(Class udfClass) { + if (UDF.class.isAssignableFrom(udfClass)) { + return UDFClassType.UDF; + } else if (GenericUDF.class.isAssignableFrom(udfClass)) { + return UDFClassType.GENERIC_UDF; + } else if (GenericUDTF.class.isAssignableFrom(udfClass)) { + return UDFClassType.GENERIC_UDTF; + } else if (UDAF.class.isAssignableFrom(udfClass)) { + return UDFClassType.UDAF; + } else if (GenericUDAFResolver.class.isAssignableFrom(udfClass)) { + return UDFClassType.GENERIC_UDAF_RESOLVER; + } else if(TableFunctionResolver.class.isAssignableFrom(udfClass)) { + return UDFClassType.TABLE_FUNCTION_RESOLVER; + } else { + return UDFClassType.NOT_UDF; + } + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index d32deea..43bf221 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -67,6 +67,7 @@ import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Function; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.HiveObjectType; @@ -2542,4 +2543,54 @@ public void cancelDelegationToken(String tokenStrForm) return qualifiedName.split("\\."); } + public void createFunction(Function func) throws HiveException { + try { + getMSC().createFunction(func); + } catch (TException te) { + throw new HiveException(te); + } + } + + public void alterFunction(String dbName, String funcName, Function newFunction) + throws HiveException { + try { + getMSC().alterFunction(dbName, funcName, newFunction); + } catch (TException te) { + throw new HiveException(te); + } + } + + public void dropFunction(String dbName, String funcName) + throws HiveException { + try { + getMSC().dropFunction(dbName, funcName); + } catch (TException te) { + throw new HiveException(te); + } + } + + public Function getFunction(String dbName, String funcName) throws HiveException { + try { + return getMSC().getFunction(dbName, funcName); + } catch (TException te) { + throw new HiveException(te); + } + } + + public List getFunctions(String dbName, String pattern) throws HiveException { + try { + return getMSC().getFunctions(dbName, pattern); + } catch (TException te) { + throw new HiveException(te); + } + } + + public List getAllFunctions(String dbName) throws HiveException { + try { + return getMSC().getAllFunctions(dbName); + } catch (TException te) { + throw new HiveException(te); + } + } + }; diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java index cc12f30..08fb562 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java @@ -21,13 +21,17 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.ql.ErrorMsg; import org.apache.hadoop.hive.ql.exec.FunctionRegistry; import org.apache.hadoop.hive.ql.exec.FunctionUtils; import org.apache.hadoop.hive.ql.exec.TaskFactory; +import org.apache.hadoop.hive.ql.metadata.Hive; +import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.plan.CreateFunctionDesc; import org.apache.hadoop.hive.ql.plan.DropFunctionDesc; import org.apache.hadoop.hive.ql.plan.FunctionWork; +import org.apache.hadoop.hive.ql.session.SessionState; /** * FunctionSemanticAnalyzer. @@ -54,30 +58,39 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { } private void analyzeCreateFunction(ASTNode ast) throws SemanticException { + // ^(TOK_CREATEFUNCTION identifier StringLiteral ({isTempFunction}? => TOK_TEMPORARY)) String functionName = ast.getChild(0).getText(); + boolean isTemporaryFunction = (ast.getFirstChildWithType(HiveParser.TOK_TEMPORARY) != null); String className = unescapeSQLString(ast.getChild(1).getText()); // Temp functions are not allowed to have qualified names. - if (FunctionUtils.isQualifiedFunctionName(functionName)) { + if (isTemporaryFunction && FunctionUtils.isQualifiedFunctionName(functionName)) { throw new SemanticException("Temporary function cannot be created with a qualified name."); } - CreateFunctionDesc desc = new CreateFunctionDesc(functionName, className); + CreateFunctionDesc desc = new CreateFunctionDesc(functionName, isTemporaryFunction, className); rootTasks.add(TaskFactory.get(new FunctionWork(desc), conf)); } private void analyzeDropFunction(ASTNode ast) throws SemanticException { + // ^(TOK_DROPFUNCTION identifier ifExists? $temp?) String functionName = ast.getChild(0).getText(); boolean ifExists = (ast.getFirstChildWithType(HiveParser.TOK_IFEXISTS) != null); // we want to signal an error if the function doesn't exist and we're // configured not to ignore this boolean throwException = !ifExists && !HiveConf.getBoolVar(conf, ConfVars.DROPIGNORESNONEXISTENT); + + // If function is not fully qualified, do it now + functionName = FunctionUtils.qualifyFunctionName(functionName, + SessionState.get().getCurrentDatabase()); + if (throwException && FunctionRegistry.getFunctionInfo(functionName) == null) { throw new SemanticException(ErrorMsg.INVALID_FUNCTION.getMsg(functionName)); } - DropFunctionDesc desc = new DropFunctionDesc(functionName); + boolean isTemporaryFunction = (ast.getFirstChildWithType(HiveParser.TOK_TEMPORARY) != null); + DropFunctionDesc desc = new DropFunctionDesc(functionName, isTemporaryFunction); rootTasks.add(TaskFactory.get(new FunctionWork(desc), conf)); } } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g index 75ddea5..bbc677f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g +++ ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g @@ -214,6 +214,7 @@ TOK_CREATEFUNCTION; TOK_DROPFUNCTION; TOK_CREATEMACRO; TOK_DROPMACRO; +TOK_TEMPORARY; TOK_CREATEVIEW; TOK_DROPVIEW; TOK_ALTERVIEW_AS; @@ -1470,15 +1471,17 @@ metastoreCheck createFunctionStatement @init { pushMsg("create function statement", state); } @after { popMsg(state); } - : KW_CREATE KW_TEMPORARY KW_FUNCTION functionIdentifier KW_AS StringLiteral - -> ^(TOK_CREATEFUNCTION functionIdentifier StringLiteral) + : KW_CREATE (temp=KW_TEMPORARY)? KW_FUNCTION functionIdentifier KW_AS StringLiteral + -> {$temp != null}? ^(TOK_CREATEFUNCTION functionIdentifier StringLiteral TOK_TEMPORARY) + -> ^(TOK_CREATEFUNCTION functionIdentifier StringLiteral) ; dropFunctionStatement -@init { pushMsg("drop temporary function statement", state); } +@init { pushMsg("drop function statement", state); } @after { popMsg(state); } - : KW_DROP KW_TEMPORARY KW_FUNCTION ifExists? functionIdentifier - -> ^(TOK_DROPFUNCTION functionIdentifier ifExists?) + : KW_DROP (temp=KW_TEMPORARY)? KW_FUNCTION ifExists? functionIdentifier + -> {$temp != null}? ^(TOK_DROPFUNCTION functionIdentifier ifExists? TOK_TEMPORARY) + -> ^(TOK_DROPFUNCTION functionIdentifier ifExists?) ; createMacroStatement diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java index 36f8f71..8a42755 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/MacroSemanticAnalyzer.java @@ -31,6 +31,7 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.ql.ErrorMsg; import org.apache.hadoop.hive.ql.exec.ColumnInfo; @@ -40,10 +41,13 @@ import org.apache.hadoop.hive.ql.lib.Dispatcher; import org.apache.hadoop.hive.ql.lib.Node; import org.apache.hadoop.hive.ql.lib.PreOrderWalker; +import org.apache.hadoop.hive.ql.metadata.Hive; +import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.plan.CreateMacroDesc; import org.apache.hadoop.hive.ql.plan.DropMacroDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; import org.apache.hadoop.hive.ql.plan.FunctionWork; +import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils; @@ -144,6 +148,11 @@ private void analyzeDropMacro(ASTNode ast) throws SemanticException { // configured not to ignore this boolean throwException = !ifExists && !HiveConf.getBoolVar(conf, ConfVars.DROPIGNORESNONEXISTENT); + + // If function is not fully qualified, do it now + functionName = FunctionUtils.qualifyFunctionName(functionName, + SessionState.get().getCurrentDatabase()); + if (throwException && FunctionRegistry.getFunctionInfo(functionName) == null) { throw new SemanticException(ErrorMsg.INVALID_FUNCTION.getMsg(functionName)); } diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/CreateFunctionDesc.java ql/src/java/org/apache/hadoop/hive/ql/plan/CreateFunctionDesc.java index 051095a..0ec570a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/plan/CreateFunctionDesc.java +++ ql/src/java/org/apache/hadoop/hive/ql/plan/CreateFunctionDesc.java @@ -30,6 +30,7 @@ private String functionName; private String className; + private boolean isTemp; /** * For serialization only. @@ -37,8 +38,9 @@ public CreateFunctionDesc() { } - public CreateFunctionDesc(String functionName, String className) { + public CreateFunctionDesc(String functionName, boolean isTemp, String className) { this.functionName = functionName; + this.isTemp = isTemp; this.className = className; } @@ -60,4 +62,12 @@ public void setClassName(String className) { this.className = className; } + public boolean isTemp() { + return isTemp; + } + + public void setTemp(boolean isTemp) { + this.isTemp = isTemp; + } + } diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/DropFunctionDesc.java ql/src/java/org/apache/hadoop/hive/ql/plan/DropFunctionDesc.java index 8a78f5b..e1f93a1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/plan/DropFunctionDesc.java +++ ql/src/java/org/apache/hadoop/hive/ql/plan/DropFunctionDesc.java @@ -29,6 +29,7 @@ private static final long serialVersionUID = 1L; private String functionName; + private boolean isTemp; /** * For serialization only. @@ -36,8 +37,9 @@ public DropFunctionDesc() { } - public DropFunctionDesc(String functionName) { + public DropFunctionDesc(String functionName, boolean isTemp) { this.functionName = functionName; + this.isTemp = isTemp; } @Explain(displayName = "name") @@ -49,4 +51,12 @@ public void setFunctionName(String functionName) { this.functionName = functionName; } + public boolean isTemp() { + return isTemp; + } + + public void setTemp(boolean isTemp) { + this.isTemp = isTemp; + } + } diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java index 0d02f6e..d7d2a34 100644 --- ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java +++ ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java @@ -20,6 +20,7 @@ import java.lang.reflect.Method; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedList; import java.util.List; @@ -27,6 +28,8 @@ import junit.framework.TestCase; import org.apache.hadoop.hive.common.type.HiveVarchar; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde2.io.DateWritable; import org.apache.hadoop.hive.serde2.io.DoubleWritable; import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable; @@ -73,6 +76,7 @@ protected void setUp() { varchar5 = TypeInfoFactory.getPrimitiveTypeInfo("varchar(5)"); char10 = TypeInfoFactory.getPrimitiveTypeInfo("char(10)"); char5 = TypeInfoFactory.getPrimitiveTypeInfo("char(5)"); + SessionState.start(new HiveConf()); } private void implicit(TypeInfo a, TypeInfo b, boolean convertible) { diff --git ql/src/test/queries/clientnegative/create_function_nonexistent_class.q ql/src/test/queries/clientnegative/create_function_nonexistent_class.q new file mode 100644 index 0000000..3b71e00 --- /dev/null +++ ql/src/test/queries/clientnegative/create_function_nonexistent_class.q @@ -0,0 +1 @@ +create function default.badfunc as 'my.nonexistent.class'; diff --git ql/src/test/queries/clientnegative/create_function_nonexistent_db.q ql/src/test/queries/clientnegative/create_function_nonexistent_db.q new file mode 100644 index 0000000..ae95391 --- /dev/null +++ ql/src/test/queries/clientnegative/create_function_nonexistent_db.q @@ -0,0 +1 @@ +create function nonexistentdb.badfunc as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'; diff --git ql/src/test/queries/clientnegative/create_function_nonudf_class.q ql/src/test/queries/clientnegative/create_function_nonudf_class.q new file mode 100644 index 0000000..2083064 --- /dev/null +++ ql/src/test/queries/clientnegative/create_function_nonudf_class.q @@ -0,0 +1 @@ +create function default.badfunc as 'java.lang.String'; diff --git ql/src/test/queries/clientnegative/drop_func_nonexistent.q ql/src/test/queries/clientnegative/drop_func_nonexistent.q new file mode 100644 index 0000000..37e19ef --- /dev/null +++ ql/src/test/queries/clientnegative/drop_func_nonexistent.q @@ -0,0 +1 @@ +drop function nonexistent_function; diff --git ql/src/test/queries/clientpositive/create_func1.q ql/src/test/queries/clientpositive/create_func1.q new file mode 100644 index 0000000..ad924d3 --- /dev/null +++ ql/src/test/queries/clientpositive/create_func1.q @@ -0,0 +1,30 @@ + +-- qtest_get_java_boolean should already be created during test initialization +select qtest_get_java_boolean('true'), qtest_get_java_boolean('false') from src limit 1; + +create database mydb; +create function mydb.func1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'; + +show functions mydb.func1; + +select mydb.func1('abc') from src limit 1; + +drop function mydb.func1; + +-- function should now be gone +show functions mydb.func1; + +-- To test function name resolution +create function mydb.qtest_get_java_boolean as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper'; + +use default; +-- unqualified function should resolve to one in default db +select qtest_get_java_boolean('abc'), default.qtest_get_java_boolean('abc'), mydb.qtest_get_java_boolean('abc') from default.src limit 1; + +use mydb; +-- unqualified function should resolve to one in mydb db +select qtest_get_java_boolean('abc'), default.qtest_get_java_boolean('abc'), mydb.qtest_get_java_boolean('abc') from default.src limit 1; + +drop function mydb.qtest_get_java_boolean; + +drop database mydb cascade; diff --git ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out new file mode 100644 index 0000000..393a3e8 --- /dev/null +++ ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out @@ -0,0 +1,4 @@ +PREHOOK: query: create function default.badfunc as 'my.nonexistent.class' +PREHOOK: type: CREATEFUNCTION +FAILED: Class my.nonexistent.class not found +FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask diff --git ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out new file mode 100644 index 0000000..ebb069e --- /dev/null +++ ql/src/test/results/clientnegative/create_function_nonexistent_db.q.out @@ -0,0 +1,3 @@ +PREHOOK: query: create function nonexistentdb.badfunc as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper' +PREHOOK: type: CREATEFUNCTION +FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask. NoSuchObjectException(message:There is no database named nonexistentdb) diff --git ql/src/test/results/clientnegative/create_function_nonudf_class.q.out ql/src/test/results/clientnegative/create_function_nonudf_class.q.out new file mode 100644 index 0000000..dd66afc --- /dev/null +++ ql/src/test/results/clientnegative/create_function_nonudf_class.q.out @@ -0,0 +1,4 @@ +PREHOOK: query: create function default.badfunc as 'java.lang.String' +PREHOOK: type: CREATEFUNCTION +FAILED: Class java.lang.String does not implement UDF, GenericUDF, or UDAF +FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask diff --git ql/src/test/results/clientnegative/drop_func_nonexistent.q.out ql/src/test/results/clientnegative/drop_func_nonexistent.q.out new file mode 100644 index 0000000..5a25084 --- /dev/null +++ ql/src/test/results/clientnegative/drop_func_nonexistent.q.out @@ -0,0 +1,3 @@ +PREHOOK: query: drop function nonexistent_function +PREHOOK: type: DROPFUNCTION +FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask diff --git ql/src/test/results/clientpositive/create_func1.q.out ql/src/test/results/clientpositive/create_func1.q.out new file mode 100644 index 0000000..5a249c3 --- /dev/null +++ ql/src/test/results/clientpositive/create_func1.q.out @@ -0,0 +1,91 @@ +PREHOOK: query: -- qtest_get_java_boolean should already be created during test initialization +select qtest_get_java_boolean('true'), qtest_get_java_boolean('false') from src limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: -- qtest_get_java_boolean should already be created during test initialization +select qtest_get_java_boolean('true'), qtest_get_java_boolean('false') from src limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +true false +PREHOOK: query: create database mydb +PREHOOK: type: CREATEDATABASE +POSTHOOK: query: create database mydb +POSTHOOK: type: CREATEDATABASE +PREHOOK: query: create function mydb.func1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper' +PREHOOK: type: CREATEFUNCTION +POSTHOOK: query: create function mydb.func1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper' +POSTHOOK: type: CREATEFUNCTION +PREHOOK: query: show functions mydb.func1 +PREHOOK: type: SHOWFUNCTIONS +POSTHOOK: query: show functions mydb.func1 +POSTHOOK: type: SHOWFUNCTIONS +mydb.func1 +PREHOOK: query: select mydb.func1('abc') from src limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select mydb.func1('abc') from src limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +ABC +PREHOOK: query: drop function mydb.func1 +PREHOOK: type: DROPFUNCTION +POSTHOOK: query: drop function mydb.func1 +POSTHOOK: type: DROPFUNCTION +PREHOOK: query: -- function should now be gone +show functions mydb.func1 +PREHOOK: type: SHOWFUNCTIONS +POSTHOOK: query: -- function should now be gone +show functions mydb.func1 +POSTHOOK: type: SHOWFUNCTIONS +PREHOOK: query: -- To test function name resolution +create function mydb.qtest_get_java_boolean as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper' +PREHOOK: type: CREATEFUNCTION +POSTHOOK: query: -- To test function name resolution +create function mydb.qtest_get_java_boolean as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper' +POSTHOOK: type: CREATEFUNCTION +PREHOOK: query: use default +PREHOOK: type: SWITCHDATABASE +POSTHOOK: query: use default +POSTHOOK: type: SWITCHDATABASE +PREHOOK: query: -- unqualified function should resolve to one in default db +select qtest_get_java_boolean('abc'), default.qtest_get_java_boolean('abc'), mydb.qtest_get_java_boolean('abc') from default.src limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: -- unqualified function should resolve to one in default db +select qtest_get_java_boolean('abc'), default.qtest_get_java_boolean('abc'), mydb.qtest_get_java_boolean('abc') from default.src limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +NULL NULL ABC +PREHOOK: query: use mydb +PREHOOK: type: SWITCHDATABASE +POSTHOOK: query: use mydb +POSTHOOK: type: SWITCHDATABASE +PREHOOK: query: -- unqualified function should resolve to one in mydb db +select qtest_get_java_boolean('abc'), default.qtest_get_java_boolean('abc'), mydb.qtest_get_java_boolean('abc') from default.src limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: -- unqualified function should resolve to one in mydb db +select qtest_get_java_boolean('abc'), default.qtest_get_java_boolean('abc'), mydb.qtest_get_java_boolean('abc') from default.src limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +ABC NULL ABC +PREHOOK: query: drop function mydb.qtest_get_java_boolean +PREHOOK: type: DROPFUNCTION +POSTHOOK: query: drop function mydb.qtest_get_java_boolean +POSTHOOK: type: DROPFUNCTION +PREHOOK: query: drop database mydb cascade +PREHOOK: type: DROPDATABASE +PREHOOK: Input: database:mydb +PREHOOK: Output: database:mydb +POSTHOOK: query: drop database mydb cascade +POSTHOOK: type: DROPDATABASE +POSTHOOK: Input: database:mydb +POSTHOOK: Output: database:mydb