diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index 635891f..bc2f61c 100644 --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -68,6 +68,7 @@ private static final Map vars = new HashMap(); + private static final Map metaConfs = new HashMap(); private final List restrictList = new ArrayList(); private boolean isWhiteListRestrictionEnabled = false; @@ -154,6 +155,19 @@ HiveConf.ConfVars.HIVE_TXN_MAX_OPEN_BATCH, }; + /** + * User configurable Metastore vars + */ + public static final HiveConf.ConfVars[] metaConfVars = { + HiveConf.ConfVars.METASTORE_TRY_DIRECT_SQL, + HiveConf.ConfVars.METASTORE_TRY_DIRECT_SQL_DDL + }; + + static { + for (ConfVars confVar : metaConfVars) { + metaConfs.put(confVar.varname, confVar); + } + } /** * dbVars are the parameters can be set per database. If these @@ -2008,6 +2022,10 @@ public static ConfVars getConfVars(String name) { return vars.get(name); } + public static ConfVars getMetaConf(String name) { + return metaConfs.get(name); + } + public String getVar(ConfVars var) { return getVar(this, var); } diff --git common/src/java/org/apache/hadoop/hive/conf/SystemVariables.java common/src/java/org/apache/hadoop/hive/conf/SystemVariables.java index ee98d17..0bbed90 100644 --- common/src/java/org/apache/hadoop/hive/conf/SystemVariables.java +++ common/src/java/org/apache/hadoop/hive/conf/SystemVariables.java @@ -33,6 +33,7 @@ public static final String SYSTEM_PREFIX = "system:"; public static final String HIVECONF_PREFIX = "hiveconf:"; public static final String HIVEVAR_PREFIX = "hivevar:"; + public static final String METACONF_PREFIX = "metaconf:"; public static final String SET_COLUMN_NAME = "set"; protected String getSubstitute(Configuration conf, String var) { diff --git itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java index 9e416b5..1f6748b 100644 --- itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java +++ itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java @@ -35,6 +35,7 @@ import org.apache.hadoop.hive.metastore.events.AddPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterTableEvent; +import org.apache.hadoop.hive.metastore.events.ConfigChangeEvent; import org.apache.hadoop.hive.metastore.events.CreateDatabaseEvent; import org.apache.hadoop.hive.metastore.events.CreateTableEvent; import org.apache.hadoop.hive.metastore.events.DropDatabaseEvent; @@ -53,6 +54,7 @@ import org.apache.hadoop.hive.metastore.events.PreEventContext; import org.apache.hadoop.hive.metastore.events.PreLoadPartitionDoneEvent; import org.apache.hadoop.hive.ql.Driver; +import org.apache.hadoop.hive.ql.processors.SetProcessor; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.shims.ShimLoader; @@ -377,6 +379,12 @@ public void testListener() throws Exception { PreDropDatabaseEvent preDropDB = (PreDropDatabaseEvent)preNotifyList.get(listSize-1); assert dropDB.getStatus(); validateDropDb(db, preDropDB.getDatabase()); + + SetProcessor.setVariable("metaconf:hive.metastore.try.direct.sql", "false"); + ConfigChangeEvent event = (ConfigChangeEvent) notifyList.get(notifyList.size() - 1); + assertEquals("hive.metastore.try.direct.sql", event.getKey()); + assertEquals("true", event.getOldValue()); + assertEquals("false", event.getNewValue()); } } diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index 55f41db..de574e1 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -677,6 +677,7 @@ exception NoSuchLockException { */ service ThriftHiveMetastore extends fb303.FacebookService { + void configure(1:string key, 2:string value) throws(1:MetaException o1) void create_database(1:Database database) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3) Database get_database(1:string name) throws(1:NoSuchObjectException o1, 2:MetaException o2) void drop_database(1:string name, 2:bool deleteData, 3:bool cascade) throws(1:NoSuchObjectException o1, 2:InvalidOperationException o2, 3:MetaException o3) diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp index 53165d0..ade4731 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -8,6 +8,184 @@ namespace Apache { namespace Hadoop { namespace Hive { +uint32_t ThriftHiveMetastore_configure_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->key); + this->__isset.key = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_configure_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_configure_args"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->key); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->value); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_configure_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_configure_pargs"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->key))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->value))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_configure_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_configure_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_configure_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_configure_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; +} + uint32_t ThriftHiveMetastore_create_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; @@ -25262,6 +25440,63 @@ uint32_t ThriftHiveMetastore_show_compact_presult::read(::apache::thrift::protoc return xfer; } +void ThriftHiveMetastoreClient::configure(const std::string& key, const std::string& value) +{ + send_configure(key, value); + recv_configure(); +} + +void ThriftHiveMetastoreClient::send_configure(const std::string& key, const std::string& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("configure", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_configure_pargs args; + args.key = &key; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_configure() +{ + + 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("configure") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_configure_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + return; +} + void ThriftHiveMetastoreClient::create_database(const Database& database) { send_create_database(database); @@ -32269,6 +32504,62 @@ bool ThriftHiveMetastoreProcessor::dispatchCall(::apache::thrift::protocol::TPro return true; } +void ThriftHiveMetastoreProcessor::process_configure(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.configure", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.configure"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.configure"); + } + + ThriftHiveMetastore_configure_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.configure", bytes); + } + + ThriftHiveMetastore_configure_result result; + try { + iface_->configure(args.key, args.value); + } 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.configure"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("configure", ::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.configure"); + } + + oprot->writeMessageBegin("configure", ::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.configure", bytes); + } +} + void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index 3b778ee..b27ee2b 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -16,6 +16,7 @@ namespace Apache { namespace Hadoop { namespace Hive { class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookServiceIf { public: virtual ~ThriftHiveMetastoreIf() {} + virtual void configure(const std::string& key, const std::string& value) = 0; virtual void create_database(const Database& database) = 0; virtual void get_database(Database& _return, const std::string& name) = 0; virtual void drop_database(const std::string& name, const bool deleteData, const bool cascade) = 0; @@ -154,6 +155,9 @@ class ThriftHiveMetastoreIfSingletonFactory : virtual public ThriftHiveMetastore class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public ::facebook::fb303::FacebookServiceNull { public: virtual ~ThriftHiveMetastoreNull() {} + void configure(const std::string& /* key */, const std::string& /* value */) { + return; + } void create_database(const Database& /* database */) { return; } @@ -504,6 +508,123 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p } }; +typedef struct _ThriftHiveMetastore_configure_args__isset { + _ThriftHiveMetastore_configure_args__isset() : key(false), value(false) {} + bool key; + bool value; +} _ThriftHiveMetastore_configure_args__isset; + +class ThriftHiveMetastore_configure_args { + public: + + ThriftHiveMetastore_configure_args() : key(), value() { + } + + virtual ~ThriftHiveMetastore_configure_args() throw() {} + + std::string key; + std::string value; + + _ThriftHiveMetastore_configure_args__isset __isset; + + void __set_key(const std::string& val) { + key = val; + } + + void __set_value(const std::string& val) { + value = val; + } + + bool operator == (const ThriftHiveMetastore_configure_args & rhs) const + { + if (!(key == rhs.key)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_configure_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_configure_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_configure_pargs { + public: + + + virtual ~ThriftHiveMetastore_configure_pargs() throw() {} + + const std::string* key; + const std::string* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_configure_result__isset { + _ThriftHiveMetastore_configure_result__isset() : o1(false) {} + bool o1; +} _ThriftHiveMetastore_configure_result__isset; + +class ThriftHiveMetastore_configure_result { + public: + + ThriftHiveMetastore_configure_result() { + } + + virtual ~ThriftHiveMetastore_configure_result() throw() {} + + MetaException o1; + + _ThriftHiveMetastore_configure_result__isset __isset; + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_configure_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_configure_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_configure_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_configure_presult__isset { + _ThriftHiveMetastore_configure_presult__isset() : o1(false) {} + bool o1; +} _ThriftHiveMetastore_configure_presult__isset; + +class ThriftHiveMetastore_configure_presult { + public: + + + virtual ~ThriftHiveMetastore_configure_presult() throw() {} + + MetaException o1; + + _ThriftHiveMetastore_configure_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_create_database_args__isset { _ThriftHiveMetastore_create_database_args__isset() : database(false) {} bool database; @@ -15450,6 +15571,9 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } + void configure(const std::string& key, const std::string& value); + void send_configure(const std::string& key, const std::string& value); + void recv_configure(); void create_database(const Database& database); void send_create_database(const Database& database); void recv_create_database(); @@ -15787,6 +15911,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP typedef void (ThriftHiveMetastoreProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); typedef std::map ProcessMap; ProcessMap processMap_; + void process_configure(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -15900,6 +16025,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP ThriftHiveMetastoreProcessor(boost::shared_ptr iface) : ::facebook::fb303::FacebookServiceProcessor(iface), iface_(iface) { + processMap_["configure"] = &ThriftHiveMetastoreProcessor::process_configure; processMap_["create_database"] = &ThriftHiveMetastoreProcessor::process_create_database; processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database; processMap_["drop_database"] = &ThriftHiveMetastoreProcessor::process_drop_database; @@ -16042,6 +16168,15 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi ifaces_.push_back(iface); } public: + void configure(const std::string& key, const std::string& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->configure(key, value); + } + ifaces_[i]->configure(key, value); + } + void create_database(const Database& database) { 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 957b976..d74f6fa 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -22,6 +22,11 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { // Your initialization goes here } + void configure(const std::string& key, const std::string& value) { + // Your implementation goes here + printf("configure\n"); + } + void create_database(const Database& database) { // Your implementation goes here printf("create_database\n"); 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 4547970..791c46b 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(_list338.size); for (int _i339 = 0; _i339 < _list338.size; ++_i339) { - Partition _elem340; // optional + Partition _elem340; // required _elem340 = new Partition(); _elem340.read(iprot); struct.parts.add(_elem340); @@ -824,7 +824,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsRequest struct.parts = new ArrayList(_list343.size); for (int _i344 = 0; _i344 < _list343.size; ++_i344) { - Partition _elem345; // optional + Partition _elem345; // required _elem345 = new Partition(); _elem345.read(iprot); struct.parts.add(_elem345); 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 68a4219..2471690 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(_list330.size); for (int _i331 = 0; _i331 < _list330.size; ++_i331) { - Partition _elem332; // optional + Partition _elem332; // required _elem332 = new Partition(); _elem332.read(iprot); struct.partitions.add(_elem332); @@ -428,7 +428,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsResult struct.partitions = new ArrayList(_list335.size); for (int _i336 = 0; _i336 < _list335.size; ++_i336) { - Partition _elem337; // optional + Partition _elem337; // required _elem337 = new Partition(); _elem337.read(iprot); struct.partitions.add(_elem337); 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 6aecf26..aa647d4 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(_list236.size); for (int _i237 = 0; _i237 < _list236.size; ++_i237) { - ColumnStatisticsObj _elem238; // optional + ColumnStatisticsObj _elem238; // required _elem238 = new ColumnStatisticsObj(); _elem238.read(iprot); struct.statsObj.add(_elem238); @@ -531,7 +531,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics str struct.statsObj = new ArrayList(_list241.size); for (int _i242 = 0; _i242 < _list241.size; ++_i242) { - ColumnStatisticsObj _elem243; // optional + ColumnStatisticsObj _elem243; // required _elem243 = new ColumnStatisticsObj(); _elem243.read(iprot); struct.statsObj.add(_elem243); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java index a4ae892..b8d5a56 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java @@ -346,7 +346,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, DropPartitionsResul struct.partitions = new ArrayList(_list346.size); for (int _i347 = 0; _i347 < _list346.size; ++_i347) { - Partition _elem348; // optional + Partition _elem348; // required _elem348 = new Partition(); _elem348.read(iprot); struct.partitions.add(_elem348); @@ -428,7 +428,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, DropPartitionsResult struct.partitions = new ArrayList(_list351.size); for (int _i352 = 0; _i352 < _list351.size; ++_i352) { - Partition _elem353; // optional + Partition _elem353; // required _elem353 = new Partition(); _elem353.read(iprot); struct.partitions.add(_elem353); 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 index 781281a..4a24bbf 100644 --- 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 @@ -997,7 +997,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Function struct) th struct.resourceUris = new ArrayList(_list370.size); for (int _i371 = 0; _i371 < _list370.size; ++_i371) { - ResourceUri _elem372; // optional + ResourceUri _elem372; // required _elem372 = new ResourceUri(); _elem372.read(iprot); struct.resourceUris.add(_elem372); @@ -1180,7 +1180,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) thr struct.resourceUris = new ArrayList(_list375.size); for (int _i376 = 0; _i376 < _list375.size; ++_i376) { - ResourceUri _elem377; // optional + ResourceUri _elem377; // required _elem377 = new ResourceUri(); _elem377.read(iprot); struct.resourceUris.add(_elem377); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java index b782d32..427204e 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java @@ -447,7 +447,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsInfoResp struct.open_txns = new ArrayList(_list378.size); for (int _i379 = 0; _i379 < _list378.size; ++_i379) { - TxnInfo _elem380; // optional + TxnInfo _elem380; // required _elem380 = new TxnInfo(); _elem380.read(iprot); struct.open_txns.add(_elem380); @@ -524,7 +524,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsInfoRespo struct.open_txns = new ArrayList(_list383.size); for (int _i384 = 0; _i384 < _list383.size; ++_i384) { - TxnInfo _elem385; // optional + TxnInfo _elem385; // required _elem385 = new TxnInfo(); _elem385.read(iprot); struct.open_txns.add(_elem385); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java index d549ce9..eda18ad 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java @@ -447,7 +447,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsResponse struct.open_txns = new HashSet(2*_set386.size); for (int _i387 = 0; _i387 < _set386.size; ++_i387) { - long _elem388; // optional + long _elem388; // required _elem388 = iprot.readI64(); struct.open_txns.add(_elem388); } @@ -523,7 +523,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct.open_txns = new HashSet(2*_set391.size); for (int _i392 = 0; _i392 < _set391.size; ++_i392) { - long _elem393; // optional + long _elem393; // required _elem393 = iprot.readI64(); struct.open_txns.add(_elem393); } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java index 3ef6224..083699b 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java @@ -354,7 +354,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRole struct.principalGrants = new ArrayList(_list86.size); for (int _i87 = 0; _i87 < _list86.size; ++_i87) { - RolePrincipalGrant _elem88; // optional + RolePrincipalGrant _elem88; // required _elem88 = new RolePrincipalGrant(); _elem88.read(iprot); struct.principalGrants.add(_elem88); @@ -425,7 +425,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleR struct.principalGrants = new ArrayList(_list91.size); for (int _i92 = 0; _i92 < _list91.size; ++_i92) { - RolePrincipalGrant _elem93; // optional + RolePrincipalGrant _elem93; // required _elem93 = new RolePrincipalGrant(); _elem93.read(iprot); struct.principalGrants.add(_elem93); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java index 3ddc1ac..f745c08 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java @@ -354,7 +354,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPri struct.principalGrants = new ArrayList(_list78.size); for (int _i79 = 0; _i79 < _list78.size; ++_i79) { - RolePrincipalGrant _elem80; // optional + RolePrincipalGrant _elem80; // required _elem80 = new RolePrincipalGrant(); _elem80.read(iprot); struct.principalGrants.add(_elem80); @@ -425,7 +425,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrin struct.principalGrants = new ArrayList(_list83.size); for (int _i84 = 0; _i84 < _list83.size; ++_i84) { - RolePrincipalGrant _elem85; // optional + RolePrincipalGrant _elem85; // required _elem85 = new RolePrincipalGrant(); _elem85.read(iprot); struct.principalGrants.add(_elem85); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java index f3e3c07..0fc4310 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java @@ -459,7 +459,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatTxnRangeRe struct.aborted = new HashSet(2*_set418.size); for (int _i419 = 0; _i419 < _set418.size; ++_i419) { - long _elem420; // optional + long _elem420; // required _elem420 = iprot.readI64(); struct.aborted.add(_elem420); } @@ -477,7 +477,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatTxnRangeRe struct.nosuch = new HashSet(2*_set421.size); for (int _i422 = 0; _i422 < _set421.size; ++_i422) { - long _elem423; // optional + long _elem423; // required _elem423 = iprot.readI64(); struct.nosuch.add(_elem423); } @@ -566,7 +566,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeRes struct.aborted = new HashSet(2*_set428.size); for (int _i429 = 0; _i429 < _set428.size; ++_i429) { - long _elem430; // optional + long _elem430; // required _elem430 = iprot.readI64(); struct.aborted.add(_elem430); } @@ -577,7 +577,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeRes struct.nosuch = new HashSet(2*_set431.size); for (int _i432 = 0; _i432 < _set431.size; ++_i432) { - long _elem433; // optional + long _elem433; // required _elem433 = iprot.readI64(); struct.nosuch.add(_elem433); } 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 b22b211..997060f 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; // optional + String _elem10; // required _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; // optional + String _elem15; // required _elem15 = iprot.readString(); struct.partValues.add(_elem15); } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java index cdf6f30..c35aadd 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java @@ -605,7 +605,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, LockRequest struct) struct.component = new ArrayList(_list402.size); for (int _i403 = 0; _i403 < _list402.size; ++_i403) { - LockComponent _elem404; // optional + LockComponent _elem404; // required _elem404 = new LockComponent(); _elem404.read(iprot); struct.component.add(_elem404); @@ -725,7 +725,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) struct.component = new ArrayList(_list407.size); for (int _i408 = 0; _i408 < _list407.size; ++_i408) { - LockComponent _elem409; // optional + LockComponent _elem409; // required _elem409 = new LockComponent(); _elem409.read(iprot); struct.component.add(_elem409); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java index 54955c6..3d47286 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java @@ -354,7 +354,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenTxnsResponse st struct.txn_ids = new ArrayList(_list394.size); for (int _i395 = 0; _i395 < _list394.size; ++_i395) { - long _elem396; // optional + long _elem396; // required _elem396 = iprot.readI64(); struct.txn_ids.add(_elem396); } @@ -424,7 +424,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenTxnsResponse str struct.txn_ids = new ArrayList(_list399.size); for (int _i400 = 0; _i400 < _list399.size; ++_i400) { - long _elem401; // optional + long _elem401; // required _elem401 = iprot.readI64(); struct.txn_ids.add(_elem401); } 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 7d29d09..312807e 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(_list208.size); for (int _i209 = 0; _i209 < _list208.size; ++_i209) { - String _elem210; // optional + String _elem210; // required _elem210 = iprot.readString(); struct.values.add(_elem210); } @@ -1184,7 +1184,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Partition struct) th struct.values = new ArrayList(_list219.size); for (int _i220 = 0; _i220 < _list219.size; ++_i220) { - String _elem221; // optional + String _elem221; // required _elem221 = iprot.readString(); struct.values.add(_elem221); } 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 5ea5a1b..ea8f0bb 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(_list272.size); for (int _i273 = 0; _i273 < _list272.size; ++_i273) { - Partition _elem274; // optional + Partition _elem274; // required _elem274 = new Partition(); _elem274.read(iprot); struct.partitions.add(_elem274); @@ -522,7 +522,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprResu struct.partitions = new ArrayList(_list277.size); for (int _i278 = 0; _i278 < _list277.size; ++_i278) { - Partition _elem279; // optional + Partition _elem279; // required _elem279 = new Partition(); _elem279.read(iprot); struct.partitions.add(_elem279); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java index 80a151a..a46bdc8 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java @@ -645,7 +645,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsStatsRequ struct.colNames = new ArrayList(_list314.size); for (int _i315 = 0; _i315 < _list314.size; ++_i315) { - String _elem316; // optional + String _elem316; // required _elem316 = iprot.readString(); struct.colNames.add(_elem316); } @@ -663,7 +663,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsStatsRequ struct.partNames = new ArrayList(_list317.size); for (int _i318 = 0; _i318 < _list317.size; ++_i318) { - String _elem319; // optional + String _elem319; // required _elem319 = iprot.readString(); struct.partNames.add(_elem319); } @@ -768,7 +768,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsReque struct.colNames = new ArrayList(_list324.size); for (int _i325 = 0; _i325 < _list324.size; ++_i325) { - String _elem326; // optional + String _elem326; // required _elem326 = iprot.readString(); struct.colNames.add(_elem326); } @@ -779,7 +779,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsReque struct.partNames = new ArrayList(_list327.size); for (int _i328 = 0; _i328 < _list327.size; ++_i328) { - String _elem329; // optional + String _elem329; // required _elem329 = iprot.readString(); struct.partNames.add(_elem329); } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java index 537db47..27f654d 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java @@ -371,7 +371,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsStatsResu _val291 = new ArrayList(_list292.size); for (int _i293 = 0; _i293 < _list292.size; ++_i293) { - ColumnStatisticsObj _elem294; // optional + ColumnStatisticsObj _elem294; // required _elem294 = new ColumnStatisticsObj(); _elem294.read(iprot); _val291.add(_elem294); @@ -469,7 +469,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsResul _val302 = new ArrayList(_list303.size); for (int _i304 = 0; _i304 < _list303.size; ++_i304) { - ColumnStatisticsObj _elem305; // optional + ColumnStatisticsObj _elem305; // required _elem305 = new ColumnStatisticsObj(); _elem305.read(iprot); _val302.add(_elem305); 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 0c9518a..eea86e5 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; // optional + PrivilegeGrantInfo _elem30; // required _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; // optional + PrivilegeGrantInfo _elem37; // required _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; // optional + PrivilegeGrantInfo _elem44; // required _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; // optional + PrivilegeGrantInfo _elem63; // required _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; // optional + PrivilegeGrantInfo _elem70; // required _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; // optional + PrivilegeGrantInfo _elem77; // required _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 4285ed8..a4687ad 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; // optional + HiveObjectPrivilege _elem18; // required _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; // optional + HiveObjectPrivilege _elem23; // required _elem23 = new HiveObjectPrivilege(); _elem23.read(iprot); struct.privileges.add(_elem23); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java index 2fcb216..5119b83 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java @@ -169,7 +169,7 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip names = new ArrayList(_list354.size); for (int _i355 = 0; _i355 < _list354.size; ++_i355) { - String _elem356; // optional + String _elem356; // required _elem356 = iprot.readString(); names.add(_elem356); } @@ -188,7 +188,7 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip exprs = new ArrayList(_list357.size); for (int _i358 = 0; _i358 < _list357.size; ++_i358) { - DropPartitionsExpr _elem359; // optional + DropPartitionsExpr _elem359; // required _elem359 = new DropPartitionsExpr(); _elem359.read(iprot); exprs.add(_elem359); @@ -250,7 +250,7 @@ protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot names = new ArrayList(_list362.size); for (int _i363 = 0; _i363 < _list362.size; ++_i363) { - String _elem364; // optional + String _elem364; // required _elem364 = iprot.readString(); names.add(_elem364); } @@ -264,7 +264,7 @@ protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot exprs = new ArrayList(_list365.size); for (int _i366 = 0; _i366 < _list365.size; ++_i366) { - DropPartitionsExpr _elem367; // optional + DropPartitionsExpr _elem367; // required _elem367 = new DropPartitionsExpr(); _elem367.read(iprot); exprs.add(_elem367); 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 58e9028..d91ca2d 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(_list244.size); for (int _i245 = 0; _i245 < _list244.size; ++_i245) { - FieldSchema _elem246; // optional + FieldSchema _elem246; // required _elem246 = new FieldSchema(); _elem246.read(iprot); struct.fieldSchemas.add(_elem246); @@ -582,7 +582,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Schema struct) throw struct.fieldSchemas = new ArrayList(_list255.size); for (int _i256 = 0; _i256 < _list255.size; ++_i256) { - FieldSchema _elem257; // optional + FieldSchema _elem257; // required _elem257 = new FieldSchema(); _elem257.read(iprot); struct.fieldSchemas.add(_elem257); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java index b962e27..a9f9f7c 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java @@ -354,7 +354,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactResponse struct.compacts = new ArrayList(_list434.size); for (int _i435 = 0; _i435 < _list434.size; ++_i435) { - ShowCompactResponseElement _elem436; // optional + ShowCompactResponseElement _elem436; // required _elem436 = new ShowCompactResponseElement(); _elem436.read(iprot); struct.compacts.add(_elem436); @@ -425,7 +425,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse struct.compacts = new ArrayList(_list439.size); for (int _i440 = 0; _i440 < _list439.size; ++_i440) { - ShowCompactResponseElement _elem441; // optional + ShowCompactResponseElement _elem441; // required _elem441 = new ShowCompactResponseElement(); _elem441.read(iprot); struct.compacts.add(_elem441); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java index 1399f8b..d2657e0 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java @@ -350,7 +350,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksResponse s struct.locks = new ArrayList(_list410.size); for (int _i411 = 0; _i411 < _list410.size; ++_i411) { - ShowLocksResponseElement _elem412; // optional + ShowLocksResponseElement _elem412; // required _elem412 = new ShowLocksResponseElement(); _elem412.read(iprot); struct.locks.add(_elem412); @@ -430,7 +430,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponse st struct.locks = new ArrayList(_list415.size); for (int _i416 = 0; _i416 < _list415.size; ++_i416) { - ShowLocksResponseElement _elem417; // optional + ShowLocksResponseElement _elem417; // required _elem417 = new ShowLocksResponseElement(); _elem417.read(iprot); struct.locks.add(_elem417); 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 ab5c0ed..83438c7 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(_list114.size); for (int _i115 = 0; _i115 < _list114.size; ++_i115) { - String _elem116; // optional + String _elem116; // required _elem116 = iprot.readString(); struct.skewedColNames.add(_elem116); } @@ -584,13 +584,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) struct.skewedColValues = new ArrayList>(_list117.size); for (int _i118 = 0; _i118 < _list117.size; ++_i118) { - List _elem119; // optional + List _elem119; // required { org.apache.thrift.protocol.TList _list120 = iprot.readListBegin(); _elem119 = new ArrayList(_list120.size); for (int _i121 = 0; _i121 < _list120.size; ++_i121) { - String _elem122; // optional + String _elem122; // required _elem122 = iprot.readString(); _elem119.add(_elem122); } @@ -619,7 +619,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) _key125 = new ArrayList(_list127.size); for (int _i128 = 0; _i128 < _list127.size; ++_i128) { - String _elem129; // optional + String _elem129; // required _elem129 = iprot.readString(); _key125.add(_elem129); } @@ -779,7 +779,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) t struct.skewedColNames = new ArrayList(_list140.size); for (int _i141 = 0; _i141 < _list140.size; ++_i141) { - String _elem142; // optional + String _elem142; // required _elem142 = iprot.readString(); struct.skewedColNames.add(_elem142); } @@ -792,13 +792,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) t struct.skewedColValues = new ArrayList>(_list143.size); for (int _i144 = 0; _i144 < _list143.size; ++_i144) { - List _elem145; // optional + List _elem145; // required { org.apache.thrift.protocol.TList _list146 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); _elem145 = new ArrayList(_list146.size); for (int _i147 = 0; _i147 < _list146.size; ++_i147) { - String _elem148; // optional + String _elem148; // required _elem148 = iprot.readString(); _elem145.add(_elem148); } @@ -821,7 +821,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) t _key151 = new ArrayList(_list153.size); for (int _i154 = 0; _i154 < _list153.size; ++_i154) { - String _elem155; // optional + String _elem155; // required _elem155 = iprot.readString(); _key151.add(_elem155); } 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 813b4f0..d0b9843 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(_list156.size); for (int _i157 = 0; _i157 < _list156.size; ++_i157) { - FieldSchema _elem158; // optional + FieldSchema _elem158; // required _elem158 = new FieldSchema(); _elem158.read(iprot); struct.cols.add(_elem158); @@ -1372,7 +1372,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, StorageDescriptor s struct.bucketCols = new ArrayList(_list159.size); for (int _i160 = 0; _i160 < _list159.size; ++_i160) { - String _elem161; // optional + String _elem161; // required _elem161 = iprot.readString(); struct.bucketCols.add(_elem161); } @@ -1390,7 +1390,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, StorageDescriptor s struct.sortCols = new ArrayList(_list162.size); for (int _i163 = 0; _i163 < _list162.size; ++_i163) { - Order _elem164; // optional + Order _elem164; // required _elem164 = new Order(); _elem164.read(iprot); struct.sortCols.add(_elem164); @@ -1667,7 +1667,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor st struct.cols = new ArrayList(_list177.size); for (int _i178 = 0; _i178 < _list177.size; ++_i178) { - FieldSchema _elem179; // optional + FieldSchema _elem179; // required _elem179 = new FieldSchema(); _elem179.read(iprot); struct.cols.add(_elem179); @@ -1706,7 +1706,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor st struct.bucketCols = new ArrayList(_list180.size); for (int _i181 = 0; _i181 < _list180.size; ++_i181) { - String _elem182; // optional + String _elem182; // required _elem182 = iprot.readString(); struct.bucketCols.add(_elem182); } @@ -1719,7 +1719,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor st struct.sortCols = new ArrayList(_list183.size); for (int _i184 = 0; _i184 < _list183.size; ++_i184) { - Order _elem185; // optional + Order _elem185; // required _elem185 = new Order(); _elem185.read(iprot); struct.sortCols.add(_elem185); 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 484bd6a..229a819 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 @@ -1481,7 +1481,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw struct.partitionKeys = new ArrayList(_list190.size); for (int _i191 = 0; _i191 < _list190.size; ++_i191) { - FieldSchema _elem192; // optional + FieldSchema _elem192; // required _elem192 = new FieldSchema(); _elem192.read(iprot); struct.partitionKeys.add(_elem192); @@ -1805,7 +1805,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws struct.partitionKeys = new ArrayList(_list201.size); for (int _i202 = 0; _i202 < _list201.size; ++_i202) { - FieldSchema _elem203; // optional + FieldSchema _elem203; // required _elem203 = new FieldSchema(); _elem203.read(iprot); struct.partitionKeys.add(_elem203); diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java index ddfcccc..48d16b7 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java @@ -540,7 +540,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TableStatsRequest s struct.colNames = new ArrayList(_list306.size); for (int _i307 = 0; _i307 < _list306.size; ++_i307) { - String _elem308; // optional + String _elem308; // required _elem308 = iprot.readString(); struct.colNames.add(_elem308); } @@ -626,7 +626,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsRequest st struct.colNames = new ArrayList(_list311.size); for (int _i312 = 0; _i312 < _list311.size; ++_i312) { - String _elem313; // optional + String _elem313; // required _elem313 = iprot.readString(); struct.colNames.add(_elem313); } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java index e37b75c..b25c6c2 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java @@ -354,7 +354,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TableStatsResult st struct.tableStats = new ArrayList(_list280.size); for (int _i281 = 0; _i281 < _list280.size; ++_i281) { - ColumnStatisticsObj _elem282; // optional + ColumnStatisticsObj _elem282; // required _elem282 = new ColumnStatisticsObj(); _elem282.read(iprot); struct.tableStats.add(_elem282); @@ -425,7 +425,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsResult str struct.tableStats = new ArrayList(_list285.size); for (int _i286 = 0; _i286 < _list285.size; ++_i286) { - ColumnStatisticsObj _elem287; // optional + ColumnStatisticsObj _elem287; // required _elem287 = new ColumnStatisticsObj(); _elem287.read(iprot); struct.tableStats.add(_elem287); 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 1e0cdea..110f207 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 @@ -38,6 +38,8 @@ */ public interface Iface extends com.facebook.fb303.FacebookService.Iface { + public void configure(String key, String value) throws MetaException, org.apache.thrift.TException; + public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException; public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; @@ -260,6 +262,8 @@ public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface { + public void configure(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -500,6 +504,30 @@ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.prot super(iprot, oprot); } + public void configure(String key, String value) throws MetaException, org.apache.thrift.TException + { + send_configure(key, value); + recv_configure(); + } + + public void send_configure(String key, String value) throws org.apache.thrift.TException + { + configure_args args = new configure_args(); + args.setKey(key); + args.setValue(value); + sendBase("configure", args); + } + + public void recv_configure() throws MetaException, org.apache.thrift.TException + { + configure_result result = new configure_result(); + receiveBase(result, "configure"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException { send_create_database(database); @@ -3748,6 +3776,41 @@ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, super(protocolFactory, clientManager, transport); } + public void configure(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + configure_call method_call = new configure_call(key, value, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class configure_call extends org.apache.thrift.async.TAsyncMethodCall { + private String key; + private String value; + public configure_call(String key, String value, 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.key = key; + this.value = value; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configure", org.apache.thrift.protocol.TMessageType.CALL, 0)); + configure_args args = new configure_args(); + args.setKey(key); + args.setValue(value); + args.write(prot); + prot.writeMessageEnd(); + } + + public void 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); + (new Client(prot)).recv_configure(); + } + } + public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_database_call method_call = new create_database_call(database, resultHandler, this, ___protocolFactory, ___transport); @@ -7663,6 +7726,7 @@ protected Processor(I iface, Map Map> getProcessMap(Map> processMap) { + processMap.put("configure", new configure()); processMap.put("create_database", new create_database()); processMap.put("get_database", new get_database()); processMap.put("drop_database", new drop_database()); @@ -7775,6 +7839,30 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { + public configure() { + super("configure"); + } + + public configure_args getEmptyArgsInstance() { + return new configure_args(); + } + + protected boolean isOneway() { + return false; + } + + public configure_result getResult(I iface, configure_args args) throws org.apache.thrift.TException { + configure_result result = new configure_result(); + try { + iface.configure(args.key, args.value); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + public static class create_database extends org.apache.thrift.ProcessFunction { public create_database() { super("create_database"); @@ -10620,6 +10708,828 @@ public show_compact_result getResult(I iface, show_compact_args args) throws org } + public static class configure_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("configure_args"); + + private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new configure_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new configure_argsTupleSchemeFactory()); + } + + private String key; // required + private String value; // 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 { + KEY((short)1, "key"), + VALUE((short)2, "value"); + + 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: // KEY + return KEY; + case 2: // VALUE + return VALUE; + 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", 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(configure_args.class, metaDataMap); + } + + public configure_args() { + } + + public configure_args( + String key, + String value) + { + this(); + this.key = key; + this.value = value; + } + + /** + * Performs a deep copy on other. + */ + public configure_args(configure_args other) { + if (other.isSetKey()) { + this.key = other.key; + } + if (other.isSetValue()) { + this.value = other.value; + } + } + + public configure_args deepCopy() { + return new configure_args(this); + } + + @Override + public void clear() { + this.key = null; + this.value = null; + } + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public void unsetKey() { + this.key = null; + } + + /** Returns true if field key is set (has been assigned a value) and false otherwise */ + public boolean isSetKey() { + return this.key != null; + } + + public void setKeyIsSet(boolean value) { + if (!value) { + this.key = null; + } + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + public void unsetValue() { + this.value = null; + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case KEY: + if (value == null) { + unsetKey(); + } else { + setKey((String)value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case KEY: + return getKey(); + + case VALUE: + return getValue(); + + } + 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 KEY: + return isSetKey(); + case VALUE: + return isSetValue(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof configure_args) + return this.equals((configure_args)that); + return false; + } + + public boolean equals(configure_args that) { + if (that == null) + return false; + + boolean this_present_key = true && this.isSetKey(); + boolean that_present_key = true && that.isSetKey(); + if (this_present_key || that_present_key) { + if (!(this_present_key && that_present_key)) + return false; + if (!this.key.equals(that.key)) + return false; + } + + boolean this_present_value = true && this.isSetValue(); + boolean that_present_value = true && that.isSetValue(); + if (this_present_value || that_present_value) { + if (!(this_present_value && that_present_value)) + return false; + if (!this.value.equals(that.value)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_key = true && (isSetKey()); + builder.append(present_key); + if (present_key) + builder.append(key); + + boolean present_value = true && (isSetValue()); + builder.append(present_value); + if (present_value) + builder.append(value); + + return builder.toHashCode(); + } + + public int compareTo(configure_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + configure_args typedOther = (configure_args)other; + + lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + 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("configure_args("); + boolean first = true; + + sb.append("key:"); + if (this.key == null) { + sb.append("null"); + } else { + sb.append(this.key); + } + first = false; + if (!first) sb.append(", "); + sb.append("value:"); + if (this.value == null) { + sb.append("null"); + } else { + sb.append(this.value); + } + 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 configure_argsStandardSchemeFactory implements SchemeFactory { + public configure_argsStandardScheme getScheme() { + return new configure_argsStandardScheme(); + } + } + + private static class configure_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, configure_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: // KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.key = iprot.readString(); + struct.setKeyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.value = iprot.readString(); + struct.setValueIsSet(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, configure_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.key != null) { + oprot.writeFieldBegin(KEY_FIELD_DESC); + oprot.writeString(struct.key); + oprot.writeFieldEnd(); + } + if (struct.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeString(struct.value); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class configure_argsTupleSchemeFactory implements SchemeFactory { + public configure_argsTupleScheme getScheme() { + return new configure_argsTupleScheme(); + } + } + + private static class configure_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, configure_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetKey()) { + optionals.set(0); + } + if (struct.isSetValue()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetKey()) { + oprot.writeString(struct.key); + } + if (struct.isSetValue()) { + oprot.writeString(struct.value); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, configure_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.key = iprot.readString(); + struct.setKeyIsSet(true); + } + if (incoming.get(1)) { + struct.value = iprot.readString(); + struct.setValueIsSet(true); + } + } + } + + } + + public static class configure_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("configure_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new configure_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new configure_resultTupleSchemeFactory()); + } + + 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 { + 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 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.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(configure_result.class, metaDataMap); + } + + public configure_result() { + } + + public configure_result( + MetaException o1) + { + this(); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public configure_result(configure_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public configure_result deepCopy() { + return new configure_result(this); + } + + @Override + public void clear() { + this.o1 = 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 O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + 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 O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof configure_result) + return this.equals((configure_result)that); + return false; + } + + public boolean equals(configure_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; + } + + 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); + + return builder.toHashCode(); + } + + public int compareTo(configure_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + configure_result typedOther = (configure_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; + } + } + 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("configure_result("); + boolean first = true; + + 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 configure_resultStandardSchemeFactory implements SchemeFactory { + public configure_resultStandardScheme getScheme() { + return new configure_resultStandardScheme(); + } + } + + private static class configure_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, configure_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, configure_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class configure_resultTupleSchemeFactory implements SchemeFactory { + public configure_resultTupleScheme getScheme() { + return new configure_resultTupleScheme(); + } + } + + private static class configure_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, configure_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, configure_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + public static class create_database_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_database_args"); @@ -14376,7 +15286,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_resul struct.success = new ArrayList(_list442.size); for (int _i443 = 0; _i443 < _list442.size; ++_i443) { - String _elem444; // optional + String _elem444; // required _elem444 = iprot.readString(); struct.success.add(_elem444); } @@ -14475,7 +15385,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct.success = new ArrayList(_list447.size); for (int _i448 = 0; _i448 < _list447.size; ++_i448) { - String _elem449; // optional + String _elem449; // required _elem449 = iprot.readString(); struct.success.add(_elem449); } @@ -15138,7 +16048,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_r struct.success = new ArrayList(_list450.size); for (int _i451 = 0; _i451 < _list450.size; ++_i451) { - String _elem452; // optional + String _elem452; // required _elem452 = iprot.readString(); struct.success.add(_elem452); } @@ -15237,7 +16147,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_re struct.success = new ArrayList(_list455.size); for (int _i456 = 0; _i456 < _list455.size; ++_i456) { - String _elem457; // optional + String _elem457; // required _elem457 = iprot.readString(); struct.success.add(_elem457); } @@ -20998,7 +21908,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_result s struct.success = new ArrayList(_list468.size); for (int _i469 = 0; _i469 < _list468.size; ++_i469) { - FieldSchema _elem470; // optional + FieldSchema _elem470; // required _elem470 = new FieldSchema(); _elem470.read(iprot); struct.success.add(_elem470); @@ -21138,7 +22048,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_result st struct.success = new ArrayList(_list473.size); for (int _i474 = 0; _i474 < _list473.size; ++_i474) { - FieldSchema _elem475; // optional + FieldSchema _elem475; // required _elem475 = new FieldSchema(); _elem475.read(iprot); struct.success.add(_elem475); @@ -22190,7 +23100,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_result s struct.success = new ArrayList(_list476.size); for (int _i477 = 0; _i477 < _list476.size; ++_i477) { - FieldSchema _elem478; // optional + FieldSchema _elem478; // required _elem478 = new FieldSchema(); _elem478.read(iprot); struct.success.add(_elem478); @@ -22330,7 +23240,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_result st struct.success = new ArrayList(_list481.size); for (int _i482 = 0; _i482 < _list481.size; ++_i482) { - FieldSchema _elem483; // optional + FieldSchema _elem483; // required _elem483 = new FieldSchema(); _elem483.read(iprot); struct.success.add(_elem483); @@ -27580,7 +28490,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_result s struct.success = new ArrayList(_list484.size); for (int _i485 = 0; _i485 < _list484.size; ++_i485) { - String _elem486; // optional + String _elem486; // required _elem486 = iprot.readString(); struct.success.add(_elem486); } @@ -27679,7 +28589,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_result st struct.success = new ArrayList(_list489.size); for (int _i490 = 0; _i490 < _list489.size; ++_i490) { - String _elem491; // optional + String _elem491; // required _elem491 = iprot.readString(); struct.success.add(_elem491); } @@ -28454,7 +29364,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_resu struct.success = new ArrayList(_list492.size); for (int _i493 = 0; _i493 < _list492.size; ++_i493) { - String _elem494; // optional + String _elem494; // required _elem494 = iprot.readString(); struct.success.add(_elem494); } @@ -28553,7 +29463,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_resul struct.success = new ArrayList(_list497.size); for (int _i498 = 0; _i498 < _list497.size; ++_i498) { - String _elem499; // optional + String _elem499; // required _elem499 = iprot.readString(); struct.success.add(_elem499); } @@ -30015,7 +30925,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_b struct.tbl_names = new ArrayList(_list500.size); for (int _i501 = 0; _i501 < _list500.size; ++_i501) { - String _elem502; // optional + String _elem502; // required _elem502 = iprot.readString(); struct.tbl_names.add(_elem502); } @@ -30109,7 +31019,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by struct.tbl_names = new ArrayList(_list505.size); for (int _i506 = 0; _i506 < _list505.size; ++_i506) { - String _elem507; // optional + String _elem507; // required _elem507 = iprot.readString(); struct.tbl_names.add(_elem507); } @@ -30683,7 +31593,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_b struct.success = new ArrayList(_list508.size); for (int _i509 = 0; _i509 < _list508.size; ++_i509) { - Table _elem510; // optional + Table _elem510; // required _elem510 = new Table(); _elem510.read(iprot); struct.success.add(_elem510); @@ -30823,7 +31733,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by struct.success = new ArrayList
(_list513.size); for (int _i514 = 0; _i514 < _list513.size; ++_i514) { - Table _elem515; // optional + Table _elem515; // required _elem515 = new Table(); _elem515.read(iprot); struct.success.add(_elem515); @@ -31979,7 +32889,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_ struct.success = new ArrayList(_list516.size); for (int _i517 = 0; _i517 < _list516.size; ++_i517) { - String _elem518; // optional + String _elem518; // required _elem518 = iprot.readString(); struct.success.add(_elem518); } @@ -32118,7 +33028,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_f struct.success = new ArrayList(_list521.size); for (int _i522 = 0; _i522 < _list521.size; ++_i522) { - String _elem523; // optional + String _elem523; // required _elem523 = iprot.readString(); struct.success.add(_elem523); } @@ -36844,7 +37754,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_args struct.new_parts = new ArrayList(_list524.size); for (int _i525 = 0; _i525 < _list524.size; ++_i525) { - Partition _elem526; // optional + Partition _elem526; // required _elem526 = new Partition(); _elem526.read(iprot); struct.new_parts.add(_elem526); @@ -36924,7 +37834,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct.new_parts = new ArrayList(_list529.size); for (int _i530 = 0; _i530 < _list529.size; ++_i530) { - Partition _elem531; // optional + Partition _elem531; // required _elem531 = new Partition(); _elem531.read(iprot); struct.new_parts.add(_elem531); @@ -38110,7 +39020,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_ar struct.part_vals = new ArrayList(_list532.size); for (int _i533 = 0; _i533 < _list532.size; ++_i533) { - String _elem534; // optional + String _elem534; // required _elem534 = iprot.readString(); struct.part_vals.add(_elem534); } @@ -38219,7 +39129,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_arg struct.part_vals = new ArrayList(_list537.size); for (int _i538 = 0; _i538 < _list537.size; ++_i538) { - String _elem539; // optional + String _elem539; // required _elem539 = iprot.readString(); struct.part_vals.add(_elem539); } @@ -40537,7 +41447,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_wi struct.part_vals = new ArrayList(_list540.size); for (int _i541 = 0; _i541 < _list540.size; ++_i541) { - String _elem542; // optional + String _elem542; // required _elem542 = iprot.readString(); struct.part_vals.add(_elem542); } @@ -40666,7 +41576,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_wit struct.part_vals = new ArrayList(_list545.size); for (int _i546 = 0; _i546 < _list545.size; ++_i546) { - String _elem547; // optional + String _elem547; // required _elem547 = iprot.readString(); struct.part_vals.add(_elem547); } @@ -44545,7 +45455,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_args struct.part_vals = new ArrayList(_list548.size); for (int _i549 = 0; _i549 < _list548.size; ++_i549) { - String _elem550; // optional + String _elem550; // required _elem550 = iprot.readString(); struct.part_vals.add(_elem550); } @@ -44671,7 +45581,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct.part_vals = new ArrayList(_list553.size); for (int _i554 = 0; _i554 < _list553.size; ++_i554) { - String _elem555; // optional + String _elem555; // required _elem555 = iprot.readString(); struct.part_vals.add(_elem555); } @@ -45919,7 +46829,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_with struct.part_vals = new ArrayList(_list556.size); for (int _i557 = 0; _i557 < _list556.size; ++_i557) { - String _elem558; // optional + String _elem558; // required _elem558 = iprot.readString(); struct.part_vals.add(_elem558); } @@ -46065,7 +46975,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_ struct.part_vals = new ArrayList(_list561.size); for (int _i562 = 0; _i562 < _list561.size; ++_i562) { - String _elem563; // optional + String _elem563; // required _elem563 = iprot.readString(); struct.part_vals.add(_elem563); } @@ -50676,7 +51586,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_args struct.part_vals = new ArrayList(_list564.size); for (int _i565 = 0; _i565 < _list564.size; ++_i565) { - String _elem566; // optional + String _elem566; // required _elem566 = iprot.readString(); struct.part_vals.add(_elem566); } @@ -50785,7 +51695,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_args s struct.part_vals = new ArrayList(_list569.size); for (int _i570 = 0; _i570 < _list569.size; ++_i570) { - String _elem571; // optional + String _elem571; // required _elem571 = iprot.readString(); struct.part_vals.add(_elem571); } @@ -53675,7 +54585,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_ struct.part_vals = new ArrayList(_list582.size); for (int _i583 = 0; _i583 < _list582.size; ++_i583) { - String _elem584; // optional + String _elem584; // required _elem584 = iprot.readString(); struct.part_vals.add(_elem584); } @@ -53701,7 +54611,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_ struct.group_names = new ArrayList(_list585.size); for (int _i586 = 0; _i586 < _list585.size; ++_i586) { - String _elem587; // optional + String _elem587; // required _elem587 = iprot.readString(); struct.group_names.add(_elem587); } @@ -53845,7 +54755,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_a struct.part_vals = new ArrayList(_list592.size); for (int _i593 = 0; _i593 < _list592.size; ++_i593) { - String _elem594; // optional + String _elem594; // required _elem594 = iprot.readString(); struct.part_vals.add(_elem594); } @@ -53862,7 +54772,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_a struct.group_names = new ArrayList(_list595.size); for (int _i596 = 0; _i596 < _list595.size; ++_i596) { - String _elem597; // optional + String _elem597; // required _elem597 = iprot.readString(); struct.group_names.add(_elem597); } @@ -56637,7 +57547,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_resu struct.success = new ArrayList(_list598.size); for (int _i599 = 0; _i599 < _list598.size; ++_i599) { - Partition _elem600; // optional + Partition _elem600; // required _elem600 = new Partition(); _elem600.read(iprot); struct.success.add(_elem600); @@ -56757,7 +57667,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_resul struct.success = new ArrayList(_list603.size); for (int _i604 = 0; _i604 < _list603.size; ++_i604) { - Partition _elem605; // optional + Partition _elem605; // required _elem605 = new Partition(); _elem605.read(iprot); struct.success.add(_elem605); @@ -57457,7 +58367,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with struct.group_names = new ArrayList(_list606.size); for (int _i607 = 0; _i607 < _list606.size; ++_i607) { - String _elem608; // optional + String _elem608; // required _elem608 = iprot.readString(); struct.group_names.add(_elem608); } @@ -57594,7 +58504,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_ struct.group_names = new ArrayList(_list611.size); for (int _i612 = 0; _i612 < _list611.size; ++_i612) { - String _elem613; // optional + String _elem613; // required _elem613 = iprot.readString(); struct.group_names.add(_elem613); } @@ -58087,7 +58997,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with struct.success = new ArrayList(_list614.size); for (int _i615 = 0; _i615 < _list614.size; ++_i615) { - Partition _elem616; // optional + Partition _elem616; // required _elem616 = new Partition(); _elem616.read(iprot); struct.success.add(_elem616); @@ -58207,7 +59117,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_ struct.success = new ArrayList(_list619.size); for (int _i620 = 0; _i620 < _list619.size; ++_i620) { - Partition _elem621; // optional + Partition _elem621; // required _elem621 = new Partition(); _elem621.read(iprot); struct.success.add(_elem621); @@ -59196,7 +60106,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names struct.success = new ArrayList(_list622.size); for (int _i623 = 0; _i623 < _list622.size; ++_i623) { - String _elem624; // optional + String _elem624; // required _elem624 = iprot.readString(); struct.success.add(_elem624); } @@ -59295,7 +60205,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ struct.success = new ArrayList(_list627.size); for (int _i628 = 0; _i628 < _list627.size; ++_i628) { - String _elem629; // optional + String _elem629; // required _elem629 = iprot.readString(); struct.success.add(_elem629); } @@ -59892,7 +60802,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_a struct.part_vals = new ArrayList(_list630.size); for (int _i631 = 0; _i631 < _list630.size; ++_i631) { - String _elem632; // optional + String _elem632; // required _elem632 = iprot.readString(); struct.part_vals.add(_elem632); } @@ -60018,7 +60928,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_ar struct.part_vals = new ArrayList(_list635.size); for (int _i636 = 0; _i636 < _list635.size; ++_i636) { - String _elem637; // optional + String _elem637; // required _elem637 = iprot.readString(); struct.part_vals.add(_elem637); } @@ -60515,7 +61425,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_r struct.success = new ArrayList(_list638.size); for (int _i639 = 0; _i639 < _list638.size; ++_i639) { - Partition _elem640; // optional + Partition _elem640; // required _elem640 = new Partition(); _elem640.read(iprot); struct.success.add(_elem640); @@ -60635,7 +61545,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_re struct.success = new ArrayList(_list643.size); for (int _i644 = 0; _i644 < _list643.size; ++_i644) { - Partition _elem645; // optional + Partition _elem645; // required _elem645 = new Partition(); _elem645.read(iprot); struct.success.add(_elem645); @@ -61420,7 +62330,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_w struct.part_vals = new ArrayList(_list646.size); for (int _i647 = 0; _i647 < _list646.size; ++_i647) { - String _elem648; // optional + String _elem648; // required _elem648 = iprot.readString(); struct.part_vals.add(_elem648); } @@ -61454,7 +62364,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_w struct.group_names = new ArrayList(_list649.size); for (int _i650 = 0; _i650 < _list649.size; ++_i650) { - String _elem651; // optional + String _elem651; // required _elem651 = iprot.readString(); struct.group_names.add(_elem651); } @@ -61607,7 +62517,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_wi struct.part_vals = new ArrayList(_list656.size); for (int _i657 = 0; _i657 < _list656.size; ++_i657) { - String _elem658; // optional + String _elem658; // required _elem658 = iprot.readString(); struct.part_vals.add(_elem658); } @@ -61628,7 +62538,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_wi struct.group_names = new ArrayList(_list659.size); for (int _i660 = 0; _i660 < _list659.size; ++_i660) { - String _elem661; // optional + String _elem661; // required _elem661 = iprot.readString(); struct.group_names.add(_elem661); } @@ -62121,7 +63031,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_w struct.success = new ArrayList(_list662.size); for (int _i663 = 0; _i663 < _list662.size; ++_i663) { - Partition _elem664; // optional + Partition _elem664; // required _elem664 = new Partition(); _elem664.read(iprot); struct.success.add(_elem664); @@ -62241,7 +63151,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_wi struct.success = new ArrayList(_list667.size); for (int _i668 = 0; _i668 < _list667.size; ++_i668) { - Partition _elem669; // optional + Partition _elem669; // required _elem669 = new Partition(); _elem669.read(iprot); struct.success.add(_elem669); @@ -62844,7 +63754,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names struct.part_vals = new ArrayList(_list670.size); for (int _i671 = 0; _i671 < _list670.size; ++_i671) { - String _elem672; // optional + String _elem672; // required _elem672 = iprot.readString(); struct.part_vals.add(_elem672); } @@ -62970,7 +63880,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ struct.part_vals = new ArrayList(_list675.size); for (int _i676 = 0; _i676 < _list675.size; ++_i676) { - String _elem677; // optional + String _elem677; // required _elem677 = iprot.readString(); struct.part_vals.add(_elem677); } @@ -63467,7 +64377,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names struct.success = new ArrayList(_list678.size); for (int _i679 = 0; _i679 < _list678.size; ++_i679) { - String _elem680; // optional + String _elem680; // required _elem680 = iprot.readString(); struct.success.add(_elem680); } @@ -63586,7 +64496,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ struct.success = new ArrayList(_list683.size); for (int _i684 = 0; _i684 < _list683.size; ++_i684) { - String _elem685; // optional + String _elem685; // required _elem685 = iprot.readString(); struct.success.add(_elem685); } @@ -64759,7 +65669,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_f struct.success = new ArrayList(_list686.size); for (int _i687 = 0; _i687 < _list686.size; ++_i687) { - Partition _elem688; // optional + Partition _elem688; // required _elem688 = new Partition(); _elem688.read(iprot); struct.success.add(_elem688); @@ -64879,7 +65789,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_fi struct.success = new ArrayList(_list691.size); for (int _i692 = 0; _i692 < _list691.size; ++_i692) { - Partition _elem693; // optional + Partition _elem693; // required _elem693 = new Partition(); _elem693.read(iprot); struct.success.add(_elem693); @@ -66337,7 +67247,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_n struct.names = new ArrayList(_list694.size); for (int _i695 = 0; _i695 < _list694.size; ++_i695) { - String _elem696; // optional + String _elem696; // required _elem696 = iprot.readString(); struct.names.add(_elem696); } @@ -66446,7 +67356,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_na struct.names = new ArrayList(_list699.size); for (int _i700 = 0; _i700 < _list699.size; ++_i700) { - String _elem701; // optional + String _elem701; // required _elem701 = iprot.readString(); struct.names.add(_elem701); } @@ -66939,7 +67849,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_n struct.success = new ArrayList(_list702.size); for (int _i703 = 0; _i703 < _list702.size; ++_i703) { - Partition _elem704; // optional + Partition _elem704; // required _elem704 = new Partition(); _elem704.read(iprot); struct.success.add(_elem704); @@ -67059,7 +67969,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_na struct.success = new ArrayList(_list707.size); for (int _i708 = 0; _i708 < _list707.size; ++_i708) { - Partition _elem709; // optional + Partition _elem709; // required _elem709 = new Partition(); _elem709.read(iprot); struct.success.add(_elem709); @@ -68616,7 +69526,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_ar struct.new_parts = new ArrayList(_list710.size); for (int _i711 = 0; _i711 < _list710.size; ++_i711) { - Partition _elem712; // optional + Partition _elem712; // required _elem712 = new Partition(); _elem712.read(iprot); struct.new_parts.add(_elem712); @@ -68726,7 +69636,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_arg struct.new_parts = new ArrayList(_list715.size); for (int _i716 = 0; _i716 < _list715.size; ++_i716) { - Partition _elem717; // optional + Partition _elem717; // required _elem717 = new Partition(); _elem717.read(iprot); struct.new_parts.add(_elem717); @@ -70932,7 +71842,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_ar struct.part_vals = new ArrayList(_list718.size); for (int _i719 = 0; _i719 < _list718.size; ++_i719) { - String _elem720; // optional + String _elem720; // required _elem720 = iprot.readString(); struct.part_vals.add(_elem720); } @@ -71061,7 +71971,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_arg struct.part_vals = new ArrayList(_list723.size); for (int _i724 = 0; _i724 < _list723.size; ++_i724) { - String _elem725; // optional + String _elem725; // required _elem725 = iprot.readString(); struct.part_vals.add(_elem725); } @@ -71944,7 +72854,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_ struct.part_vals = new ArrayList(_list726.size); for (int _i727 = 0; _i727 < _list726.size; ++_i727) { - String _elem728; // optional + String _elem728; // required _elem728 = iprot.readString(); struct.part_vals.add(_elem728); } @@ -72040,7 +72950,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_has_v struct.part_vals = new ArrayList(_list731.size); for (int _i732 = 0; _i732 < _list731.size; ++_i732) { - String _elem733; // optional + String _elem733; // required _elem733 = iprot.readString(); struct.part_vals.add(_elem733); } @@ -74204,7 +75114,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_v struct.success = new ArrayList(_list734.size); for (int _i735 = 0; _i735 < _list734.size; ++_i735) { - String _elem736; // optional + String _elem736; // required _elem736 = iprot.readString(); struct.success.add(_elem736); } @@ -74303,7 +75213,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_va struct.success = new ArrayList(_list739.size); for (int _i740 = 0; _i740 < _list739.size; ++_i740) { - String _elem741; // optional + String _elem741; // required _elem741 = iprot.readString(); struct.success.add(_elem741); } @@ -84299,7 +85209,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_result struct.success = new ArrayList(_list772.size); for (int _i773 = 0; _i773 < _list772.size; ++_i773) { - Index _elem774; // optional + Index _elem774; // required _elem774 = new Index(); _elem774.read(iprot); struct.success.add(_elem774); @@ -84419,7 +85329,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_result s struct.success = new ArrayList(_list777.size); for (int _i778 = 0; _i778 < _list777.size; ++_i778) { - Index _elem779; // optional + Index _elem779; // required _elem779 = new Index(); _elem779.read(iprot); struct.success.add(_elem779); @@ -85408,7 +86318,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_res struct.success = new ArrayList(_list780.size); for (int _i781 = 0; _i781 < _list780.size; ++_i781) { - String _elem782; // optional + String _elem782; // required _elem782 = iprot.readString(); struct.success.add(_elem782); } @@ -85507,7 +86417,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_resu struct.success = new ArrayList(_list785.size); for (int _i786 = 0; _i786 < _list785.size; ++_i786) { - String _elem787; // optional + String _elem787; // required _elem787 = iprot.readString(); struct.success.add(_elem787); } @@ -99168,7 +100078,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_resul struct.success = new ArrayList(_list788.size); for (int _i789 = 0; _i789 < _list788.size; ++_i789) { - String _elem790; // optional + String _elem790; // required _elem790 = iprot.readString(); struct.success.add(_elem790); } @@ -99267,7 +100177,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_result struct.success = new ArrayList(_list793.size); for (int _i794 = 0; _i794 < _list793.size; ++_i794) { - String _elem795; // optional + String _elem795; // required _elem795 = iprot.readString(); struct.success.add(_elem795); } @@ -102616,7 +103526,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_resu struct.success = new ArrayList(_list796.size); for (int _i797 = 0; _i797 < _list796.size; ++_i797) { - String _elem798; // optional + String _elem798; // required _elem798 = iprot.readString(); struct.success.add(_elem798); } @@ -102715,7 +103625,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_resul struct.success = new ArrayList(_list801.size); for (int _i802 = 0; _i802 < _list801.size; ++_i802) { - String _elem803; // optional + String _elem803; // required _elem803 = iprot.readString(); struct.success.add(_elem803); } @@ -106012,7 +106922,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_result s struct.success = new ArrayList(_list804.size); for (int _i805 = 0; _i805 < _list804.size; ++_i805) { - Role _elem806; // optional + Role _elem806; // required _elem806 = new Role(); _elem806.read(iprot); struct.success.add(_elem806); @@ -106112,7 +107022,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_result st struct.success = new ArrayList(_list809.size); for (int _i810 = 0; _i810 < _list809.size; ++_i810) { - Role _elem811; // optional + Role _elem811; // required _elem811 = new Role(); _elem811.read(iprot); struct.success.add(_elem811); @@ -109127,7 +110037,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_a struct.group_names = new ArrayList(_list812.size); for (int _i813 = 0; _i813 < _list812.size; ++_i813) { - String _elem814; // optional + String _elem814; // required _elem814 = iprot.readString(); struct.group_names.add(_elem814); } @@ -109237,7 +110147,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_ar struct.group_names = new ArrayList(_list817.size); for (int _i818 = 0; _i818 < _list817.size; ++_i818) { - String _elem819; // optional + String _elem819; // required _elem819 = iprot.readString(); struct.group_names.add(_elem819); } @@ -110701,7 +111611,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_res struct.success = new ArrayList(_list820.size); for (int _i821 = 0; _i821 < _list820.size; ++_i821) { - HiveObjectPrivilege _elem822; // optional + HiveObjectPrivilege _elem822; // required _elem822 = new HiveObjectPrivilege(); _elem822.read(iprot); struct.success.add(_elem822); @@ -110801,7 +111711,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_resu struct.success = new ArrayList(_list825.size); for (int _i826 = 0; _i826 < _list825.size; ++_i826) { - HiveObjectPrivilege _elem827; // optional + HiveObjectPrivilege _elem827; // required _elem827 = new HiveObjectPrivilege(); _elem827.read(iprot); struct.success.add(_elem827); @@ -113713,7 +114623,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_args struct struct.group_names = new ArrayList(_list828.size); for (int _i829 = 0; _i829 < _list828.size; ++_i829) { - String _elem830; // optional + String _elem830; // required _elem830 = iprot.readString(); struct.group_names.add(_elem830); } @@ -113807,7 +114717,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) struct.group_names = new ArrayList(_list833.size); for (int _i834 = 0; _i834 < _list833.size; ++_i834) { - String _elem835; // optional + String _elem835; // required _elem835 = iprot.readString(); struct.group_names.add(_elem835); } @@ -114219,7 +115129,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_result stru struct.success = new ArrayList(_list836.size); for (int _i837 = 0; _i837 < _list836.size; ++_i837) { - String _elem838; // optional + String _elem838; // required _elem838 = iprot.readString(); struct.success.add(_elem838); } @@ -114318,7 +115228,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struc struct.success = new ArrayList(_list841.size); for (int _i842 = 0; _i842 < _list841.size; ++_i842) { - String _elem843; // optional + String _elem843; // required _elem843 = iprot.readString(); struct.success.add(_elem843); } 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 1882b57..bb81e3c 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; // optional + FieldSchema _elem2; // required _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; // optional + FieldSchema _elem7; // required _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 b74e54e..9989054 100644 --- metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php +++ metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php @@ -16,6 +16,7 @@ use Thrift\Exception\TApplicationException; interface ThriftHiveMetastoreIf extends \FacebookServiceIf { + public function configure($key, $value); public function create_database(\metastore\Database $database); public function get_database($name); public function drop_database($name, $deleteData, $cascade); @@ -132,6 +133,58 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas parent::__construct($input, $output); } + public function configure($key, $value) + { + $this->send_configure($key, $value); + $this->recv_configure(); + } + + public function send_configure($key, $value) + { + $args = new \metastore\ThriftHiveMetastore_configure_args(); + $args->key = $key; + $args->value = $value; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'configure', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('configure', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_configure() + { + $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_configure_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_configure_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + public function create_database(\metastore\Database $database) { $this->send_create_database($database); @@ -6418,6 +6471,172 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas // HELPER FUNCTIONS AND STRUCTURES +class ThriftHiveMetastore_configure_args { + static $_TSPEC; + + public $key = null; + public $value = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'value', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['key'])) { + $this->key = $vals['key']; + } + if (isset($vals['value'])) { + $this->value = $vals['value']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_configure_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->key); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->value); + } 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_configure_args'); + if ($this->key !== null) { + $xfer += $output->writeFieldBegin('key', TType::STRING, 1); + $xfer += $output->writeString($this->key); + $xfer += $output->writeFieldEnd(); + } + if ($this->value !== null) { + $xfer += $output->writeFieldBegin('value', TType::STRING, 2); + $xfer += $output->writeString($this->value); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_configure_result { + static $_TSPEC; + + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_configure_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_configure_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class ThriftHiveMetastore_create_database_args { 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 6fef2cf..a655c31 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -23,6 +23,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' + print ' void configure(string key, string value)' print ' void create_database(Database database)' print ' Database get_database(string name)' print ' void drop_database(string name, bool deleteData, bool cascade)' @@ -183,7 +184,13 @@ protocol = TBinaryProtocol.TBinaryProtocol(transport) client = ThriftHiveMetastore.Client(protocol) transport.open() -if cmd == 'create_database': +if cmd == 'configure': + if len(args) != 2: + print 'configure requires 2 args' + sys.exit(1) + pp.pprint(client.configure(args[0],args[1],)) + +elif cmd == 'create_database': if len(args) != 1: print 'create_database requires 1 args' sys.exit(1) diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py index 2a2e443..12aa83c 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -22,6 +22,14 @@ class Iface(fb303.FacebookService.Iface): """ This interface is live. """ + def configure(self, key, value): + """ + Parameters: + - key + - value + """ + pass + def create_database(self, database): """ Parameters: @@ -919,6 +927,38 @@ class Client(fb303.FacebookService.Client, Iface): def __init__(self, iprot, oprot=None): fb303.FacebookService.Client.__init__(self, iprot, oprot) + def configure(self, key, value): + """ + Parameters: + - key + - value + """ + self.send_configure(key, value) + self.recv_configure() + + def send_configure(self, key, value): + self._oprot.writeMessageBegin('configure', TMessageType.CALL, self._seqid) + args = configure_args() + args.key = key + args.value = value + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_configure(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = configure_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + def create_database(self, database): """ Parameters: @@ -4847,6 +4887,7 @@ def recv_show_compact(self, ): class Processor(fb303.FacebookService.Processor, Iface, TProcessor): def __init__(self, handler): fb303.FacebookService.Processor.__init__(self, handler) + self._processMap["configure"] = Processor.process_configure self._processMap["create_database"] = Processor.process_create_database self._processMap["get_database"] = Processor.process_get_database self._processMap["drop_database"] = Processor.process_drop_database @@ -4972,6 +5013,20 @@ def process(self, iprot, oprot): self._processMap[name](self, seqid, iprot, oprot) return True + def process_configure(self, seqid, iprot, oprot): + args = configure_args() + args.read(iprot) + iprot.readMessageEnd() + result = configure_result() + try: + self._handler.configure(args.key, args.value) + except MetaException as o1: + result.o1 = o1 + oprot.writeMessageBegin("configure", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_create_database(self, seqid, iprot, oprot): args = create_database_args() args.read(iprot) @@ -6714,6 +6769,139 @@ def process_show_compact(self, seqid, iprot, oprot): # HELPER FUNCTIONS AND STRUCTURES +class configure_args: + """ + Attributes: + - key + - value + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'key', None, None, ), # 1 + (2, TType.STRING, 'value', None, None, ), # 2 + ) + + def __init__(self, key=None, value=None,): + self.key = key + self.value = value + + 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.key = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.value = 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('configure_args') + if self.key is not None: + oprot.writeFieldBegin('key', TType.STRING, 1) + oprot.writeString(self.key) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 2) + oprot.writeString(self.value) + 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 configure_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + 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 == 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('configure_result') + 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 create_database_args: """ Attributes: diff --git metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb index 58b9c0e..c179563 100644 --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -12,6 +12,21 @@ module ThriftHiveMetastore class Client < ::FacebookService::Client include ::Thrift::Client + def configure(key, value) + send_configure(key, value) + recv_configure() + end + + def send_configure(key, value) + send_message('configure', Configure_args, :key => key, :value => value) + end + + def recv_configure() + result = receive_message(Configure_result) + raise result.o1 unless result.o1.nil? + return + end + def create_database(database) send_create_database(database) recv_create_database() @@ -1847,6 +1862,17 @@ module ThriftHiveMetastore class Processor < ::FacebookService::Processor include ::Thrift::Processor + def process_configure(seqid, iprot, oprot) + args = read_args(iprot, Configure_args) + result = Configure_result.new() + begin + @handler.configure(args.key, args.value) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'configure', seqid) + end + def process_create_database(seqid, iprot, oprot) args = read_args(iprot, Create_database_args) result = Create_database_result.new() @@ -3256,6 +3282,40 @@ module ThriftHiveMetastore # HELPER FUNCTIONS AND STRUCTURES + class Configure_args + include ::Thrift::Struct, ::Thrift::Struct_Union + KEY = 1 + VALUE = 2 + + FIELDS = { + KEY => {:type => ::Thrift::Types::STRING, :name => 'key'}, + VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Configure_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Create_database_args include ::Thrift::Struct, ::Thrift::Struct_Union DATABASE = 1 diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index 5cc1cd8..aa4535d 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -89,7 +89,6 @@ import org.apache.hadoop.hive.metastore.api.GrantRevokePrivilegeResponse; import org.apache.hadoop.hive.metastore.api.GrantRevokeRoleRequest; import org.apache.hadoop.hive.metastore.api.GrantRevokeRoleResponse; -import org.apache.hadoop.hive.metastore.api.GrantRevokeType; import org.apache.hadoop.hive.metastore.api.HeartbeatRequest; import org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeRequest; import org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeResponse; @@ -142,6 +141,7 @@ import org.apache.hadoop.hive.metastore.events.AddPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterTableEvent; +import org.apache.hadoop.hive.metastore.events.ConfigChangeEvent; import org.apache.hadoop.hive.metastore.events.CreateDatabaseEvent; import org.apache.hadoop.hive.metastore.events.CreateTableEvent; import org.apache.hadoop.hive.metastore.events.DropDatabaseEvent; @@ -249,7 +249,7 @@ public TTransport getTransport(TTransport trans) { // right now they come from jpox.properties private Warehouse wh; // hdfs warehouse - private final ThreadLocal threadLocalMS = + private static final ThreadLocal threadLocalMS = new ThreadLocal() { @Override protected synchronized RawStore initialValue() { @@ -257,7 +257,7 @@ protected synchronized RawStore initialValue() { } }; - private final ThreadLocal threadLocalTxn = new ThreadLocal() { + private static final ThreadLocal threadLocalTxn = new ThreadLocal() { @Override protected synchronized TxnHandler initialValue() { return null; @@ -266,7 +266,7 @@ protected synchronized TxnHandler initialValue() { // Thread local configuration is needed as many threads could make changes // to the conf using the connection hook - private final ThreadLocal threadLocalConf = + private static final ThreadLocal threadLocalConf = new ThreadLocal() { @Override protected synchronized Configuration initialValue() { @@ -355,15 +355,19 @@ public static void resetDefaultDBFlag() { } public HMSHandler(String name) throws MetaException { - super(name); - hiveConf = new HiveConf(this.getClass()); - init(); + this(name, new HiveConf(HMSHandler.class), true); } public HMSHandler(String name, HiveConf conf) throws MetaException { + this(name, conf, true); + } + + public HMSHandler(String name, HiveConf conf, boolean init) throws MetaException { super(name); hiveConf = conf; - init(); + if (init) { + init(); + } } public HiveConf getHiveConf() { @@ -385,7 +389,7 @@ public HiveConf getHiveConf() { } } - private boolean init() throws MetaException { + public void init() throws MetaException { rawStoreClassName = hiveConf.getVar(HiveConf.ConfVars.METASTORE_RAW_STORE_IMPL); checkForDefaultDb = hiveConf.getBoolean( "hive.metastore.checkForDefaultDb", true); @@ -442,7 +446,6 @@ private boolean init() throws MetaException { Timer cleaner = new Timer("Metastore Events Cleaner Thread", true); cleaner.schedule(new EventCleanerTask(this), cleanFreq, cleanFreq); } - return true; } private String addPrefix(String s) { @@ -454,10 +457,11 @@ public void setConf(Configuration conf) { threadLocalConf.set(conf); RawStore ms = threadLocalMS.get(); if (ms != null) { - ms.setConf(conf); + ms.setConf(conf); // reload if DS related configuration is changed } } + @Override public Configuration getConf() { Configuration conf = threadLocalConf.get(); if (conf == null) { @@ -471,6 +475,25 @@ public Warehouse getWh() { return wh; } + public void configure(String key, String value) throws MetaException { + ConfVars confVar = HiveConf.getMetaConf(key); + if (confVar == null) { + throw new MetaException("Invalid configuration key " + key); + } + String validate = confVar.validate(value); + if (validate != null) { + throw new MetaException("Invalid configuration value " + value + " for key " + key + + " by " + validate); + } + Configuration configuration = getConf(); + String oldValue = configuration.get(key); + configuration.set(key, value); + + for (MetaStoreEventListener listener : listeners) { + listener.onConfigChange(new ConfigChangeEvent(this, key, oldValue, value)); + } + } + /** * Get a cached RawStore. * @@ -698,8 +721,11 @@ public void shutdown() { logInfo("Shutting down the object store..."); RawStore ms = threadLocalMS.get(); if (ms != null) { - ms.shutdown(); - threadLocalMS.remove(); + try { + ms.shutdown(); + } finally { + threadLocalMS.remove(); + } } logInfo("Metastore shutdown complete."); } @@ -5001,9 +5027,12 @@ public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal( } public static IHMSHandler newHMSHandler(String name, HiveConf hiveConf) throws MetaException { - return RetryingHMSHandler.getProxy(hiveConf, name); + return newHMSHandler(name, hiveConf, false); } + public static IHMSHandler newHMSHandler(String name, HiveConf hiveConf, boolean local) throws MetaException { + return RetryingHMSHandler.getProxy(hiveConf, name, local); + } /** * Discard a current delegation token. diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index d26183b..fdef1b8 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -169,7 +169,7 @@ public HiveMetaStoreClient(HiveConf conf, HiveMetaHookLoader hookLoader) if (localMetaStore) { // instantiate the metastore server handler directly instead of connecting // through the network - client = HiveMetaStore.newHMSHandler("hive client", conf); + client = HiveMetaStore.newHMSHandler("hive client", conf, true); isConnected = true; return; } @@ -407,6 +407,11 @@ public void close() { } } + @Override + public void configure(String key, String value) throws TException { + client.configure(key, value); + } + /** * @param new_part * @return the added partition diff --git metastore/src/java/org/apache/hadoop/hive/metastore/IHMSHandler.java metastore/src/java/org/apache/hadoop/hive/metastore/IHMSHandler.java index 1675751..3a284aa 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/IHMSHandler.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/IHMSHandler.java @@ -19,9 +19,14 @@ package org.apache.hadoop.hive.metastore; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore; -public interface IHMSHandler extends ThriftHiveMetastore.Iface { +public interface IHMSHandler extends ThriftHiveMetastore.Iface { - public abstract void setConf(Configuration conf); + void init() throws MetaException; + + void setConf(Configuration conf); + + Configuration getConf(); } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index 5add436..d644294 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -97,6 +97,8 @@ public void close(); + public void configure(String key, String value) throws MetaException, TException; + /** * Get the names of all databases in the MetaStore that match the given pattern. * @param databasePattern diff --git metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreEventListener.java metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreEventListener.java index c28c46a..d760be0 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreEventListener.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreEventListener.java @@ -24,6 +24,7 @@ import org.apache.hadoop.hive.metastore.events.AddPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterTableEvent; +import org.apache.hadoop.hive.metastore.events.ConfigChangeEvent; import org.apache.hadoop.hive.metastore.events.CreateDatabaseEvent; import org.apache.hadoop.hive.metastore.events.CreateTableEvent; import org.apache.hadoop.hive.metastore.events.DropDatabaseEvent; @@ -47,6 +48,14 @@ public MetaStoreEventListener(Configuration config){ } /** + * @param key + * @param oldValue + * @param newValue + */ + public void onConfigChange(ConfigChangeEvent event) { + } + + /** * @param tableEvent table event. * @throws MetaException */ diff --git metastore/src/java/org/apache/hadoop/hive/metastore/RawStoreProxy.java metastore/src/java/org/apache/hadoop/hive/metastore/RawStoreProxy.java index 1cf09d4..490f3e0 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStoreProxy.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStoreProxy.java @@ -26,8 +26,6 @@ import java.util.List; import org.apache.commons.lang.ClassUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.common.classification.InterfaceAudience; import org.apache.hadoop.hive.common.classification.InterfaceStability; diff --git metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java index 86172b9..6a69a76 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java @@ -43,44 +43,39 @@ private final IHMSHandler base; private final MetaStoreInit.MetaStoreInitData metaStoreInitData = new MetaStoreInit.MetaStoreInitData(); - private final HiveConf hiveConf; - protected RetryingHMSHandler(final HiveConf hiveConf, final String name) throws MetaException { + private final HiveConf hiveConf; // base configuration + private final Configuration configuration; // active configuration + + private RetryingHMSHandler(HiveConf hiveConf, String name, boolean local) throws MetaException { this.hiveConf = hiveConf; + this.base = new HiveMetaStore.HMSHandler(name, hiveConf, false); + if (local) { + base.setConf(hiveConf); // tests expect configuration changes applied directly to metastore + } + configuration = base.getConf(); // This has to be called before initializing the instance of HMSHandler - init(); + // Using the hook on startup ensures that the hook always has priority + // over settings in *.xml. The thread local conf needs to be used because at this point + // it has already been initialized using hiveConf. + MetaStoreInit.updateConnectionURL(hiveConf, getConf(), null, metaStoreInitData); - this.base = new HiveMetaStore.HMSHandler(name, hiveConf); + base.init(); } - public static IHMSHandler getProxy(HiveConf hiveConf, String name) throws MetaException { + public static IHMSHandler getProxy(HiveConf hiveConf, String name, boolean local) throws MetaException { - RetryingHMSHandler handler = new RetryingHMSHandler(hiveConf, name); + RetryingHMSHandler handler = new RetryingHMSHandler(hiveConf, name, local); return (IHMSHandler) Proxy.newProxyInstance( RetryingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, handler); } - private void init() throws MetaException { - // Using the hook on startup ensures that the hook always has priority - // over settings in *.xml. The thread local conf needs to be used because at this point - // it has already been initialized using hiveConf. - MetaStoreInit.updateConnectionURL(hiveConf, getConf(), null, metaStoreInitData); - - } - - private void initMS() { - base.setConf(getConf()); - } - - @Override public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { - Object ret = null; - boolean gotNewConnectUrl = false; boolean reloadConf = HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HMSHANDLERFORCERELOADCONF); @@ -95,15 +90,14 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg } int retryCount = 0; - // Exception caughtException = null; Throwable caughtException = null; while (true) { try { if (reloadConf || gotNewConnectUrl) { - initMS(); + base.setConf(getConf()); } - ret = method.invoke(base, args); - break; + return method.invoke(base, args); + } catch (javax.jdo.JDOException e) { caughtException = e; } catch (UndeclaredThrowableException e) { @@ -166,10 +160,9 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg gotNewConnectUrl = MetaStoreInit.updateConnectionURL(hiveConf, getConf(), lastUrl, metaStoreInitData); } - return ret; } public Configuration getConf() { - return hiveConf; + return configuration; } } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/events/ConfigChangeEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/ConfigChangeEvent.java new file mode 100644 index 0000000..a3c88a3 --- /dev/null +++ metastore/src/java/org/apache/hadoop/hive/metastore/events/ConfigChangeEvent.java @@ -0,0 +1,47 @@ +/** + * 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.events; + +import org.apache.hadoop.hive.metastore.HiveMetaStore; + +public class ConfigChangeEvent extends ListenerEvent { + + private final String key; + private final String oldValue; + private final String newValue; + + public ConfigChangeEvent(HiveMetaStore.HMSHandler handler, String key, String oldValue, String newValue) { + super(true, handler); + this.key = key; + this.oldValue = oldValue; + this.newValue = newValue; + } + + public String getKey() { + return key; + } + + public String getOldValue() { + return oldValue; + } + + public String getNewValue() { + return newValue; + } +} diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyListener.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyListener.java index 92f2388..4a3c011 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/DummyListener.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/DummyListener.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hive.metastore.events.AddPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterPartitionEvent; import org.apache.hadoop.hive.metastore.events.AlterTableEvent; +import org.apache.hadoop.hive.metastore.events.ConfigChangeEvent; import org.apache.hadoop.hive.metastore.events.CreateDatabaseEvent; import org.apache.hadoop.hive.metastore.events.CreateTableEvent; import org.apache.hadoop.hive.metastore.events.DropDatabaseEvent; @@ -58,6 +59,11 @@ public DummyListener(Configuration config) { } @Override + public void onConfigChange(ConfigChangeEvent event) { + notifyList.add(event); + } + + @Override public void onAddPartition(AddPartitionEvent partition) throws MetaException { notifyList.add(partition); } 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 81323f6..b76a7a9 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -2709,4 +2709,11 @@ public Function getFunction(String dbName, String funcName) throws HiveException } } + public void configure(String propName, String propValue) throws HiveException { + try { + getMSC().configure(propName, propValue); + } catch (TException te) { + throw new HiveException(te); + } + } }; diff --git ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java index 2baa24a..2a455f0 100644 --- ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java +++ ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java @@ -32,6 +32,7 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Schema; +import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.parse.VariableSubstitution; import org.apache.hadoop.hive.ql.session.SessionState; @@ -104,11 +105,12 @@ public CommandProcessorResponse executeSetVariable(String varname, String varval try { return new CommandProcessorResponse(setVariable(varname, varvalue)); } catch (Exception e) { - return new CommandProcessorResponse(1, e.getMessage(), "42000"); + return new CommandProcessorResponse(1, e.getMessage(), "42000", + e instanceof IllegalArgumentException ? null : e); } } - public static int setVariable(String varname, String varvalue) throws IllegalArgumentException { + public static int setVariable(String varname, String varvalue) throws Exception { SessionState ss = SessionState.get(); if (varvalue.contains("\n")){ ss.err.println("Warning: Value had a \\n character in it."); @@ -126,6 +128,10 @@ public static int setVariable(String varname, String varvalue) throws IllegalArg } else if (varname.startsWith(HIVEVAR_PREFIX)) { String propName = varname.substring(HIVEVAR_PREFIX.length()); ss.getHiveVariables().put(propName, new VariableSubstitution().substitute(ss.getConf(),varvalue)); + } else if (varname.startsWith(METACONF_PREFIX)) { + String propName = varname.substring(METACONF_PREFIX.length()); + Hive hive = Hive.get(ss.getConf()); + hive.configure(propName, new VariableSubstitution().substitute(ss.getConf(), varvalue)); } else { setConf(varname, varname, varvalue, true); } diff --git ql/src/test/queries/clientpositive/set_metaconf.q ql/src/test/queries/clientpositive/set_metaconf.q new file mode 100644 index 0000000..e69de29 diff --git service/src/java/org/apache/hive/service/cli/session/HiveSessionBase.java service/src/java/org/apache/hive/service/cli/session/HiveSessionBase.java index 4c3164e..eee1cc6 100644 --- service/src/java/org/apache/hive/service/cli/session/HiveSessionBase.java +++ service/src/java/org/apache/hive/service/cli/session/HiveSessionBase.java @@ -55,7 +55,7 @@ * Initialize the session * @param sessionConfMap */ - public void initialize(Map sessionConfMap); + public void initialize(Map sessionConfMap) throws Exception; public SessionHandle getSessionHandle(); diff --git service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java index b39d64d..bc0a02c 100644 --- service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java +++ service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java @@ -110,7 +110,7 @@ public HiveSessionImpl(TProtocolVersion protocol, String username, String passwo } @Override - public void initialize(Map sessionConfMap) { + public void initialize(Map sessionConfMap) throws Exception { //process global init file: .hiverc processGlobalInitFile(); SessionState.setCurrentSessionState(sessionState); @@ -168,7 +168,7 @@ private void processGlobalInitFile() { } } - private void configureSession(Map sessionConfMap) { + private void configureSession(Map sessionConfMap) throws Exception { for (Map.Entry entry : sessionConfMap.entrySet()) { String key = entry.getKey(); if (key.startsWith("set:")) { diff --git service/src/java/org/apache/hive/service/cli/session/SessionManager.java service/src/java/org/apache/hive/service/cli/session/SessionManager.java index 816bea4..84286ec 100644 --- service/src/java/org/apache/hive/service/cli/session/SessionManager.java +++ service/src/java/org/apache/hive/service/cli/session/SessionManager.java @@ -132,8 +132,12 @@ public SessionHandle openSession(TProtocolVersion protocol, String username, Str } session.setSessionManager(this); session.setOperationManager(operationManager); - session.initialize(sessionConf); - session.open(); + try { + session.initialize(sessionConf); + session.open(); + } catch (Exception e) { + throw new HiveSQLException("Failed to execute session hooks", e); + } handleToSession.put(session.getSessionHandle(), session); try {