diff --git a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java index de76a7d815..5fead31b7c 100644 --- a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java +++ b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java @@ -1526,6 +1526,11 @@ public ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) throws Me throw new RuntimeException("unimplemented"); } + @Override + public List getReplScheduledQueries() throws MetaException { + throw new RuntimeException("unimplemented"); + } + @Override public int deleteScheduledExecutions(int maxRetainSecs) { return objectStore.deleteScheduledExecutions(maxRetainSecs); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp index da29d875f0..58d103b020 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -61311,6 +61311,224 @@ uint32_t ThriftHiveMetastore_get_scheduled_query_presult::read(::apache::thrift: } +ThriftHiveMetastore_get_repl_scheduled_queries_args::~ThriftHiveMetastore_get_repl_scheduled_queries_args() noexcept { +} + + +uint32_t ThriftHiveMetastore_get_repl_scheduled_queries_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*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; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_repl_scheduled_queries_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_repl_scheduled_queries_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_repl_scheduled_queries_pargs::~ThriftHiveMetastore_get_repl_scheduled_queries_pargs() noexcept { +} + + +uint32_t ThriftHiveMetastore_get_repl_scheduled_queries_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_repl_scheduled_queries_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_repl_scheduled_queries_result::~ThriftHiveMetastore_get_repl_scheduled_queries_result() noexcept { +} + + +uint32_t ThriftHiveMetastore_get_repl_scheduled_queries_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size2466; + ::apache::thrift::protocol::TType _etype2469; + xfer += iprot->readListBegin(_etype2469, _size2466); + this->success.resize(_size2466); + uint32_t _i2470; + for (_i2470 = 0; _i2470 < _size2466; ++_i2470) + { + xfer += this->success[_i2470].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_repl_scheduled_queries_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_repl_scheduled_queries_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter2471; + for (_iter2471 = this->success.begin(); _iter2471 != this->success.end(); ++_iter2471) + { + xfer += (*_iter2471).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_repl_scheduled_queries_presult::~ThriftHiveMetastore_get_repl_scheduled_queries_presult() noexcept { +} + + +uint32_t ThriftHiveMetastore_get_repl_scheduled_queries_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size2472; + ::apache::thrift::protocol::TType _etype2475; + xfer += iprot->readListBegin(_etype2475, _size2472); + (*(this->success)).resize(_size2472); + uint32_t _i2476; + for (_i2476 = 0; _i2476 < _size2472; ++_i2476) + { + xfer += (*(this->success))[_i2476].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + ThriftHiveMetastore_add_replication_metrics_args::~ThriftHiveMetastore_add_replication_metrics_args() noexcept { } @@ -62621,14 +62839,14 @@ uint32_t ThriftHiveMetastore_get_all_stored_procedures_result::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size2466; - ::apache::thrift::protocol::TType _etype2469; - xfer += iprot->readListBegin(_etype2469, _size2466); - this->success.resize(_size2466); - uint32_t _i2470; - for (_i2470 = 0; _i2470 < _size2466; ++_i2470) + uint32_t _size2477; + ::apache::thrift::protocol::TType _etype2480; + xfer += iprot->readListBegin(_etype2480, _size2477); + this->success.resize(_size2477); + uint32_t _i2481; + for (_i2481 = 0; _i2481 < _size2477; ++_i2481) { - xfer += iprot->readString(this->success[_i2470]); + xfer += iprot->readString(this->success[_i2481]); } xfer += iprot->readListEnd(); } @@ -62667,10 +62885,10 @@ uint32_t ThriftHiveMetastore_get_all_stored_procedures_result::write(::apache::t xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter2471; - for (_iter2471 = this->success.begin(); _iter2471 != this->success.end(); ++_iter2471) + std::vector ::const_iterator _iter2482; + for (_iter2482 = this->success.begin(); _iter2482 != this->success.end(); ++_iter2482) { - xfer += oprot->writeString((*_iter2471)); + xfer += oprot->writeString((*_iter2482)); } xfer += oprot->writeListEnd(); } @@ -62715,14 +62933,14 @@ uint32_t ThriftHiveMetastore_get_all_stored_procedures_presult::read(::apache::t if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size2472; - ::apache::thrift::protocol::TType _etype2475; - xfer += iprot->readListBegin(_etype2475, _size2472); - (*(this->success)).resize(_size2472); - uint32_t _i2476; - for (_i2476 = 0; _i2476 < _size2472; ++_i2476) + uint32_t _size2483; + ::apache::thrift::protocol::TType _etype2486; + xfer += iprot->readListBegin(_etype2486, _size2483); + (*(this->success)).resize(_size2483); + uint32_t _i2487; + for (_i2487 = 0; _i2487 < _size2483; ++_i2487) { - xfer += iprot->readString((*(this->success))[_i2476]); + xfer += iprot->readString((*(this->success))[_i2487]); } xfer += iprot->readListEnd(); } @@ -63274,14 +63492,14 @@ uint32_t ThriftHiveMetastore_get_all_packages_result::read(::apache::thrift::pro if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size2477; - ::apache::thrift::protocol::TType _etype2480; - xfer += iprot->readListBegin(_etype2480, _size2477); - this->success.resize(_size2477); - uint32_t _i2481; - for (_i2481 = 0; _i2481 < _size2477; ++_i2481) + uint32_t _size2488; + ::apache::thrift::protocol::TType _etype2491; + xfer += iprot->readListBegin(_etype2491, _size2488); + this->success.resize(_size2488); + uint32_t _i2492; + for (_i2492 = 0; _i2492 < _size2488; ++_i2492) { - xfer += iprot->readString(this->success[_i2481]); + xfer += iprot->readString(this->success[_i2492]); } xfer += iprot->readListEnd(); } @@ -63320,10 +63538,10 @@ uint32_t ThriftHiveMetastore_get_all_packages_result::write(::apache::thrift::pr xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter2482; - for (_iter2482 = this->success.begin(); _iter2482 != this->success.end(); ++_iter2482) + std::vector ::const_iterator _iter2493; + for (_iter2493 = this->success.begin(); _iter2493 != this->success.end(); ++_iter2493) { - xfer += oprot->writeString((*_iter2482)); + xfer += oprot->writeString((*_iter2493)); } xfer += oprot->writeListEnd(); } @@ -63368,14 +63586,14 @@ uint32_t ThriftHiveMetastore_get_all_packages_presult::read(::apache::thrift::pr if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size2483; - ::apache::thrift::protocol::TType _etype2486; - xfer += iprot->readListBegin(_etype2486, _size2483); - (*(this->success)).resize(_size2483); - uint32_t _i2487; - for (_i2487 = 0; _i2487 < _size2483; ++_i2487) + uint32_t _size2494; + ::apache::thrift::protocol::TType _etype2497; + xfer += iprot->readListBegin(_etype2497, _size2494); + (*(this->success)).resize(_size2494); + uint32_t _i2498; + for (_i2498 = 0; _i2498 < _size2494; ++_i2498) { - xfer += iprot->readString((*(this->success))[_i2487]); + xfer += iprot->readString((*(this->success))[_i2498]); } xfer += iprot->readListEnd(); } @@ -63700,14 +63918,14 @@ uint32_t ThriftHiveMetastore_get_all_write_event_info_result::read(::apache::thr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size2488; - ::apache::thrift::protocol::TType _etype2491; - xfer += iprot->readListBegin(_etype2491, _size2488); - this->success.resize(_size2488); - uint32_t _i2492; - for (_i2492 = 0; _i2492 < _size2488; ++_i2492) + uint32_t _size2499; + ::apache::thrift::protocol::TType _etype2502; + xfer += iprot->readListBegin(_etype2502, _size2499); + this->success.resize(_size2499); + uint32_t _i2503; + for (_i2503 = 0; _i2503 < _size2499; ++_i2503) { - xfer += this->success[_i2492].read(iprot); + xfer += this->success[_i2503].read(iprot); } xfer += iprot->readListEnd(); } @@ -63746,10 +63964,10 @@ uint32_t ThriftHiveMetastore_get_all_write_event_info_result::write(::apache::th xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter2493; - for (_iter2493 = this->success.begin(); _iter2493 != this->success.end(); ++_iter2493) + std::vector ::const_iterator _iter2504; + for (_iter2504 = this->success.begin(); _iter2504 != this->success.end(); ++_iter2504) { - xfer += (*_iter2493).write(oprot); + xfer += (*_iter2504).write(oprot); } xfer += oprot->writeListEnd(); } @@ -63794,14 +64012,14 @@ uint32_t ThriftHiveMetastore_get_all_write_event_info_presult::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size2494; - ::apache::thrift::protocol::TType _etype2497; - xfer += iprot->readListBegin(_etype2497, _size2494); - (*(this->success)).resize(_size2494); - uint32_t _i2498; - for (_i2498 = 0; _i2498 < _size2494; ++_i2498) + uint32_t _size2505; + ::apache::thrift::protocol::TType _etype2508; + xfer += iprot->readListBegin(_etype2508, _size2505); + (*(this->success)).resize(_size2505); + uint32_t _i2509; + for (_i2509 = 0; _i2509 < _size2505; ++_i2509) { - xfer += (*(this->success))[_i2498].read(iprot); + xfer += (*(this->success))[_i2509].read(iprot); } xfer += iprot->readListEnd(); } @@ -80047,6 +80265,66 @@ void ThriftHiveMetastoreClient::recv_get_scheduled_query(ScheduledQuery& _return throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_scheduled_query failed: unknown result"); } +void ThriftHiveMetastoreClient::get_repl_scheduled_queries(std::vector & _return) +{ + send_get_repl_scheduled_queries(); + recv_get_repl_scheduled_queries(_return); +} + +void ThriftHiveMetastoreClient::send_get_repl_scheduled_queries() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_repl_scheduled_queries", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_repl_scheduled_queries_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_repl_scheduled_queries(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_repl_scheduled_queries") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_repl_scheduled_queries_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_repl_scheduled_queries failed: unknown result"); +} + void ThriftHiveMetastoreClient::add_replication_metrics(const ReplicationMetricList& replicationMetricList) { send_add_replication_metrics(replicationMetricList); @@ -96066,6 +96344,63 @@ void ThriftHiveMetastoreProcessor::process_get_scheduled_query(int32_t seqid, :: } } +void ThriftHiveMetastoreProcessor::process_get_repl_scheduled_queries(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_repl_scheduled_queries", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_repl_scheduled_queries"); + + if (this->eventHandler_.get() != nullptr) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_repl_scheduled_queries"); + } + + ThriftHiveMetastore_get_repl_scheduled_queries_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != nullptr) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_repl_scheduled_queries", bytes); + } + + ThriftHiveMetastore_get_repl_scheduled_queries_result result; + try { + iface_->get_repl_scheduled_queries(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = std::move(o1); + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != nullptr) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_repl_scheduled_queries"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_repl_scheduled_queries", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != nullptr) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_repl_scheduled_queries"); + } + + oprot->writeMessageBegin("get_repl_scheduled_queries", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != nullptr) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_repl_scheduled_queries", bytes); + } +} + void ThriftHiveMetastoreProcessor::process_add_replication_metrics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = nullptr; @@ -120091,6 +120426,93 @@ void ThriftHiveMetastoreConcurrentClient::recv_get_scheduled_query(ScheduledQuer } // end while(true) } +void ThriftHiveMetastoreConcurrentClient::get_repl_scheduled_queries(std::vector & _return) +{ + int32_t seqid = send_get_repl_scheduled_queries(); + recv_get_repl_scheduled_queries(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_repl_scheduled_queries() +{ + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); + oprot_->writeMessageBegin("get_repl_scheduled_queries", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_repl_scheduled_queries_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_repl_scheduled_queries(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); + + while(true) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_repl_scheduled_queries") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_repl_scheduled_queries_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_repl_scheduled_queries failed: unknown result"); + } + // seqid != rseqid + this->sync_->updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_->waitForWork(seqid); + } // end while(true) +} + void ThriftHiveMetastoreConcurrentClient::add_replication_metrics(const ReplicationMetricList& replicationMetricList) { int32_t seqid = send_add_replication_metrics(replicationMetricList); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index 8f9f1388b6..dbdff92433 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -284,6 +284,7 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService virtual void scheduled_query_maintenance(const ScheduledQueryMaintenanceRequest& request) = 0; virtual void scheduled_query_progress(const ScheduledQueryProgressInfo& info) = 0; virtual void get_scheduled_query(ScheduledQuery& _return, const ScheduledQueryKey& scheduleKey) = 0; + virtual void get_repl_scheduled_queries(std::vector & _return) = 0; virtual void add_replication_metrics(const ReplicationMetricList& replicationMetricList) = 0; virtual void get_replication_metrics(ReplicationMetricList& _return, const GetReplicationMetricsRequest& rqst) = 0; virtual void get_open_txns_req(GetOpenTxnsResponse& _return, const GetOpenTxnsRequest& getOpenTxnsRequest) = 0; @@ -1129,6 +1130,9 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p void get_scheduled_query(ScheduledQuery& /* _return */, const ScheduledQueryKey& /* scheduleKey */) override { return; } + void get_repl_scheduled_queries(std::vector & /* _return */) override { + return; + } void add_replication_metrics(const ReplicationMetricList& /* replicationMetricList */) override { return; } @@ -32641,6 +32645,106 @@ class ThriftHiveMetastore_get_scheduled_query_presult { }; + +class ThriftHiveMetastore_get_repl_scheduled_queries_args { + public: + + ThriftHiveMetastore_get_repl_scheduled_queries_args(const ThriftHiveMetastore_get_repl_scheduled_queries_args&) noexcept; + ThriftHiveMetastore_get_repl_scheduled_queries_args& operator=(const ThriftHiveMetastore_get_repl_scheduled_queries_args&) noexcept; + ThriftHiveMetastore_get_repl_scheduled_queries_args() noexcept { + } + + virtual ~ThriftHiveMetastore_get_repl_scheduled_queries_args() noexcept; + + bool operator == (const ThriftHiveMetastore_get_repl_scheduled_queries_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_repl_scheduled_queries_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_repl_scheduled_queries_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_repl_scheduled_queries_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_repl_scheduled_queries_pargs() noexcept; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_repl_scheduled_queries_result__isset { + _ThriftHiveMetastore_get_repl_scheduled_queries_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_repl_scheduled_queries_result__isset; + +class ThriftHiveMetastore_get_repl_scheduled_queries_result { + public: + + ThriftHiveMetastore_get_repl_scheduled_queries_result(const ThriftHiveMetastore_get_repl_scheduled_queries_result&); + ThriftHiveMetastore_get_repl_scheduled_queries_result& operator=(const ThriftHiveMetastore_get_repl_scheduled_queries_result&); + ThriftHiveMetastore_get_repl_scheduled_queries_result() noexcept { + } + + virtual ~ThriftHiveMetastore_get_repl_scheduled_queries_result() noexcept; + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_repl_scheduled_queries_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_repl_scheduled_queries_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_repl_scheduled_queries_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_repl_scheduled_queries_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_repl_scheduled_queries_presult__isset { + _ThriftHiveMetastore_get_repl_scheduled_queries_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_repl_scheduled_queries_presult__isset; + +class ThriftHiveMetastore_get_repl_scheduled_queries_presult { + public: + + + virtual ~ThriftHiveMetastore_get_repl_scheduled_queries_presult() noexcept; + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_repl_scheduled_queries_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_add_replication_metrics_args__isset { _ThriftHiveMetastore_add_replication_metrics_args__isset() : replicationMetricList(false) {} bool replicationMetricList :1; @@ -34746,6 +34850,9 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public void get_scheduled_query(ScheduledQuery& _return, const ScheduledQueryKey& scheduleKey) override; void send_get_scheduled_query(const ScheduledQueryKey& scheduleKey); void recv_get_scheduled_query(ScheduledQuery& _return); + void get_repl_scheduled_queries(std::vector & _return) override; + void send_get_repl_scheduled_queries(); + void recv_get_repl_scheduled_queries(std::vector & _return); void add_replication_metrics(const ReplicationMetricList& replicationMetricList) override; void send_add_replication_metrics(const ReplicationMetricList& replicationMetricList); void recv_add_replication_metrics(); @@ -35050,6 +35157,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP void process_scheduled_query_maintenance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_scheduled_query_progress(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_scheduled_query(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_repl_scheduled_queries(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_add_replication_metrics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_replication_metrics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_open_txns_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -35324,6 +35432,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP processMap_["scheduled_query_maintenance"] = &ThriftHiveMetastoreProcessor::process_scheduled_query_maintenance; processMap_["scheduled_query_progress"] = &ThriftHiveMetastoreProcessor::process_scheduled_query_progress; processMap_["get_scheduled_query"] = &ThriftHiveMetastoreProcessor::process_get_scheduled_query; + processMap_["get_repl_scheduled_queries"] = &ThriftHiveMetastoreProcessor::process_get_repl_scheduled_queries; processMap_["add_replication_metrics"] = &ThriftHiveMetastoreProcessor::process_add_replication_metrics; processMap_["get_replication_metrics"] = &ThriftHiveMetastoreProcessor::process_get_replication_metrics; processMap_["get_open_txns_req"] = &ThriftHiveMetastoreProcessor::process_get_open_txns_req; @@ -37849,6 +37958,16 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi return; } + void get_repl_scheduled_queries(std::vector & _return) override { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_repl_scheduled_queries(_return); + } + ifaces_[i]->get_repl_scheduled_queries(_return); + return; + } + void add_replication_metrics(const ReplicationMetricList& replicationMetricList) override { size_t sz = ifaces_.size(); size_t i = 0; @@ -38754,6 +38873,9 @@ class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf void get_scheduled_query(ScheduledQuery& _return, const ScheduledQueryKey& scheduleKey) override; int32_t send_get_scheduled_query(const ScheduledQueryKey& scheduleKey); void recv_get_scheduled_query(ScheduledQuery& _return, const int32_t seqid); + void get_repl_scheduled_queries(std::vector & _return) override; + int32_t send_get_repl_scheduled_queries(); + void recv_get_repl_scheduled_queries(std::vector & _return, const int32_t seqid); void add_replication_metrics(const ReplicationMetricList& replicationMetricList) override; int32_t send_add_replication_metrics(const ReplicationMetricList& replicationMetricList); void recv_add_replication_metrics(const int32_t seqid); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp index 0fe4392e91..11dddcd627 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -1310,6 +1310,11 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { printf("get_scheduled_query\n"); } + void get_repl_scheduled_queries(std::vector & _return) { + // Your implementation goes here + printf("get_repl_scheduled_queries\n"); + } + void add_replication_metrics(const ReplicationMetricList& replicationMetricList) { // Your implementation goes here printf("add_replication_metrics\n"); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index 4119a188e0..4550d54fff 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -531,6 +531,8 @@ public ScheduledQuery get_scheduled_query(ScheduledQueryKey scheduleKey) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + public java.util.List get_repl_scheduled_queries() throws MetaException, org.apache.thrift.TException; + public void add_replication_metrics(ReplicationMetricList replicationMetricList) throws MetaException, org.apache.thrift.TException; public ReplicationMetricList get_replication_metrics(GetReplicationMetricsRequest rqst) throws MetaException, org.apache.thrift.TException; @@ -1075,6 +1077,8 @@ public void get_scheduled_query(ScheduledQueryKey scheduleKey, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void get_repl_scheduled_queries(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; + public void add_replication_metrics(ReplicationMetricList replicationMetricList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_replication_metrics(GetReplicationMetricsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -8448,6 +8452,31 @@ public ScheduledQuery recv_get_scheduled_query() throws MetaException, NoSuchObj throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_scheduled_query failed: unknown result"); } + public java.util.List get_repl_scheduled_queries() throws MetaException, org.apache.thrift.TException + { + send_get_repl_scheduled_queries(); + return recv_get_repl_scheduled_queries(); + } + + public void send_get_repl_scheduled_queries() throws org.apache.thrift.TException + { + get_repl_scheduled_queries_args args = new get_repl_scheduled_queries_args(); + sendBase("get_repl_scheduled_queries", args); + } + + public java.util.List recv_get_repl_scheduled_queries() throws MetaException, org.apache.thrift.TException + { + get_repl_scheduled_queries_result result = new get_repl_scheduled_queries_result(); + receiveBase(result, "get_repl_scheduled_queries"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_repl_scheduled_queries failed: unknown result"); + } + public void add_replication_metrics(ReplicationMetricList replicationMetricList) throws MetaException, org.apache.thrift.TException { send_add_replication_metrics(replicationMetricList); @@ -17532,6 +17561,35 @@ public ScheduledQuery getResult() throws MetaException, NoSuchObjectException, o } } + public void get_repl_scheduled_queries(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_repl_scheduled_queries_call method_call = new get_repl_scheduled_queries_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_repl_scheduled_queries_call extends org.apache.thrift.async.TAsyncMethodCall> { + public get_repl_scheduled_queries_call(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); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_repl_scheduled_queries", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_repl_scheduled_queries_args args = new get_repl_scheduled_queries_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public java.util.List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_repl_scheduled_queries(); + } + } + public void add_replication_metrics(ReplicationMetricList replicationMetricList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_replication_metrics_call method_call = new add_replication_metrics_call(replicationMetricList, resultHandler, this, ___protocolFactory, ___transport); @@ -18187,6 +18245,7 @@ protected Processor(I iface, java.util.Map extends org.apache.thrift.ProcessFunction { + public get_repl_scheduled_queries() { + super("get_repl_scheduled_queries"); + } + + public get_repl_scheduled_queries_args getEmptyArgsInstance() { + return new get_repl_scheduled_queries_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + public get_repl_scheduled_queries_result getResult(I iface, get_repl_scheduled_queries_args args) throws org.apache.thrift.TException { + get_repl_scheduled_queries_result result = new get_repl_scheduled_queries_result(); + try { + result.success = iface.get_repl_scheduled_queries(); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_replication_metrics extends org.apache.thrift.ProcessFunction { public add_replication_metrics() { super("add_replication_metrics"); @@ -26707,6 +26795,7 @@ protected AsyncProcessor(I iface, java.util.Map extends org.apache.thrift.AsyncProcessFunction> { + public get_repl_scheduled_queries() { + super("get_repl_scheduled_queries"); + } + + public get_repl_scheduled_queries_args getEmptyArgsInstance() { + return new get_repl_scheduled_queries_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback>() { + public void onComplete(java.util.List o) { + get_repl_scheduled_queries_result result = new get_repl_scheduled_queries_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + get_repl_scheduled_queries_result result = new get_repl_scheduled_queries_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } else if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_repl_scheduled_queries_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { + iface.get_repl_scheduled_queries(resultHandler); + } + } + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_replication_metrics extends org.apache.thrift.AsyncProcessFunction { public add_replication_metrics() { super("add_replication_metrics"); @@ -297945,19 +298099,17 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_scheduled_query_ } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_replication_metrics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_replication_metrics_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_repl_scheduled_queries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_repl_scheduled_queries_args"); - private static final org.apache.thrift.protocol.TField REPLICATION_METRIC_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("replicationMetricList", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_replication_metrics_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_replication_metrics_argsTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_repl_scheduled_queries_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_repl_scheduled_queries_argsTupleSchemeFactory(); - private @org.apache.thrift.annotation.Nullable ReplicationMetricList replicationMetricList; // 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 { - REPLICATION_METRIC_LIST((short)1, "replicationMetricList"); +; private static final java.util.Map byName = new java.util.HashMap(); @@ -297973,8 +298125,6 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_scheduled_query_ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // REPLICATION_METRIC_LIST - return REPLICATION_METRIC_LIST; default: return null; } @@ -298014,88 +298164,38 @@ public short getThriftFieldId() { return _fieldName; } } - - // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.REPLICATION_METRIC_LIST, new org.apache.thrift.meta_data.FieldMetaData("replicationMetricList", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ReplicationMetricList.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_replication_metrics_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_repl_scheduled_queries_args.class, metaDataMap); } - public add_replication_metrics_args() { - } - - public add_replication_metrics_args( - ReplicationMetricList replicationMetricList) - { - this(); - this.replicationMetricList = replicationMetricList; + public get_repl_scheduled_queries_args() { } /** * Performs a deep copy on other. */ - public add_replication_metrics_args(add_replication_metrics_args other) { - if (other.isSetReplicationMetricList()) { - this.replicationMetricList = new ReplicationMetricList(other.replicationMetricList); - } + public get_repl_scheduled_queries_args(get_repl_scheduled_queries_args other) { } - public add_replication_metrics_args deepCopy() { - return new add_replication_metrics_args(this); + public get_repl_scheduled_queries_args deepCopy() { + return new get_repl_scheduled_queries_args(this); } @Override public void clear() { - this.replicationMetricList = null; - } - - @org.apache.thrift.annotation.Nullable - public ReplicationMetricList getReplicationMetricList() { - return this.replicationMetricList; - } - - public void setReplicationMetricList(@org.apache.thrift.annotation.Nullable ReplicationMetricList replicationMetricList) { - this.replicationMetricList = replicationMetricList; - } - - public void unsetReplicationMetricList() { - this.replicationMetricList = null; - } - - /** Returns true if field replicationMetricList is set (has been assigned a value) and false otherwise */ - public boolean isSetReplicationMetricList() { - return this.replicationMetricList != null; - } - - public void setReplicationMetricListIsSet(boolean value) { - if (!value) { - this.replicationMetricList = null; - } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { - case REPLICATION_METRIC_LIST: - if (value == null) { - unsetReplicationMetricList(); - } else { - setReplicationMetricList((ReplicationMetricList)value); - } - break; - } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { - case REPLICATION_METRIC_LIST: - return getReplicationMetricList(); - } throw new java.lang.IllegalStateException(); } @@ -298107,34 +298207,23 @@ public boolean isSet(_Fields field) { } switch (field) { - case REPLICATION_METRIC_LIST: - return isSetReplicationMetricList(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { - if (that instanceof add_replication_metrics_args) - return this.equals((add_replication_metrics_args)that); + if (that instanceof get_repl_scheduled_queries_args) + return this.equals((get_repl_scheduled_queries_args)that); return false; } - public boolean equals(add_replication_metrics_args that) { + public boolean equals(get_repl_scheduled_queries_args that) { if (that == null) return false; if (this == that) return true; - boolean this_present_replicationMetricList = true && this.isSetReplicationMetricList(); - boolean that_present_replicationMetricList = true && that.isSetReplicationMetricList(); - if (this_present_replicationMetricList || that_present_replicationMetricList) { - if (!(this_present_replicationMetricList && that_present_replicationMetricList)) - return false; - if (!this.replicationMetricList.equals(that.replicationMetricList)) - return false; - } - return true; } @@ -298142,31 +298231,17 @@ public boolean equals(add_replication_metrics_args that) { public int hashCode() { int hashCode = 1; - hashCode = hashCode * 8191 + ((isSetReplicationMetricList()) ? 131071 : 524287); - if (isSetReplicationMetricList()) - hashCode = hashCode * 8191 + replicationMetricList.hashCode(); - return hashCode; } @Override - public int compareTo(add_replication_metrics_args other) { + public int compareTo(get_repl_scheduled_queries_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = java.lang.Boolean.compare(isSetReplicationMetricList(), other.isSetReplicationMetricList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReplicationMetricList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicationMetricList, other.replicationMetricList); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -298185,16 +298260,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("add_replication_metrics_args("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("get_repl_scheduled_queries_args("); boolean first = true; - sb.append("replicationMetricList:"); - if (this.replicationMetricList == null) { - sb.append("null"); - } else { - sb.append(this.replicationMetricList); - } - first = false; sb.append(")"); return sb.toString(); } @@ -298202,9 +298270,6 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (replicationMetricList != null) { - replicationMetricList.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -298223,15 +298288,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class add_replication_metrics_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public add_replication_metrics_argsStandardScheme getScheme() { - return new add_replication_metrics_argsStandardScheme(); + private static class get_repl_scheduled_queries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_repl_scheduled_queries_argsStandardScheme getScheme() { + return new get_repl_scheduled_queries_argsStandardScheme(); } } - private static class add_replication_metrics_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + private static class get_repl_scheduled_queries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_metrics_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, get_repl_scheduled_queries_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -298241,15 +298306,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_met break; } switch (schemeField.id) { - case 1: // REPLICATION_METRIC_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.replicationMetricList = new ReplicationMetricList(); - struct.replicationMetricList.read(iprot); - struct.setReplicationMetricListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -298259,51 +298315,32 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_met struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, add_replication_metrics_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, get_repl_scheduled_queries_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.replicationMetricList != null) { - oprot.writeFieldBegin(REPLICATION_METRIC_LIST_FIELD_DESC); - struct.replicationMetricList.write(oprot); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class add_replication_metrics_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public add_replication_metrics_argsTupleScheme getScheme() { - return new add_replication_metrics_argsTupleScheme(); + private static class get_repl_scheduled_queries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_repl_scheduled_queries_argsTupleScheme getScheme() { + return new get_repl_scheduled_queries_argsTupleScheme(); } } - private static class add_replication_metrics_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + private static class get_repl_scheduled_queries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, get_repl_scheduled_queries_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReplicationMetricList()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReplicationMetricList()) { - struct.replicationMetricList.write(oprot); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, get_repl_scheduled_queries_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.replicationMetricList = new ReplicationMetricList(); - struct.replicationMetricList.read(iprot); - struct.setReplicationMetricListIsSet(true); - } } } @@ -298312,18 +298349,21 @@ public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metr } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_replication_metrics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_replication_metrics_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_repl_scheduled_queries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_repl_scheduled_queries_result"); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_replication_metrics_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_replication_metrics_resultTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_repl_scheduled_queries_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_repl_scheduled_queries_resultTupleSchemeFactory(); + private @org.apache.thrift.annotation.Nullable java.util.List success; // required private @org.apache.thrift.annotation.Nullable MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), O1((short)1, "o1"); private static final java.util.Map byName = new java.util.HashMap(); @@ -298340,6 +298380,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metr @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; case 1: // O1 return O1; default: @@ -298386,40 +298428,93 @@ public short getThriftFieldId() { public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ScheduledQuery.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_replication_metrics_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_repl_scheduled_queries_result.class, metaDataMap); } - public add_replication_metrics_result() { + public get_repl_scheduled_queries_result() { } - public add_replication_metrics_result( + public get_repl_scheduled_queries_result( + java.util.List success, MetaException o1) { this(); + this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ - public add_replication_metrics_result(add_replication_metrics_result other) { + public get_repl_scheduled_queries_result(get_repl_scheduled_queries_result other) { + if (other.isSetSuccess()) { + java.util.List __this__success = new java.util.ArrayList(other.success.size()); + for (ScheduledQuery other_element : other.success) { + __this__success.add(new ScheduledQuery(other_element)); + } + this.success = __this__success; + } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } - public add_replication_metrics_result deepCopy() { - return new add_replication_metrics_result(this); + public get_repl_scheduled_queries_result deepCopy() { + return new get_repl_scheduled_queries_result(this); } @Override public void clear() { + this.success = null; this.o1 = null; } + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(ScheduledQuery elem) { + if (this.success == null) { + this.success = new java.util.ArrayList(); + } + this.success.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getSuccess() { + return this.success; + } + + public void setSuccess(@org.apache.thrift.annotation.Nullable java.util.List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + @org.apache.thrift.annotation.Nullable public MetaException getO1() { return this.o1; @@ -298446,6 +298541,14 @@ public void setO1IsSet(boolean value) { public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((java.util.List)value); + } + break; + case O1: if (value == null) { unsetO1(); @@ -298460,6 +298563,9 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); @@ -298474,6 +298580,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); } @@ -298482,17 +298590,26 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that instanceof add_replication_metrics_result) - return this.equals((add_replication_metrics_result)that); + if (that instanceof get_repl_scheduled_queries_result) + return this.equals((get_repl_scheduled_queries_result)that); return false; } - public boolean equals(add_replication_metrics_result that) { + public boolean equals(get_repl_scheduled_queries_result that) { if (that == null) return false; if (this == that) return true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { @@ -298509,6 +298626,10 @@ public boolean equals(add_replication_metrics_result that) { public int hashCode() { int hashCode = 1; + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287); if (isSetO1()) hashCode = hashCode * 8191 + o1.hashCode(); @@ -298517,13 +298638,23 @@ public int hashCode() { } @Override - public int compareTo(add_replication_metrics_result other) { + public int compareTo(get_repl_scheduled_queries_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = java.lang.Boolean.compare(isSetO1(), other.isSetO1()); if (lastComparison != 0) { return lastComparison; @@ -298552,9 +298683,17 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("add_replication_metrics_result("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("get_repl_scheduled_queries_result("); boolean first = true; + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); @@ -298587,15 +298726,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class add_replication_metrics_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public add_replication_metrics_resultStandardScheme getScheme() { - return new add_replication_metrics_resultStandardScheme(); + private static class get_repl_scheduled_queries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_repl_scheduled_queries_resultStandardScheme getScheme() { + return new get_repl_scheduled_queries_resultStandardScheme(); } } - private static class add_replication_metrics_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + private static class get_repl_scheduled_queries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_metrics_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, get_repl_scheduled_queries_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -298605,6 +298744,25 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_met break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list2034 = iprot.readListBegin(); + struct.success = new java.util.ArrayList(_list2034.size); + @org.apache.thrift.annotation.Nullable ScheduledQuery _elem2035; + for (int _i2036 = 0; _i2036 < _list2034.size; ++_i2036) + { + _elem2035 = new ScheduledQuery(); + _elem2035.read(iprot); + struct.success.add(_elem2035); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); @@ -298623,10 +298781,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_met struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, add_replication_metrics_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, get_repl_scheduled_queries_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (ScheduledQuery _iter2037 : struct.success) + { + _iter2037.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); @@ -298638,32 +298808,58 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, add_replication_me } - private static class add_replication_metrics_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public add_replication_metrics_resultTupleScheme getScheme() { - return new add_replication_metrics_resultTupleScheme(); + private static class get_repl_scheduled_queries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_repl_scheduled_queries_resultTupleScheme getScheme() { + return new get_repl_scheduled_queries_resultTupleScheme(); } } - private static class add_replication_metrics_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + private static class get_repl_scheduled_queries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, get_repl_scheduled_queries_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetO1()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (ScheduledQuery _iter2038 : struct.success) + { + _iter2038.write(oprot); + } + } + } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, get_repl_scheduled_queries_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list2039 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.success = new java.util.ArrayList(_list2039.size); + @org.apache.thrift.annotation.Nullable ScheduledQuery _elem2040; + for (int _i2041 = 0; _i2041 < _list2039.size; ++_i2041) + { + _elem2040 = new ScheduledQuery(); + _elem2040.read(iprot); + struct.success.add(_elem2040); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); @@ -298676,19 +298872,19 @@ public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metr } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_replication_metrics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_replication_metrics_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_replication_metrics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_replication_metrics_args"); - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField REPLICATION_METRIC_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("replicationMetricList", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_replication_metrics_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_replication_metrics_argsTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_replication_metrics_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_replication_metrics_argsTupleSchemeFactory(); - private @org.apache.thrift.annotation.Nullable GetReplicationMetricsRequest rqst; // required + private @org.apache.thrift.annotation.Nullable ReplicationMetricList replicationMetricList; // 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 { - RQST((short)1, "rqst"); + REPLICATION_METRIC_LIST((short)1, "replicationMetricList"); private static final java.util.Map byName = new java.util.HashMap(); @@ -298704,8 +298900,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metr @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // RQST - return RQST; + case 1: // REPLICATION_METRIC_LIST + return REPLICATION_METRIC_LIST; default: return null; } @@ -298750,71 +298946,71 @@ public short getThriftFieldId() { public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetReplicationMetricsRequest.class))); + tmpMap.put(_Fields.REPLICATION_METRIC_LIST, new org.apache.thrift.meta_data.FieldMetaData("replicationMetricList", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ReplicationMetricList.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_replication_metrics_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_replication_metrics_args.class, metaDataMap); } - public get_replication_metrics_args() { + public add_replication_metrics_args() { } - public get_replication_metrics_args( - GetReplicationMetricsRequest rqst) + public add_replication_metrics_args( + ReplicationMetricList replicationMetricList) { this(); - this.rqst = rqst; + this.replicationMetricList = replicationMetricList; } /** * Performs a deep copy on other. */ - public get_replication_metrics_args(get_replication_metrics_args other) { - if (other.isSetRqst()) { - this.rqst = new GetReplicationMetricsRequest(other.rqst); + public add_replication_metrics_args(add_replication_metrics_args other) { + if (other.isSetReplicationMetricList()) { + this.replicationMetricList = new ReplicationMetricList(other.replicationMetricList); } } - public get_replication_metrics_args deepCopy() { - return new get_replication_metrics_args(this); + public add_replication_metrics_args deepCopy() { + return new add_replication_metrics_args(this); } @Override public void clear() { - this.rqst = null; + this.replicationMetricList = null; } @org.apache.thrift.annotation.Nullable - public GetReplicationMetricsRequest getRqst() { - return this.rqst; + public ReplicationMetricList getReplicationMetricList() { + return this.replicationMetricList; } - public void setRqst(@org.apache.thrift.annotation.Nullable GetReplicationMetricsRequest rqst) { - this.rqst = rqst; + public void setReplicationMetricList(@org.apache.thrift.annotation.Nullable ReplicationMetricList replicationMetricList) { + this.replicationMetricList = replicationMetricList; } - public void unsetRqst() { - this.rqst = null; + public void unsetReplicationMetricList() { + this.replicationMetricList = null; } - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; + /** Returns true if field replicationMetricList is set (has been assigned a value) and false otherwise */ + public boolean isSetReplicationMetricList() { + return this.replicationMetricList != null; } - public void setRqstIsSet(boolean value) { + public void setReplicationMetricListIsSet(boolean value) { if (!value) { - this.rqst = null; + this.replicationMetricList = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { - case RQST: + case REPLICATION_METRIC_LIST: if (value == null) { - unsetRqst(); + unsetReplicationMetricList(); } else { - setRqst((GetReplicationMetricsRequest)value); + setReplicationMetricList((ReplicationMetricList)value); } break; @@ -298824,8 +299020,8 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { - case RQST: - return getRqst(); + case REPLICATION_METRIC_LIST: + return getReplicationMetricList(); } throw new java.lang.IllegalStateException(); @@ -298838,31 +299034,31 @@ public boolean isSet(_Fields field) { } switch (field) { - case RQST: - return isSetRqst(); + case REPLICATION_METRIC_LIST: + return isSetReplicationMetricList(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { - if (that instanceof get_replication_metrics_args) - return this.equals((get_replication_metrics_args)that); + if (that instanceof add_replication_metrics_args) + return this.equals((add_replication_metrics_args)that); return false; } - public boolean equals(get_replication_metrics_args that) { + public boolean equals(add_replication_metrics_args that) { if (that == null) return false; if (this == that) return true; - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) + boolean this_present_replicationMetricList = true && this.isSetReplicationMetricList(); + boolean that_present_replicationMetricList = true && that.isSetReplicationMetricList(); + if (this_present_replicationMetricList || that_present_replicationMetricList) { + if (!(this_present_replicationMetricList && that_present_replicationMetricList)) return false; - if (!this.rqst.equals(that.rqst)) + if (!this.replicationMetricList.equals(that.replicationMetricList)) return false; } @@ -298873,27 +299069,27 @@ public boolean equals(get_replication_metrics_args that) { public int hashCode() { int hashCode = 1; - hashCode = hashCode * 8191 + ((isSetRqst()) ? 131071 : 524287); - if (isSetRqst()) - hashCode = hashCode * 8191 + rqst.hashCode(); + hashCode = hashCode * 8191 + ((isSetReplicationMetricList()) ? 131071 : 524287); + if (isSetReplicationMetricList()) + hashCode = hashCode * 8191 + replicationMetricList.hashCode(); return hashCode; } @Override - public int compareTo(get_replication_metrics_args other) { + public int compareTo(add_replication_metrics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = java.lang.Boolean.compare(isSetRqst(), other.isSetRqst()); + lastComparison = java.lang.Boolean.compare(isSetReplicationMetricList(), other.isSetReplicationMetricList()); if (lastComparison != 0) { return lastComparison; } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (isSetReplicationMetricList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicationMetricList, other.replicationMetricList); if (lastComparison != 0) { return lastComparison; } @@ -298916,14 +299112,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("get_replication_metrics_args("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("add_replication_metrics_args("); boolean first = true; - sb.append("rqst:"); - if (this.rqst == null) { + sb.append("replicationMetricList:"); + if (this.replicationMetricList == null) { sb.append("null"); } else { - sb.append(this.rqst); + sb.append(this.replicationMetricList); } first = false; sb.append(")"); @@ -298933,8 +299129,8 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (rqst != null) { - rqst.validate(); + if (replicationMetricList != null) { + replicationMetricList.validate(); } } @@ -298954,15 +299150,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class get_replication_metrics_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_replication_metrics_argsStandardScheme getScheme() { - return new get_replication_metrics_argsStandardScheme(); + private static class add_replication_metrics_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public add_replication_metrics_argsStandardScheme getScheme() { + return new add_replication_metrics_argsStandardScheme(); } } - private static class get_replication_metrics_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + private static class add_replication_metrics_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_metrics_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_metrics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -298972,11 +299168,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_met break; } switch (schemeField.id) { - case 1: // RQST + case 1: // REPLICATION_METRIC_LIST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new GetReplicationMetricsRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.replicationMetricList = new ReplicationMetricList(); + struct.replicationMetricList.read(iprot); + struct.setReplicationMetricListIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -298990,13 +299186,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_met struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, get_replication_metrics_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, add_replication_metrics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); + if (struct.replicationMetricList != null) { + oprot.writeFieldBegin(REPLICATION_METRIC_LIST_FIELD_DESC); + struct.replicationMetricList.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -299005,35 +299201,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_replication_me } - private static class get_replication_metrics_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_replication_metrics_argsTupleScheme getScheme() { - return new get_replication_metrics_argsTupleScheme(); + private static class add_replication_metrics_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public add_replication_metrics_argsTupleScheme getScheme() { + return new add_replication_metrics_argsTupleScheme(); } } - private static class get_replication_metrics_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + private static class add_replication_metrics_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetRqst()) { + if (struct.isSetReplicationMetricList()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); + if (struct.isSetReplicationMetricList()) { + struct.replicationMetricList.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.rqst = new GetReplicationMetricsRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.replicationMetricList = new ReplicationMetricList(); + struct.replicationMetricList.read(iprot); + struct.setReplicationMetricListIsSet(true); } } } @@ -299043,21 +299239,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metr } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_replication_metrics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_replication_metrics_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_replication_metrics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_replication_metrics_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_replication_metrics_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_replication_metrics_resultTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_replication_metrics_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_replication_metrics_resultTupleSchemeFactory(); - private @org.apache.thrift.annotation.Nullable ReplicationMetricList success; // required private @org.apache.thrift.annotation.Nullable MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), O1((short)1, "o1"); private static final java.util.Map byName = new java.util.HashMap(); @@ -299074,8 +299267,6 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metr @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // O1 return O1; default: @@ -299122,72 +299313,40 @@ public short getThriftFieldId() { public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ReplicationMetricList.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_replication_metrics_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_replication_metrics_result.class, metaDataMap); } - public get_replication_metrics_result() { + public add_replication_metrics_result() { } - public get_replication_metrics_result( - ReplicationMetricList success, + public add_replication_metrics_result( MetaException o1) { this(); - this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_replication_metrics_result(get_replication_metrics_result other) { - if (other.isSetSuccess()) { - this.success = new ReplicationMetricList(other.success); - } + public add_replication_metrics_result(add_replication_metrics_result other) { if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } - public get_replication_metrics_result deepCopy() { - return new get_replication_metrics_result(this); + public add_replication_metrics_result deepCopy() { + return new add_replication_metrics_result(this); } @Override public void clear() { - this.success = null; this.o1 = null; } - @org.apache.thrift.annotation.Nullable - public ReplicationMetricList getSuccess() { - return this.success; - } - - public void setSuccess(@org.apache.thrift.annotation.Nullable ReplicationMetricList success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - @org.apache.thrift.annotation.Nullable public MetaException getO1() { return this.o1; @@ -299214,14 +299373,6 @@ public void setO1IsSet(boolean value) { public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ReplicationMetricList)value); - } - break; - case O1: if (value == null) { unsetO1(); @@ -299236,9 +299387,6 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - case O1: return getO1(); @@ -299253,8 +299401,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); case O1: return isSetO1(); } @@ -299263,26 +299409,17 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that instanceof get_replication_metrics_result) - return this.equals((get_replication_metrics_result)that); + if (that instanceof add_replication_metrics_result) + return this.equals((add_replication_metrics_result)that); return false; } - public boolean equals(get_replication_metrics_result that) { + public boolean equals(add_replication_metrics_result that) { if (that == null) return false; if (this == that) return true; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { @@ -299299,10 +299436,6 @@ public boolean equals(get_replication_metrics_result that) { public int hashCode() { int hashCode = 1; - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287); if (isSetO1()) hashCode = hashCode * 8191 + o1.hashCode(); @@ -299311,23 +299444,13 @@ public int hashCode() { } @Override - public int compareTo(get_replication_metrics_result other) { + public int compareTo(add_replication_metrics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = java.lang.Boolean.compare(isSetO1(), other.isSetO1()); if (lastComparison != 0) { return lastComparison; @@ -299356,17 +299479,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("get_replication_metrics_result("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("add_replication_metrics_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); @@ -299381,9 +299496,6 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -299402,15 +299514,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class get_replication_metrics_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_replication_metrics_resultStandardScheme getScheme() { - return new get_replication_metrics_resultStandardScheme(); + private static class add_replication_metrics_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public add_replication_metrics_resultStandardScheme getScheme() { + return new add_replication_metrics_resultStandardScheme(); } } - private static class get_replication_metrics_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + private static class add_replication_metrics_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_metrics_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, add_replication_metrics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -299420,15 +299532,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_met break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new ReplicationMetricList(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); @@ -299447,15 +299550,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_met struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, get_replication_metrics_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, add_replication_metrics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); @@ -299467,43 +299565,32 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_replication_me } - private static class get_replication_metrics_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_replication_metrics_resultTupleScheme getScheme() { - return new get_replication_metrics_resultTupleScheme(); + private static class add_replication_metrics_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public add_replication_metrics_resultTupleScheme getScheme() { + return new add_replication_metrics_resultTupleScheme(); } } - private static class get_replication_metrics_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + private static class add_replication_metrics_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } if (struct.isSetO1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); + optionals.set(0); } + oprot.writeBitSet(optionals, 1); if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, add_replication_metrics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new ReplicationMetricList(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); @@ -299516,19 +299603,19 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metr } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_open_txns_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_req_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_replication_metrics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_replication_metrics_args"); - private static final org.apache.thrift.protocol.TField GET_OPEN_TXNS_REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("getOpenTxnsRequest", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_open_txns_req_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_open_txns_req_argsTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_replication_metrics_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_replication_metrics_argsTupleSchemeFactory(); - private @org.apache.thrift.annotation.Nullable GetOpenTxnsRequest getOpenTxnsRequest; // required + private @org.apache.thrift.annotation.Nullable GetReplicationMetricsRequest rqst; // 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 { - GET_OPEN_TXNS_REQUEST((short)1, "getOpenTxnsRequest"); + RQST((short)1, "rqst"); private static final java.util.Map byName = new java.util.HashMap(); @@ -299544,8 +299631,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metr @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // GET_OPEN_TXNS_REQUEST - return GET_OPEN_TXNS_REQUEST; + case 1: // RQST + return RQST; default: return null; } @@ -299590,71 +299677,71 @@ public short getThriftFieldId() { public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.GET_OPEN_TXNS_REQUEST, new org.apache.thrift.meta_data.FieldMetaData("getOpenTxnsRequest", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsRequest.class))); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetReplicationMetricsRequest.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_req_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_replication_metrics_args.class, metaDataMap); } - public get_open_txns_req_args() { + public get_replication_metrics_args() { } - public get_open_txns_req_args( - GetOpenTxnsRequest getOpenTxnsRequest) + public get_replication_metrics_args( + GetReplicationMetricsRequest rqst) { this(); - this.getOpenTxnsRequest = getOpenTxnsRequest; + this.rqst = rqst; } /** * Performs a deep copy on other. */ - public get_open_txns_req_args(get_open_txns_req_args other) { - if (other.isSetGetOpenTxnsRequest()) { - this.getOpenTxnsRequest = new GetOpenTxnsRequest(other.getOpenTxnsRequest); + public get_replication_metrics_args(get_replication_metrics_args other) { + if (other.isSetRqst()) { + this.rqst = new GetReplicationMetricsRequest(other.rqst); } } - public get_open_txns_req_args deepCopy() { - return new get_open_txns_req_args(this); + public get_replication_metrics_args deepCopy() { + return new get_replication_metrics_args(this); } @Override public void clear() { - this.getOpenTxnsRequest = null; + this.rqst = null; } @org.apache.thrift.annotation.Nullable - public GetOpenTxnsRequest getGetOpenTxnsRequest() { - return this.getOpenTxnsRequest; + public GetReplicationMetricsRequest getRqst() { + return this.rqst; } - public void setGetOpenTxnsRequest(@org.apache.thrift.annotation.Nullable GetOpenTxnsRequest getOpenTxnsRequest) { - this.getOpenTxnsRequest = getOpenTxnsRequest; + public void setRqst(@org.apache.thrift.annotation.Nullable GetReplicationMetricsRequest rqst) { + this.rqst = rqst; } - public void unsetGetOpenTxnsRequest() { - this.getOpenTxnsRequest = null; + public void unsetRqst() { + this.rqst = null; } - /** Returns true if field getOpenTxnsRequest is set (has been assigned a value) and false otherwise */ - public boolean isSetGetOpenTxnsRequest() { - return this.getOpenTxnsRequest != null; + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; } - public void setGetOpenTxnsRequestIsSet(boolean value) { + public void setRqstIsSet(boolean value) { if (!value) { - this.getOpenTxnsRequest = null; + this.rqst = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { - case GET_OPEN_TXNS_REQUEST: + case RQST: if (value == null) { - unsetGetOpenTxnsRequest(); + unsetRqst(); } else { - setGetOpenTxnsRequest((GetOpenTxnsRequest)value); + setRqst((GetReplicationMetricsRequest)value); } break; @@ -299664,8 +299751,8 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { - case GET_OPEN_TXNS_REQUEST: - return getGetOpenTxnsRequest(); + case RQST: + return getRqst(); } throw new java.lang.IllegalStateException(); @@ -299678,31 +299765,31 @@ public boolean isSet(_Fields field) { } switch (field) { - case GET_OPEN_TXNS_REQUEST: - return isSetGetOpenTxnsRequest(); + case RQST: + return isSetRqst(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { - if (that instanceof get_open_txns_req_args) - return this.equals((get_open_txns_req_args)that); + if (that instanceof get_replication_metrics_args) + return this.equals((get_replication_metrics_args)that); return false; } - public boolean equals(get_open_txns_req_args that) { + public boolean equals(get_replication_metrics_args that) { if (that == null) return false; if (this == that) return true; - boolean this_present_getOpenTxnsRequest = true && this.isSetGetOpenTxnsRequest(); - boolean that_present_getOpenTxnsRequest = true && that.isSetGetOpenTxnsRequest(); - if (this_present_getOpenTxnsRequest || that_present_getOpenTxnsRequest) { - if (!(this_present_getOpenTxnsRequest && that_present_getOpenTxnsRequest)) + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) return false; - if (!this.getOpenTxnsRequest.equals(that.getOpenTxnsRequest)) + if (!this.rqst.equals(that.rqst)) return false; } @@ -299713,27 +299800,27 @@ public boolean equals(get_open_txns_req_args that) { public int hashCode() { int hashCode = 1; - hashCode = hashCode * 8191 + ((isSetGetOpenTxnsRequest()) ? 131071 : 524287); - if (isSetGetOpenTxnsRequest()) - hashCode = hashCode * 8191 + getOpenTxnsRequest.hashCode(); + hashCode = hashCode * 8191 + ((isSetRqst()) ? 131071 : 524287); + if (isSetRqst()) + hashCode = hashCode * 8191 + rqst.hashCode(); return hashCode; } @Override - public int compareTo(get_open_txns_req_args other) { + public int compareTo(get_replication_metrics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = java.lang.Boolean.compare(isSetGetOpenTxnsRequest(), other.isSetGetOpenTxnsRequest()); + lastComparison = java.lang.Boolean.compare(isSetRqst(), other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } - if (isSetGetOpenTxnsRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.getOpenTxnsRequest, other.getOpenTxnsRequest); + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); if (lastComparison != 0) { return lastComparison; } @@ -299756,14 +299843,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("get_open_txns_req_args("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("get_replication_metrics_args("); boolean first = true; - sb.append("getOpenTxnsRequest:"); - if (this.getOpenTxnsRequest == null) { + sb.append("rqst:"); + if (this.rqst == null) { sb.append("null"); } else { - sb.append(this.getOpenTxnsRequest); + sb.append(this.rqst); } first = false; sb.append(")"); @@ -299773,8 +299860,8 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (getOpenTxnsRequest != null) { - getOpenTxnsRequest.validate(); + if (rqst != null) { + rqst.validate(); } } @@ -299794,15 +299881,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class get_open_txns_req_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_open_txns_req_argsStandardScheme getScheme() { - return new get_open_txns_req_argsStandardScheme(); + private static class get_replication_metrics_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_replication_metrics_argsStandardScheme getScheme() { + return new get_replication_metrics_argsStandardScheme(); } } - private static class get_open_txns_req_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + private static class get_replication_metrics_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_metrics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -299812,11 +299899,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_a break; } switch (schemeField.id) { - case 1: // GET_OPEN_TXNS_REQUEST + case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.getOpenTxnsRequest = new GetOpenTxnsRequest(); - struct.getOpenTxnsRequest.read(iprot); - struct.setGetOpenTxnsRequestIsSet(true); + struct.rqst = new GetReplicationMetricsRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -299830,13 +299917,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_a struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_req_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, get_replication_metrics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.getOpenTxnsRequest != null) { - oprot.writeFieldBegin(GET_OPEN_TXNS_REQUEST_FIELD_DESC); - struct.getOpenTxnsRequest.write(oprot); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -299845,35 +299932,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_req_ } - private static class get_open_txns_req_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_open_txns_req_argsTupleScheme getScheme() { - return new get_open_txns_req_argsTupleScheme(); + private static class get_replication_metrics_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_replication_metrics_argsTupleScheme getScheme() { + return new get_replication_metrics_argsTupleScheme(); } } - private static class get_open_txns_req_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + private static class get_replication_metrics_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetGetOpenTxnsRequest()) { + if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetGetOpenTxnsRequest()) { - struct.getOpenTxnsRequest.write(oprot); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.getOpenTxnsRequest = new GetOpenTxnsRequest(); - struct.getOpenTxnsRequest.read(iprot); - struct.setGetOpenTxnsRequestIsSet(true); + struct.rqst = new GetReplicationMetricsRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); } } } @@ -299883,19 +299970,22 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_ar } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_open_txns_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_req_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_replication_metrics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_replication_metrics_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_open_txns_req_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_open_txns_req_resultTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_replication_metrics_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_replication_metrics_resultTupleSchemeFactory(); - private @org.apache.thrift.annotation.Nullable GetOpenTxnsResponse success; // required + private @org.apache.thrift.annotation.Nullable ReplicationMetricList success; // required + private @org.apache.thrift.annotation.Nullable MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final java.util.Map byName = new java.util.HashMap(); @@ -299913,6 +300003,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -299958,45 +300050,53 @@ public short getThriftFieldId() { static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsResponse.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ReplicationMetricList.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_req_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_replication_metrics_result.class, metaDataMap); } - public get_open_txns_req_result() { + public get_replication_metrics_result() { } - public get_open_txns_req_result( - GetOpenTxnsResponse success) + public get_replication_metrics_result( + ReplicationMetricList success, + MetaException o1) { this(); this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_open_txns_req_result(get_open_txns_req_result other) { + public get_replication_metrics_result(get_replication_metrics_result other) { if (other.isSetSuccess()) { - this.success = new GetOpenTxnsResponse(other.success); + this.success = new ReplicationMetricList(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_open_txns_req_result deepCopy() { - return new get_open_txns_req_result(this); + public get_replication_metrics_result deepCopy() { + return new get_replication_metrics_result(this); } @Override public void clear() { this.success = null; + this.o1 = null; } @org.apache.thrift.annotation.Nullable - public GetOpenTxnsResponse getSuccess() { + public ReplicationMetricList getSuccess() { return this.success; } - public void setSuccess(@org.apache.thrift.annotation.Nullable GetOpenTxnsResponse success) { + public void setSuccess(@org.apache.thrift.annotation.Nullable ReplicationMetricList success) { this.success = success; } @@ -300015,13 +300115,45 @@ public void setSuccessIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable + public MetaException getO1() { + return this.o1; + } + + public void setO1(@org.apache.thrift.annotation.Nullable 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, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((GetOpenTxnsResponse)value); + setSuccess((ReplicationMetricList)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); } break; @@ -300034,6 +300166,9 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable case SUCCESS: return getSuccess(); + case O1: + return getO1(); + } throw new java.lang.IllegalStateException(); } @@ -300047,18 +300182,20 @@ public boolean isSet(_Fields field) { switch (field) { case SUCCESS: return isSetSuccess(); + case O1: + return isSetO1(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { - if (that instanceof get_open_txns_req_result) - return this.equals((get_open_txns_req_result)that); + if (that instanceof get_replication_metrics_result) + return this.equals((get_replication_metrics_result)that); return false; } - public boolean equals(get_open_txns_req_result that) { + public boolean equals(get_replication_metrics_result that) { if (that == null) return false; if (this == that) @@ -300073,6 +300210,15 @@ public boolean equals(get_open_txns_req_result that) { 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; } @@ -300084,11 +300230,15 @@ public int hashCode() { if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); + hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287); + if (isSetO1()) + hashCode = hashCode * 8191 + o1.hashCode(); + return hashCode; } @Override - public int compareTo(get_open_txns_req_result other) { + public int compareTo(get_replication_metrics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -300105,6 +300255,16 @@ public int compareTo(get_open_txns_req_result other) { return lastComparison; } } + lastComparison = java.lang.Boolean.compare(isSetO1(), other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -300123,7 +300283,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("get_open_txns_req_result("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("get_replication_metrics_result("); boolean first = true; sb.append("success:"); @@ -300133,6 +300293,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. sb.append(this.success); } first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; sb.append(")"); return sb.toString(); } @@ -300161,15 +300329,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class get_open_txns_req_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_open_txns_req_resultStandardScheme getScheme() { - return new get_open_txns_req_resultStandardScheme(); + private static class get_replication_metrics_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_replication_metrics_resultStandardScheme getScheme() { + return new get_replication_metrics_resultStandardScheme(); } } - private static class get_open_txns_req_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + private static class get_replication_metrics_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, get_replication_metrics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -300181,13 +300349,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_r switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new GetOpenTxnsResponse(); + struct.success = new ReplicationMetricList(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -300197,7 +300374,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_r struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, get_replication_metrics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -300206,42 +300383,58 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_req_ struct.success.write(oprot); oprot.writeFieldEnd(); } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class get_open_txns_req_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public get_open_txns_req_resultTupleScheme getScheme() { - return new get_open_txns_req_resultTupleScheme(); + private static class get_replication_metrics_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_replication_metrics_resultTupleScheme getScheme() { + return new get_replication_metrics_resultTupleScheme(); } } - private static class get_open_txns_req_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + private static class get_replication_metrics_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, get_replication_metrics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new GetOpenTxnsResponse(); + struct.success = new ReplicationMetricList(); struct.success.read(iprot); struct.setSuccessIsSet(true); } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } } } @@ -300250,19 +300443,19 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_re } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_stored_procedure_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_stored_procedure_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_open_txns_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_req_args"); - private static final org.apache.thrift.protocol.TField PROC_FIELD_DESC = new org.apache.thrift.protocol.TField("proc", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField GET_OPEN_TXNS_REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("getOpenTxnsRequest", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_stored_procedure_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_stored_procedure_argsTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_open_txns_req_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_open_txns_req_argsTupleSchemeFactory(); - private @org.apache.thrift.annotation.Nullable StoredProcedure proc; // required + private @org.apache.thrift.annotation.Nullable GetOpenTxnsRequest getOpenTxnsRequest; // 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 { - PROC((short)1, "proc"); + GET_OPEN_TXNS_REQUEST((short)1, "getOpenTxnsRequest"); private static final java.util.Map byName = new java.util.HashMap(); @@ -300278,8 +300471,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_re @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PROC - return PROC; + case 1: // GET_OPEN_TXNS_REQUEST + return GET_OPEN_TXNS_REQUEST; default: return null; } @@ -300324,71 +300517,71 @@ public short getThriftFieldId() { public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROC, new org.apache.thrift.meta_data.FieldMetaData("proc", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StoredProcedure.class))); + tmpMap.put(_Fields.GET_OPEN_TXNS_REQUEST, new org.apache.thrift.meta_data.FieldMetaData("getOpenTxnsRequest", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsRequest.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_stored_procedure_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_req_args.class, metaDataMap); } - public create_stored_procedure_args() { + public get_open_txns_req_args() { } - public create_stored_procedure_args( - StoredProcedure proc) + public get_open_txns_req_args( + GetOpenTxnsRequest getOpenTxnsRequest) { this(); - this.proc = proc; + this.getOpenTxnsRequest = getOpenTxnsRequest; } /** * Performs a deep copy on other. */ - public create_stored_procedure_args(create_stored_procedure_args other) { - if (other.isSetProc()) { - this.proc = new StoredProcedure(other.proc); + public get_open_txns_req_args(get_open_txns_req_args other) { + if (other.isSetGetOpenTxnsRequest()) { + this.getOpenTxnsRequest = new GetOpenTxnsRequest(other.getOpenTxnsRequest); } } - public create_stored_procedure_args deepCopy() { - return new create_stored_procedure_args(this); + public get_open_txns_req_args deepCopy() { + return new get_open_txns_req_args(this); } @Override public void clear() { - this.proc = null; + this.getOpenTxnsRequest = null; } @org.apache.thrift.annotation.Nullable - public StoredProcedure getProc() { - return this.proc; + public GetOpenTxnsRequest getGetOpenTxnsRequest() { + return this.getOpenTxnsRequest; } - public void setProc(@org.apache.thrift.annotation.Nullable StoredProcedure proc) { - this.proc = proc; + public void setGetOpenTxnsRequest(@org.apache.thrift.annotation.Nullable GetOpenTxnsRequest getOpenTxnsRequest) { + this.getOpenTxnsRequest = getOpenTxnsRequest; } - public void unsetProc() { - this.proc = null; + public void unsetGetOpenTxnsRequest() { + this.getOpenTxnsRequest = null; } - /** Returns true if field proc is set (has been assigned a value) and false otherwise */ - public boolean isSetProc() { - return this.proc != null; + /** Returns true if field getOpenTxnsRequest is set (has been assigned a value) and false otherwise */ + public boolean isSetGetOpenTxnsRequest() { + return this.getOpenTxnsRequest != null; } - public void setProcIsSet(boolean value) { + public void setGetOpenTxnsRequestIsSet(boolean value) { if (!value) { - this.proc = null; + this.getOpenTxnsRequest = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { - case PROC: + case GET_OPEN_TXNS_REQUEST: if (value == null) { - unsetProc(); + unsetGetOpenTxnsRequest(); } else { - setProc((StoredProcedure)value); + setGetOpenTxnsRequest((GetOpenTxnsRequest)value); } break; @@ -300398,8 +300591,8 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { - case PROC: - return getProc(); + case GET_OPEN_TXNS_REQUEST: + return getGetOpenTxnsRequest(); } throw new java.lang.IllegalStateException(); @@ -300412,31 +300605,31 @@ public boolean isSet(_Fields field) { } switch (field) { - case PROC: - return isSetProc(); + case GET_OPEN_TXNS_REQUEST: + return isSetGetOpenTxnsRequest(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { - if (that instanceof create_stored_procedure_args) - return this.equals((create_stored_procedure_args)that); + if (that instanceof get_open_txns_req_args) + return this.equals((get_open_txns_req_args)that); return false; } - public boolean equals(create_stored_procedure_args that) { + public boolean equals(get_open_txns_req_args that) { if (that == null) return false; if (this == that) return true; - boolean this_present_proc = true && this.isSetProc(); - boolean that_present_proc = true && that.isSetProc(); - if (this_present_proc || that_present_proc) { - if (!(this_present_proc && that_present_proc)) + boolean this_present_getOpenTxnsRequest = true && this.isSetGetOpenTxnsRequest(); + boolean that_present_getOpenTxnsRequest = true && that.isSetGetOpenTxnsRequest(); + if (this_present_getOpenTxnsRequest || that_present_getOpenTxnsRequest) { + if (!(this_present_getOpenTxnsRequest && that_present_getOpenTxnsRequest)) return false; - if (!this.proc.equals(that.proc)) + if (!this.getOpenTxnsRequest.equals(that.getOpenTxnsRequest)) return false; } @@ -300447,27 +300640,27 @@ public boolean equals(create_stored_procedure_args that) { public int hashCode() { int hashCode = 1; - hashCode = hashCode * 8191 + ((isSetProc()) ? 131071 : 524287); - if (isSetProc()) - hashCode = hashCode * 8191 + proc.hashCode(); + hashCode = hashCode * 8191 + ((isSetGetOpenTxnsRequest()) ? 131071 : 524287); + if (isSetGetOpenTxnsRequest()) + hashCode = hashCode * 8191 + getOpenTxnsRequest.hashCode(); return hashCode; } @Override - public int compareTo(create_stored_procedure_args other) { + public int compareTo(get_open_txns_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = java.lang.Boolean.compare(isSetProc(), other.isSetProc()); + lastComparison = java.lang.Boolean.compare(isSetGetOpenTxnsRequest(), other.isSetGetOpenTxnsRequest()); if (lastComparison != 0) { return lastComparison; } - if (isSetProc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.proc, other.proc); + if (isSetGetOpenTxnsRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.getOpenTxnsRequest, other.getOpenTxnsRequest); if (lastComparison != 0) { return lastComparison; } @@ -300490,14 +300683,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("create_stored_procedure_args("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("get_open_txns_req_args("); boolean first = true; - sb.append("proc:"); - if (this.proc == null) { + sb.append("getOpenTxnsRequest:"); + if (this.getOpenTxnsRequest == null) { sb.append("null"); } else { - sb.append(this.proc); + sb.append(this.getOpenTxnsRequest); } first = false; sb.append(")"); @@ -300507,8 +300700,8 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (proc != null) { - proc.validate(); + if (getOpenTxnsRequest != null) { + getOpenTxnsRequest.validate(); } } @@ -300528,15 +300721,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class create_stored_procedure_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public create_stored_procedure_argsStandardScheme getScheme() { - return new create_stored_procedure_argsStandardScheme(); + private static class get_open_txns_req_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_open_txns_req_argsStandardScheme getScheme() { + return new get_open_txns_req_argsStandardScheme(); } } - private static class create_stored_procedure_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + private static class get_open_txns_req_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, create_stored_procedure_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -300546,11 +300739,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, create_stored_proce break; } switch (schemeField.id) { - case 1: // PROC + case 1: // GET_OPEN_TXNS_REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.proc = new StoredProcedure(); - struct.proc.read(iprot); - struct.setProcIsSet(true); + struct.getOpenTxnsRequest = new GetOpenTxnsRequest(); + struct.getOpenTxnsRequest.read(iprot); + struct.setGetOpenTxnsRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -300564,13 +300757,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, create_stored_proce struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, create_stored_procedure_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_req_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.proc != null) { - oprot.writeFieldBegin(PROC_FIELD_DESC); - struct.proc.write(oprot); + if (struct.getOpenTxnsRequest != null) { + oprot.writeFieldBegin(GET_OPEN_TXNS_REQUEST_FIELD_DESC); + struct.getOpenTxnsRequest.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -300579,35 +300772,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, create_stored_proc } - private static class create_stored_procedure_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public create_stored_procedure_argsTupleScheme getScheme() { - return new create_stored_procedure_argsTupleScheme(); + private static class get_open_txns_req_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_open_txns_req_argsTupleScheme getScheme() { + return new get_open_txns_req_argsTupleScheme(); } } - private static class create_stored_procedure_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + private static class get_open_txns_req_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, create_stored_procedure_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetProc()) { + if (struct.isSetGetOpenTxnsRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetProc()) { - struct.proc.write(oprot); + if (struct.isSetGetOpenTxnsRequest()) { + struct.getOpenTxnsRequest.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, create_stored_procedure_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.proc = new StoredProcedure(); - struct.proc.read(iprot); - struct.setProcIsSet(true); + struct.getOpenTxnsRequest = new GetOpenTxnsRequest(); + struct.getOpenTxnsRequest.read(iprot); + struct.setGetOpenTxnsRequestIsSet(true); } } } @@ -300617,22 +300810,19 @@ public void read(org.apache.thrift.protocol.TProtocol prot, create_stored_proced } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_stored_procedure_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_stored_procedure_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_open_txns_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_req_result"); - private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_stored_procedure_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_stored_procedure_resultTupleSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_open_txns_req_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_open_txns_req_resultTupleSchemeFactory(); - private @org.apache.thrift.annotation.Nullable NoSuchObjectException o1; // required - private @org.apache.thrift.annotation.Nullable MetaException o2; // required + private @org.apache.thrift.annotation.Nullable GetOpenTxnsResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); + SUCCESS((short)0, "success"); private static final java.util.Map byName = new java.util.HashMap(); @@ -300648,10 +300838,747 @@ public void read(org.apache.thrift.protocol.TProtocol prot, create_stored_proced @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 0: // SUCCESS + return SUCCESS; + 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsResponse.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_req_result.class, metaDataMap); + } + + public get_open_txns_req_result() { + } + + public get_open_txns_req_result( + GetOpenTxnsResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_open_txns_req_result(get_open_txns_req_result other) { + if (other.isSetSuccess()) { + this.success = new GetOpenTxnsResponse(other.success); + } + } + + public get_open_txns_req_result deepCopy() { + return new get_open_txns_req_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public GetOpenTxnsResponse getSuccess() { + return this.success; + } + + public void setSuccess(@org.apache.thrift.annotation.Nullable GetOpenTxnsResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetOpenTxnsResponse)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.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 java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof get_open_txns_req_result) + return this.equals((get_open_txns_req_result)that); + return false; + } + + public boolean equals(get_open_txns_req_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(get_open_txns_req_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("get_open_txns_req_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class get_open_txns_req_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_open_txns_req_resultStandardScheme getScheme() { + return new get_open_txns_req_resultStandardScheme(); + } + } + + private static class get_open_txns_req_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new GetOpenTxnsResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_open_txns_req_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public get_open_txns_req_resultTupleScheme getScheme() { + return new get_open_txns_req_resultTupleScheme(); + } + } + + private static class get_open_txns_req_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_req_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new GetOpenTxnsResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_stored_procedure_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_stored_procedure_args"); + + private static final org.apache.thrift.protocol.TField PROC_FIELD_DESC = new org.apache.thrift.protocol.TField("proc", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_stored_procedure_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_stored_procedure_argsTupleSchemeFactory(); + + private @org.apache.thrift.annotation.Nullable StoredProcedure proc; // 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 { + PROC((short)1, "proc"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PROC + return PROC; + 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PROC, new org.apache.thrift.meta_data.FieldMetaData("proc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StoredProcedure.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_stored_procedure_args.class, metaDataMap); + } + + public create_stored_procedure_args() { + } + + public create_stored_procedure_args( + StoredProcedure proc) + { + this(); + this.proc = proc; + } + + /** + * Performs a deep copy on other. + */ + public create_stored_procedure_args(create_stored_procedure_args other) { + if (other.isSetProc()) { + this.proc = new StoredProcedure(other.proc); + } + } + + public create_stored_procedure_args deepCopy() { + return new create_stored_procedure_args(this); + } + + @Override + public void clear() { + this.proc = null; + } + + @org.apache.thrift.annotation.Nullable + public StoredProcedure getProc() { + return this.proc; + } + + public void setProc(@org.apache.thrift.annotation.Nullable StoredProcedure proc) { + this.proc = proc; + } + + public void unsetProc() { + this.proc = null; + } + + /** Returns true if field proc is set (has been assigned a value) and false otherwise */ + public boolean isSetProc() { + return this.proc != null; + } + + public void setProcIsSet(boolean value) { + if (!value) { + this.proc = null; + } + } + + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case PROC: + if (value == null) { + unsetProc(); + } else { + setProc((StoredProcedure)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case PROC: + return getProc(); + + } + throw new java.lang.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 java.lang.IllegalArgumentException(); + } + + switch (field) { + case PROC: + return isSetProc(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof create_stored_procedure_args) + return this.equals((create_stored_procedure_args)that); + return false; + } + + public boolean equals(create_stored_procedure_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_proc = true && this.isSetProc(); + boolean that_present_proc = true && that.isSetProc(); + if (this_present_proc || that_present_proc) { + if (!(this_present_proc && that_present_proc)) + return false; + if (!this.proc.equals(that.proc)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetProc()) ? 131071 : 524287); + if (isSetProc()) + hashCode = hashCode * 8191 + proc.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(create_stored_procedure_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetProc(), other.isSetProc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.proc, other.proc); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("create_stored_procedure_args("); + boolean first = true; + + sb.append("proc:"); + if (this.proc == null) { + sb.append("null"); + } else { + sb.append(this.proc); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (proc != null) { + proc.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class create_stored_procedure_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public create_stored_procedure_argsStandardScheme getScheme() { + return new create_stored_procedure_argsStandardScheme(); + } + } + + private static class create_stored_procedure_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_stored_procedure_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: // PROC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.proc = new StoredProcedure(); + struct.proc.read(iprot); + struct.setProcIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_stored_procedure_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.proc != null) { + oprot.writeFieldBegin(PROC_FIELD_DESC); + struct.proc.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_stored_procedure_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public create_stored_procedure_argsTupleScheme getScheme() { + return new create_stored_procedure_argsTupleScheme(); + } + } + + private static class create_stored_procedure_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_stored_procedure_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetProc()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetProc()) { + struct.proc.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_stored_procedure_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.proc = new StoredProcedure(); + struct.proc.read(iprot); + struct.setProcIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_stored_procedure_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_stored_procedure_result"); + + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_stored_procedure_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_stored_procedure_resultTupleSchemeFactory(); + + private @org.apache.thrift.annotation.Nullable NoSuchObjectException o1; // required + private @org.apache.thrift.annotation.Nullable MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -303526,13 +304453,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_stored_proc case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list2034 = iprot.readListBegin(); - struct.success = new java.util.ArrayList(_list2034.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem2035; - for (int _i2036 = 0; _i2036 < _list2034.size; ++_i2036) + org.apache.thrift.protocol.TList _list2042 = iprot.readListBegin(); + struct.success = new java.util.ArrayList(_list2042.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem2043; + for (int _i2044 = 0; _i2044 < _list2042.size; ++_i2044) { - _elem2035 = iprot.readString(); - struct.success.add(_elem2035); + _elem2043 = iprot.readString(); + struct.success.add(_elem2043); } iprot.readListEnd(); } @@ -303567,9 +304494,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_stored_pro oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (java.lang.String _iter2037 : struct.success) + for (java.lang.String _iter2045 : struct.success) { - oprot.writeString(_iter2037); + oprot.writeString(_iter2045); } oprot.writeListEnd(); } @@ -303608,9 +304535,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, get_all_stored_proc if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (java.lang.String _iter2038 : struct.success) + for (java.lang.String _iter2046 : struct.success) { - oprot.writeString(_iter2038); + oprot.writeString(_iter2046); } } } @@ -303625,13 +304552,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_all_stored_proce java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list2039 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.success = new java.util.ArrayList(_list2039.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem2040; - for (int _i2041 = 0; _i2041 < _list2039.size; ++_i2041) + org.apache.thrift.protocol.TList _list2047 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.success = new java.util.ArrayList(_list2047.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem2048; + for (int _i2049 = 0; _i2049 < _list2047.size; ++_i2049) { - _elem2040 = iprot.readString(); - struct.success.add(_elem2040); + _elem2048 = iprot.readString(); + struct.success.add(_elem2048); } } struct.setSuccessIsSet(true); @@ -306088,13 +307015,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_packages_re case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list2042 = iprot.readListBegin(); - struct.success = new java.util.ArrayList(_list2042.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem2043; - for (int _i2044 = 0; _i2044 < _list2042.size; ++_i2044) + org.apache.thrift.protocol.TList _list2050 = iprot.readListBegin(); + struct.success = new java.util.ArrayList(_list2050.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem2051; + for (int _i2052 = 0; _i2052 < _list2050.size; ++_i2052) { - _elem2043 = iprot.readString(); - struct.success.add(_elem2043); + _elem2051 = iprot.readString(); + struct.success.add(_elem2051); } iprot.readListEnd(); } @@ -306129,9 +307056,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_packages_r oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (java.lang.String _iter2045 : struct.success) + for (java.lang.String _iter2053 : struct.success) { - oprot.writeString(_iter2045); + oprot.writeString(_iter2053); } oprot.writeListEnd(); } @@ -306170,9 +307097,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, get_all_packages_re if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (java.lang.String _iter2046 : struct.success) + for (java.lang.String _iter2054 : struct.success) { - oprot.writeString(_iter2046); + oprot.writeString(_iter2054); } } } @@ -306187,13 +307114,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_all_packages_res java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list2047 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.success = new java.util.ArrayList(_list2047.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem2048; - for (int _i2049 = 0; _i2049 < _list2047.size; ++_i2049) + org.apache.thrift.protocol.TList _list2055 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.success = new java.util.ArrayList(_list2055.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem2056; + for (int _i2057 = 0; _i2057 < _list2055.size; ++_i2057) { - _elem2048 = iprot.readString(); - struct.success.add(_elem2048); + _elem2056 = iprot.readString(); + struct.success.add(_elem2056); } } struct.setSuccessIsSet(true); @@ -307707,14 +308634,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_write_event case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list2050 = iprot.readListBegin(); - struct.success = new java.util.ArrayList(_list2050.size); - @org.apache.thrift.annotation.Nullable WriteEventInfo _elem2051; - for (int _i2052 = 0; _i2052 < _list2050.size; ++_i2052) + org.apache.thrift.protocol.TList _list2058 = iprot.readListBegin(); + struct.success = new java.util.ArrayList(_list2058.size); + @org.apache.thrift.annotation.Nullable WriteEventInfo _elem2059; + for (int _i2060 = 0; _i2060 < _list2058.size; ++_i2060) { - _elem2051 = new WriteEventInfo(); - _elem2051.read(iprot); - struct.success.add(_elem2051); + _elem2059 = new WriteEventInfo(); + _elem2059.read(iprot); + struct.success.add(_elem2059); } iprot.readListEnd(); } @@ -307749,9 +308676,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_write_even oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (WriteEventInfo _iter2053 : struct.success) + for (WriteEventInfo _iter2061 : struct.success) { - _iter2053.write(oprot); + _iter2061.write(oprot); } oprot.writeListEnd(); } @@ -307790,9 +308717,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, get_all_write_event if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (WriteEventInfo _iter2054 : struct.success) + for (WriteEventInfo _iter2062 : struct.success) { - _iter2054.write(oprot); + _iter2062.write(oprot); } } } @@ -307807,14 +308734,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_all_write_event_ java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list2055 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); - struct.success = new java.util.ArrayList(_list2055.size); - @org.apache.thrift.annotation.Nullable WriteEventInfo _elem2056; - for (int _i2057 = 0; _i2057 < _list2055.size; ++_i2057) + org.apache.thrift.protocol.TList _list2063 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.success = new java.util.ArrayList(_list2063.size); + @org.apache.thrift.annotation.Nullable WriteEventInfo _elem2064; + for (int _i2065 = 0; _i2065 < _list2063.size; ++_i2065) { - _elem2056 = new WriteEventInfo(); - _elem2056.read(iprot); - struct.success.add(_elem2056); + _elem2064 = new WriteEventInfo(); + _elem2064.read(iprot); + struct.success.add(_elem2064); } } struct.setSuccessIsSet(true); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreClient.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreClient.php index 13094835e5..12c54176c6 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreClient.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreClient.php @@ -16639,6 +16639,67 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas throw new \Exception("get_scheduled_query failed: unknown result"); } + public function get_repl_scheduled_queries() + { + $this->send_get_repl_scheduled_queries(); + return $this->recv_get_repl_scheduled_queries(); + } + + public function send_get_repl_scheduled_queries() + { + $args = new \metastore\ThriftHiveMetastore_get_repl_scheduled_queries_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'get_repl_scheduled_queries', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('get_repl_scheduled_queries', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_repl_scheduled_queries() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\metastore\ThriftHiveMetastore_get_repl_scheduled_queries_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_repl_scheduled_queries_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_repl_scheduled_queries failed: unknown result"); + } + public function add_replication_metrics(\metastore\ReplicationMetricList $replicationMetricList) { $this->send_add_replication_metrics($replicationMetricList); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreIf.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreIf.php index 1ed1a833e2..f118b7994f 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreIf.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastoreIf.php @@ -1888,6 +1888,11 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf * @throws \metastore\NoSuchObjectException */ public function get_scheduled_query(\metastore\ScheduledQueryKey $scheduleKey); + /** + * @return \metastore\ScheduledQuery[] + * @throws \metastore\MetaException + */ + public function get_repl_scheduled_queries(); /** * @param \metastore\ReplicationMetricList $replicationMetricList * @throws \metastore\MetaException diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_packages_result.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_packages_result.php index 219e0cc7c5..3e00c0be2c 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_packages_result.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_packages_result.php @@ -81,13 +81,13 @@ class ThriftHiveMetastore_get_all_packages_result case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size1796 = 0; - $_etype1799 = 0; - $xfer += $input->readListBegin($_etype1799, $_size1796); - for ($_i1800 = 0; $_i1800 < $_size1796; ++$_i1800) { - $elem1801 = null; - $xfer += $input->readString($elem1801); - $this->success []= $elem1801; + $_size1803 = 0; + $_etype1806 = 0; + $xfer += $input->readListBegin($_etype1806, $_size1803); + for ($_i1807 = 0; $_i1807 < $_size1803; ++$_i1807) { + $elem1808 = null; + $xfer += $input->readString($elem1808); + $this->success []= $elem1808; } $xfer += $input->readListEnd(); } else { @@ -122,8 +122,8 @@ class ThriftHiveMetastore_get_all_packages_result } $xfer += $output->writeFieldBegin('success', TType::LST, 0); $output->writeListBegin(TType::STRING, count($this->success)); - foreach ($this->success as $iter1802) { - $xfer += $output->writeString($iter1802); + foreach ($this->success as $iter1809) { + $xfer += $output->writeString($iter1809); } $output->writeListEnd(); $xfer += $output->writeFieldEnd(); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_stored_procedures_result.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_stored_procedures_result.php index 518f0c280b..8021a76197 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_stored_procedures_result.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_stored_procedures_result.php @@ -81,13 +81,13 @@ class ThriftHiveMetastore_get_all_stored_procedures_result case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size1789 = 0; - $_etype1792 = 0; - $xfer += $input->readListBegin($_etype1792, $_size1789); - for ($_i1793 = 0; $_i1793 < $_size1789; ++$_i1793) { - $elem1794 = null; - $xfer += $input->readString($elem1794); - $this->success []= $elem1794; + $_size1796 = 0; + $_etype1799 = 0; + $xfer += $input->readListBegin($_etype1799, $_size1796); + for ($_i1800 = 0; $_i1800 < $_size1796; ++$_i1800) { + $elem1801 = null; + $xfer += $input->readString($elem1801); + $this->success []= $elem1801; } $xfer += $input->readListEnd(); } else { @@ -122,8 +122,8 @@ class ThriftHiveMetastore_get_all_stored_procedures_result } $xfer += $output->writeFieldBegin('success', TType::LST, 0); $output->writeListBegin(TType::STRING, count($this->success)); - foreach ($this->success as $iter1795) { - $xfer += $output->writeString($iter1795); + foreach ($this->success as $iter1802) { + $xfer += $output->writeString($iter1802); } $output->writeListEnd(); $xfer += $output->writeFieldEnd(); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_write_event_info_result.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_write_event_info_result.php index 60377e8634..8f36ca029d 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_write_event_info_result.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_get_all_write_event_info_result.php @@ -82,14 +82,14 @@ class ThriftHiveMetastore_get_all_write_event_info_result case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size1803 = 0; - $_etype1806 = 0; - $xfer += $input->readListBegin($_etype1806, $_size1803); - for ($_i1807 = 0; $_i1807 < $_size1803; ++$_i1807) { - $elem1808 = null; - $elem1808 = new \metastore\WriteEventInfo(); - $xfer += $elem1808->read($input); - $this->success []= $elem1808; + $_size1810 = 0; + $_etype1813 = 0; + $xfer += $input->readListBegin($_etype1813, $_size1810); + for ($_i1814 = 0; $_i1814 < $_size1810; ++$_i1814) { + $elem1815 = null; + $elem1815 = new \metastore\WriteEventInfo(); + $xfer += $elem1815->read($input); + $this->success []= $elem1815; } $xfer += $input->readListEnd(); } else { @@ -124,8 +124,8 @@ class ThriftHiveMetastore_get_all_write_event_info_result } $xfer += $output->writeFieldBegin('success', TType::LST, 0); $output->writeListBegin(TType::STRUCT, count($this->success)); - foreach ($this->success as $iter1809) { - $xfer += $iter1809->write($output); + foreach ($this->success as $iter1816) { + $xfer += $iter1816->write($output); } $output->writeListEnd(); $xfer += $output->writeFieldEnd(); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote index b92eb0a0ae..3263be1c59 100755 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -282,6 +282,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' void scheduled_query_maintenance(ScheduledQueryMaintenanceRequest request)') print(' void scheduled_query_progress(ScheduledQueryProgressInfo info)') print(' ScheduledQuery get_scheduled_query(ScheduledQueryKey scheduleKey)') + print(' get_repl_scheduled_queries()') print(' void add_replication_metrics(ReplicationMetricList replicationMetricList)') print(' ReplicationMetricList get_replication_metrics(GetReplicationMetricsRequest rqst)') print(' GetOpenTxnsResponse get_open_txns_req(GetOpenTxnsRequest getOpenTxnsRequest)') @@ -1934,6 +1935,12 @@ elif cmd == 'get_scheduled_query': sys.exit(1) pp.pprint(client.get_scheduled_query(eval(args[0]),)) +elif cmd == 'get_repl_scheduled_queries': + if len(args) != 0: + print('get_repl_scheduled_queries requires 0 args') + sys.exit(1) + pp.pprint(client.get_repl_scheduled_queries()) + elif cmd == 'add_replication_metrics': if len(args) != 1: print('add_replication_metrics requires 1 args') diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py index bc738fbc4f..22437feeb1 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -2205,6 +2205,9 @@ def get_scheduled_query(self, scheduleKey): """ pass + def get_repl_scheduled_queries(self): + pass + def add_replication_metrics(self, replicationMetricList): """ Parameters: @@ -11668,6 +11671,34 @@ def recv_get_scheduled_query(self): raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_scheduled_query failed: unknown result") + def get_repl_scheduled_queries(self): + self.send_get_repl_scheduled_queries() + return self.recv_get_repl_scheduled_queries() + + def send_get_repl_scheduled_queries(self): + self._oprot.writeMessageBegin('get_repl_scheduled_queries', TMessageType.CALL, self._seqid) + args = get_repl_scheduled_queries_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_repl_scheduled_queries(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_repl_scheduled_queries_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_repl_scheduled_queries failed: unknown result") + def add_replication_metrics(self, replicationMetricList): """ Parameters: @@ -12332,6 +12363,7 @@ def __init__(self, handler): self._processMap["scheduled_query_maintenance"] = Processor.process_scheduled_query_maintenance self._processMap["scheduled_query_progress"] = Processor.process_scheduled_query_progress self._processMap["get_scheduled_query"] = Processor.process_get_scheduled_query + self._processMap["get_repl_scheduled_queries"] = Processor.process_get_repl_scheduled_queries self._processMap["add_replication_metrics"] = Processor.process_add_replication_metrics self._processMap["get_replication_metrics"] = Processor.process_get_replication_metrics self._processMap["get_open_txns_req"] = Processor.process_get_open_txns_req @@ -19734,6 +19766,32 @@ def process_get_scheduled_query(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() + def process_get_repl_scheduled_queries(self, seqid, iprot, oprot): + args = get_repl_scheduled_queries_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_repl_scheduled_queries_result() + try: + result.success = self._handler.get_repl_scheduled_queries() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_repl_scheduled_queries", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_add_replication_metrics(self, seqid, iprot, oprot): args = add_replication_metrics_args() args.read(iprot) @@ -59582,6 +59640,131 @@ def __ne__(self, other): ) +class get_repl_scheduled_queries_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_repl_scheduled_queries_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + 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) +all_structs.append(get_repl_scheduled_queries_args) +get_repl_scheduled_queries_args.thrift_spec = ( +) + + +class get_repl_scheduled_queries_result(object): + """ + Attributes: + - success + - o1 + + """ + + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1789, _size1786) = iprot.readListBegin() + for _i1790 in range(_size1786): + _elem1791 = ScheduledQuery() + _elem1791.read(iprot) + self.success.append(_elem1791) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_repl_scheduled_queries_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1792 in self.success: + iter1792.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + 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) +all_structs.append(get_repl_scheduled_queries_result) +get_repl_scheduled_queries_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [ScheduledQuery, None], False), None, ), # 0 + (1, TType.STRUCT, 'o1', [MetaException, None], None, ), # 1 +) + + class add_replication_metrics_args(object): """ Attributes: @@ -60468,10 +60651,10 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype1789, _size1786) = iprot.readListBegin() - for _i1790 in range(_size1786): - _elem1791 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success.append(_elem1791) + (_etype1796, _size1793) = iprot.readListBegin() + for _i1797 in range(_size1793): + _elem1798 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success.append(_elem1798) iprot.readListEnd() else: iprot.skip(ftype) @@ -60493,8 +60676,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1792 in self.success: - oprot.writeString(iter1792.encode('utf-8') if sys.version_info[0] == 2 else iter1792) + for iter1799 in self.success: + oprot.writeString(iter1799.encode('utf-8') if sys.version_info[0] == 2 else iter1799) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -60886,10 +61069,10 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype1796, _size1793) = iprot.readListBegin() - for _i1797 in range(_size1793): - _elem1798 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success.append(_elem1798) + (_etype1803, _size1800) = iprot.readListBegin() + for _i1804 in range(_size1800): + _elem1805 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success.append(_elem1805) iprot.readListEnd() else: iprot.skip(ftype) @@ -60911,8 +61094,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1799 in self.success: - oprot.writeString(iter1799.encode('utf-8') if sys.version_info[0] == 2 else iter1799) + for iter1806 in self.success: + oprot.writeString(iter1806.encode('utf-8') if sys.version_info[0] == 2 else iter1806) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -61155,11 +61338,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype1803, _size1800) = iprot.readListBegin() - for _i1804 in range(_size1800): - _elem1805 = WriteEventInfo() - _elem1805.read(iprot) - self.success.append(_elem1805) + (_etype1810, _size1807) = iprot.readListBegin() + for _i1811 in range(_size1807): + _elem1812 = WriteEventInfo() + _elem1812.read(iprot) + self.success.append(_elem1812) iprot.readListEnd() else: iprot.skip(ftype) @@ -61181,8 +61364,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter1806 in self.success: - iter1806.write(oprot) + for iter1813 in self.success: + iter1813.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb index a5b2592bc5..f2c26924b0 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -4290,6 +4290,22 @@ module ThriftHiveMetastore raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_scheduled_query failed: unknown result') end + def get_repl_scheduled_queries() + send_get_repl_scheduled_queries() + return recv_get_repl_scheduled_queries() + end + + def send_get_repl_scheduled_queries() + send_message('get_repl_scheduled_queries', Get_repl_scheduled_queries_args) + end + + def recv_get_repl_scheduled_queries() + result = receive_message(Get_repl_scheduled_queries_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_repl_scheduled_queries failed: unknown result') + end + def add_replication_metrics(replicationMetricList) send_add_replication_metrics(replicationMetricList) recv_add_replication_metrics() @@ -7694,6 +7710,17 @@ module ThriftHiveMetastore write_result(result, oprot, 'get_scheduled_query', seqid) end + def process_get_repl_scheduled_queries(seqid, iprot, oprot) + args = read_args(iprot, Get_repl_scheduled_queries_args) + result = Get_repl_scheduled_queries_result.new() + begin + result.success = @handler.get_repl_scheduled_queries() + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_repl_scheduled_queries', seqid) + end + def process_add_replication_metrics(seqid, iprot, oprot) args = read_args(iprot, Add_replication_metrics_args) result = Add_replication_metrics_result.new() @@ -17281,6 +17308,39 @@ module ThriftHiveMetastore ::Thrift::Struct.generate_accessors self end + class Get_repl_scheduled_queries_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_repl_scheduled_queries_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ScheduledQuery}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Add_replication_metrics_args include ::Thrift::Struct, ::Thrift::Struct_Union REPLICATIONMETRICLIST = 1 diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index 08d92f1ef2..efacad6bee 100644 --- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -5010,6 +5010,11 @@ public ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) throws TE return client.get_scheduled_query(scheduleKey); } + @Override + public List getScheduledReplQueries() throws TException { + return client.get_repl_scheduled_queries(); + } + @Override public void scheduledQueryProgress(ScheduledQueryProgressInfo info) throws TException { client.scheduled_query_progress(info); diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index dfd06f96a2..395de58084 100644 --- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -4270,6 +4270,8 @@ void createOrDropTriggerToPoolMapping(String resourcePlanName, String triggerNam */ ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) throws TException; + List getScheduledReplQueries() throws TException; + /** * Carries out maintenance of scheduled queries (insert/update/drop). */ diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift index e8a2e534dd..3cdc2432eb 100644 --- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift +++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift @@ -3095,6 +3095,7 @@ PartitionsResponse get_partitions_req(1:PartitionsRequest req) void scheduled_query_maintenance(1: ScheduledQueryMaintenanceRequest request) throws(1:MetaException o1, 2:NoSuchObjectException o2, 3:AlreadyExistsException o3, 4:InvalidInputException o4) void scheduled_query_progress(1: ScheduledQueryProgressInfo info) throws(1:MetaException o1, 2: InvalidOperationException o2) ScheduledQuery get_scheduled_query(1: ScheduledQueryKey scheduleKey) throws(1:MetaException o1, 2:NoSuchObjectException o2) + list get_repl_scheduled_queries() throws(1:MetaException o1) void add_replication_metrics(1: ReplicationMetricList replicationMetricList) throws(1:MetaException o1) ReplicationMetricList get_replication_metrics(1: GetReplicationMetricsRequest rqst) throws(1:MetaException o1) diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java index 2cde211c29..7f7cf5c896 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java @@ -10602,6 +10602,21 @@ public ScheduledQuery get_scheduled_query(ScheduledQueryKey scheduleKey) throws } } + @Override + public List get_repl_scheduled_queries() throws MetaException { + startFunction("get_scheduled_queries"); + Exception ex = null; + try { + return getMS().getReplScheduledQueries(); + } catch (Exception e) { + LOG.error("Caught exception", e); + ex = e; + throw e; + } finally { + endFunction("get_repl_scheduled_queries", ex == null, ex); + } + } + @Override public void add_replication_metrics(ReplicationMetricList replicationMetricList) throws MetaException{ startFunction("add_replication_metrics"); diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 83afdce22e..ae08d683d9 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -14737,6 +14737,31 @@ public ScheduledQuery getScheduledQuery(ScheduledQueryKey key) throws NoSuchObje } + @Override + public List getReplScheduledQueries() throws MetaException{ + Query q; + List result = new ArrayList<>(); + try { + openTransaction(); + q = pm.newQuery(MScheduledQuery.class, + "enabled && clusterNamespace == ns && activeExecution == null"); + q.setSerializeRead(true); + q.declareParameters("java.lang.String ns"); + List mScheduledQueries = (List) q.execute(); + + for (MScheduledQuery mScheduledQuery : mScheduledQueries) { + if(mScheduledQuery.getQuery().startsWith("REPL ")) { + result.add(mScheduledQuery.toThrift()); + } + } + + return result; + } catch (Exception e) { + LOG.error("Filed to fetch Scheduled REPL queries" ,e); + } + return result; + } + private String scheduledQueryKeyRef(ScheduledQueryKey key) { return key.getScheduleName() + "@" + key.getClusterNamespace(); } diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java index 9ec66c48bb..3d52013509 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java @@ -2118,6 +2118,13 @@ void alterSchemaVersion(SchemaVersionDescriptor version, SchemaVersion newVersio */ ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) throws MetaException, NoSuchObjectException; + /** + * Returns all replication scheduled queries. + * + * @return list of replication related scheduled queries + */ + List getReplScheduledQueries() throws MetaException; + /** * Carries out maintenance of scheduled queries (insert/update/drop). */ diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java index c04230c8e1..6fafd19f5d 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java @@ -3262,6 +3262,11 @@ public ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) throws Me return rawStore.getScheduledQuery(scheduleKey); } + @Override + public List getReplScheduledQueries() throws MetaException{ + return rawStore.getReplScheduledQueries(); + } + @Override public int deleteScheduledExecutions(int maxRetainSecs) { return rawStore.deleteScheduledExecutions(maxRetainSecs); diff --git a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java index f3d79dabfd..81743bd1b4 100644 --- a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java +++ b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java @@ -1470,6 +1470,11 @@ public ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) throws No return objectStore.getScheduledQuery(scheduleKey); } + @Override + public List getReplScheduledQueries() throws MetaException { + return objectStore.getReplScheduledQueries(); + } + @Override public int deleteScheduledExecutions(int maxRetainSecs) { return objectStore.deleteScheduledExecutions(maxRetainSecs); diff --git a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java index 662a21ccb8..d8a51b5c77 100644 --- a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java +++ b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java @@ -1471,6 +1471,11 @@ public ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) { throw new RuntimeException("unimplemented"); } + @Override + public List getReplScheduledQueries() throws MetaException { + throw new RuntimeException("unimplemented"); + } + @Override public int deleteScheduledExecutions(int maxRetainSecs) { throw new RuntimeException("unimplemented"); diff --git a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java index 222203c63b..522317d2f8 100644 --- a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java +++ b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java @@ -3937,6 +3937,11 @@ public ScheduledQuery getScheduledQuery(ScheduledQueryKey key) throws TException return client.get_scheduled_query(key); } + @Override + public List getScheduledReplQueries() throws TException { + return client.get_repl_scheduled_queries(); + } + @Override public void scheduledQueryProgress(ScheduledQueryProgressInfo info) throws TException { client.scheduled_query_progress(info); diff --git a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestMetastoreScheduledQueries.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestMetastoreScheduledQueries.java index 6a9d2893f2..bf1af27853 100644 --- a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestMetastoreScheduledQueries.java +++ b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestMetastoreScheduledQueries.java @@ -614,10 +614,49 @@ public void testDisabledProgress() throws MetaException, TException { } } + @Test + public void testGetAllReplQueries() throws TException { + ScheduledQuery schq1 = createScheduledQuery(createKey("create", "r1"), "REPL DUMP db1"); + ScheduledQuery schq2 = createScheduledQuery(createKey("create", "r2"), "REPL LOAD db1"); + ScheduledQuery schq3 = createScheduledQuery(createKey("create", "r3"), "REPL STATUS db1"); + ScheduledQuery schq4 = createScheduledQuery(createKey("create", "r4"), "SELECT 1"); + ScheduledQuery schq5 = createScheduledQuery(createKey("create", "r5"), "SELECT 5"); + ScheduledQueryMaintenanceRequest r = new ScheduledQueryMaintenanceRequest(); + r.setType(ScheduledQueryMaintenanceRequestType.CREATE); + r.setScheduledQuery(schq1); + client.scheduledQueryMaintenance(r); + + r.setScheduledQuery(schq2); + client.scheduledQueryMaintenance(r); + + r.setScheduledQuery(schq3); + client.scheduledQueryMaintenance(r); + + r.setScheduledQuery(schq4); + client.scheduledQueryMaintenance(r); + + r.setScheduledQuery(schq5); + client.scheduledQueryMaintenance(r); + + List queries = client.getScheduledReplQueries(); + + assertTrue(queries.size()==3); + } + private int getEpochSeconds() { return (int) (System.currentTimeMillis() / 1000); } + private ScheduledQuery createScheduledQuery(ScheduledQueryKey key, String query) { + ScheduledQuery schq = new ScheduledQuery(); + schq.setScheduleKey(key); + schq.setEnabled(true); + schq.setSchedule("* * * * * ? *"); + schq.setUser("user"); + schq.setQuery(query); + return schq; + } + private ScheduledQuery createScheduledQuery(ScheduledQueryKey key) { ScheduledQuery schq = new ScheduledQuery(); schq.setScheduleKey(key);