aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/native/client/example/querySubmitter.cpp3
-rw-r--r--contrib/native/client/src/clientlib/drillClient.cpp18
-rw-r--r--contrib/native/client/src/clientlib/drillClientImpl.cpp171
-rw-r--r--contrib/native/client/src/clientlib/drillClientImpl.hpp36
-rw-r--r--contrib/native/client/src/include/drill/common.hpp3
-rw-r--r--contrib/native/client/src/include/drill/drillClient.hpp7
-rw-r--r--contrib/native/client/src/protobuf/BitControl.pb.cc570
-rw-r--r--contrib/native/client/src/protobuf/BitControl.pb.h441
-rw-r--r--contrib/native/client/src/protobuf/GeneralRPC.pb.cc10
-rw-r--r--contrib/native/client/src/protobuf/GeneralRPC.pb.h6
-rw-r--r--contrib/native/client/src/protobuf/User.pb.cc83
-rw-r--r--contrib/native/client/src/protobuf/User.pb.h37
-rw-r--r--contrib/native/client/src/protobuf/UserBitShared.pb.cc674
-rw-r--r--contrib/native/client/src/protobuf/UserBitShared.pb.h614
14 files changed, 2215 insertions, 458 deletions
diff --git a/contrib/native/client/example/querySubmitter.cpp b/contrib/native/client/example/querySubmitter.cpp
index 85e89e0c2..960ff4f44 100644
--- a/contrib/native/client/example/querySubmitter.cpp
+++ b/contrib/native/client/example/querySubmitter.cpp
@@ -82,6 +82,7 @@ Drill::status_t QueryResultsListener(void* ctx, Drill::RecordBatch* b, Drill::Dr
}
}else{
std::cout << "Query Complete." << std::endl;
+ return Drill::QRY_SUCCESS;
}
}else{
assert(b==NULL);
@@ -368,7 +369,7 @@ int main(int argc, char* argv[]) {
row=0;
Drill::RecordIterator* pRecIter=*recordIterIter;
Drill::FieldDefPtr fields= pRecIter->getColDefs();
- while((ret=pRecIter->next()), ret==Drill::QRY_SUCCESS || ret==Drill::QRY_SUCCESS_WITH_INFO){
+ while((ret=pRecIter->next()), (ret==Drill::QRY_SUCCESS || ret==Drill::QRY_SUCCESS_WITH_INFO) && !pRecIter->hasError()){
fields = pRecIter->getColDefs();
row++;
if( (ret==Drill::QRY_SUCCESS_WITH_INFO && pRecIter->hasSchemaChanged() )|| ( row%100==1)){
diff --git a/contrib/native/client/src/clientlib/drillClient.cpp b/contrib/native/client/src/clientlib/drillClient.cpp
index 7162f63d1..e536fc35c 100644
--- a/contrib/native/client/src/clientlib/drillClient.cpp
+++ b/contrib/native/client/src/clientlib/drillClient.cpp
@@ -50,6 +50,8 @@ uint64_t DrillClientConfig::s_bufferLimit=MAX_MEM_ALLOC_SIZE;
int32_t DrillClientConfig::s_socketTimeout=0;
int32_t DrillClientConfig::s_handshakeTimeout=5;
int32_t DrillClientConfig::s_queryTimeout=180;
+int32_t DrillClientConfig::s_heartbeatFrequency=15; // 15 seconds
+
boost::mutex DrillClientConfig::s_mutex;
DrillClientConfig::DrillClientConfig(){
@@ -100,6 +102,13 @@ void DrillClientConfig::setQueryTimeout(int32_t t){
}
}
+void DrillClientConfig::setHeartbeatFrequency(int32_t t){
+ if (t>0){
+ boost::lock_guard<boost::mutex> configLock(DrillClientConfig::s_mutex);
+ s_heartbeatFrequency=t;
+ }
+}
+
int32_t DrillClientConfig::getSocketTimeout(){
boost::lock_guard<boost::mutex> configLock(DrillClientConfig::s_mutex);
return s_socketTimeout;
@@ -115,6 +124,11 @@ int32_t DrillClientConfig::getQueryTimeout(){
return s_queryTimeout;
}
+int32_t DrillClientConfig::getHeartbeatFrequency(){
+ boost::lock_guard<boost::mutex> configLock(DrillClientConfig::s_mutex);
+ return s_heartbeatFrequency;
+}
+
logLevel_t DrillClientConfig::getLogLevel(){
boost::lock_guard<boost::mutex> configLock(DrillClientConfig::s_mutex);
return s_logLevel;
@@ -281,6 +295,10 @@ void RecordIterator::registerSchemaChangeListener(pfnSchemaListener l){
this->m_pQueryResult->registerSchemaChangeListener(l);
}
+bool RecordIterator::hasError(){
+ return m_pQueryResult->hasError();
+}
+
const std::string& RecordIterator::getError(){
return m_pQueryResult->getError()->msg;
}
diff --git a/contrib/native/client/src/clientlib/drillClientImpl.cpp b/contrib/native/client/src/clientlib/drillClientImpl.cpp
index eca0e7516..97afb8803 100644
--- a/contrib/native/client/src/clientlib/drillClientImpl.cpp
+++ b/contrib/native/client/src/clientlib/drillClientImpl.cpp
@@ -22,6 +22,7 @@
#include <string.h>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/thread.hpp>
@@ -148,6 +149,13 @@ connectionStatus_t DrillClientImpl::connect(const char* host, const char* port){
return handleConnError(CONN_FAILURE, getMessage(ERR_CONN_EXCEPT, e.what()));
}
+ // set socket keep alive
+ boost::asio::socket_base::keep_alive keepAlive(true);
+ m_socket.set_option(keepAlive);
+ // set no_delay
+ boost::asio::ip::tcp::no_delay noDelay(true);
+ m_socket.set_option(noDelay);
+
//
// We put some OS dependent code here for timing out a socket. Mostly, this appears to
// do nothing. Should we leave it in there?
@@ -157,6 +165,74 @@ connectionStatus_t DrillClientImpl::connect(const char* host, const char* port){
return CONN_SUCCESS;
}
+void DrillClientImpl::startHeartbeatTimer(){
+ DRILL_LOG(LOG_TRACE) << "Started new heartbeat timer with "
+ << DrillClientConfig::getHeartbeatFrequency() << " seconds." << std::endl;
+ m_heartbeatTimer.expires_from_now(boost::posix_time::seconds(DrillClientConfig::getHeartbeatFrequency()));
+ m_heartbeatTimer.async_wait(boost::bind(
+ &DrillClientImpl::handleHeartbeatTimeout,
+ this,
+ boost::asio::placeholders::error
+ ));
+ startMessageListener(); // start this thread early so we don't have the timer blocked
+}
+
+connectionStatus_t DrillClientImpl::sendHeartbeat(){
+ connectionStatus_t status=CONN_SUCCESS;
+ exec::rpc::Ack ack;
+ ack.set_ok(true);
+ OutBoundRpcMessage heartbeatMsg(exec::rpc::PING, exec::user::ACK/*can be anything */, 0, &ack);
+ boost::lock_guard<boost::mutex> prLock(this->m_prMutex);
+ boost::lock_guard<boost::mutex> lock(m_dcMutex);
+ DRILL_LOG(LOG_TRACE) << "Heartbeat sent." << std::endl;
+ status=sendSync(heartbeatMsg);
+ status=status==CONN_SUCCESS?status:CONN_DEAD;
+ //If the server sends responses to a heartbeat, we need to increment the pending requests counter.
+ if(m_pendingRequests++==0){
+ getNextResult(); // async wait for results
+ }
+ return status;
+}
+
+void DrillClientImpl::resetHeartbeatTimer(){
+ m_heartbeatTimer.cancel();
+ DRILL_LOG(LOG_TRACE) << "Reset Heartbeat timer." << std::endl;
+ startHeartbeatTimer();
+}
+
+
+
+void DrillClientImpl::handleHeartbeatTimeout(const boost::system::error_code & err){
+ DRILL_LOG(LOG_TRACE) << "DrillClientImpl:: Heartbeat timer expired." << std::endl;
+ if(err != boost::asio::error::operation_aborted){
+ // Check whether the deadline has passed.
+ DRILL_LOG(LOG_TRACE) << "DrillClientImpl::Heartbeat Timer - Expires at: "
+ << to_simple_string(m_heartbeatTimer.expires_at())
+ << " and time now is: "
+ << to_simple_string(boost::asio::deadline_timer::traits_type::now())
+ << std::endl;
+ ;
+ if (m_heartbeatTimer.expires_at() <= boost::asio::deadline_timer::traits_type::now()){
+ // The deadline has passed.
+ m_heartbeatTimer.expires_at(boost::posix_time::pos_infin);
+ if(sendHeartbeat()==CONN_SUCCESS){
+ startHeartbeatTimer();
+ }else{
+ // Close connection.
+ DRILL_LOG(LOG_TRACE) << "DrillClientImpl:: No heartbeat. Closing connection.";
+ shutdownSocket();
+ }
+ }
+ }
+ return;
+}
+
+
+void DrillClientImpl::Close() {
+ shutdownSocket();
+}
+
+
connectionStatus_t DrillClientImpl::sendSync(OutBoundRpcMessage& msg){
DrillClientImpl::s_encoder.Encode(m_wbuf, msg);
boost::system::error_code ec;
@@ -205,6 +281,7 @@ connectionStatus_t DrillClientImpl::recvHandshake(){
return static_cast<connectionStatus_t>(m_pError->status);
}
#endif // WIN32_SHUTDOWN_ON_TIMEOUT
+ startHeartbeatTimer();
return CONN_SUCCESS;
}
@@ -285,6 +362,7 @@ connectionStatus_t DrillClientImpl::validateHandshake(DrillUserProperties* prope
u2b.set_channel(exec::shared::USER);
u2b.set_rpc_version(DRILL_RPC_VERSION);
u2b.set_support_listening(true);
+ u2b.set_support_timeout(true);
if(properties != NULL && properties->size()>0){
std::string username;
@@ -369,6 +447,21 @@ connectionStatus_t DrillClientImpl::validateHandshake(DrillUserProperties* prope
FieldDefPtr DrillClientQueryResult::s_emptyColDefs( new (std::vector<Drill::FieldMetadata*>));
+void DrillClientImpl::startMessageListener() {
+ if(this->m_pListenerThread==NULL){
+ // Stopping the io_service from running out-of-work
+ if(m_io_service.stopped()){
+ DRILL_LOG(LOG_DEBUG) << "DrillClientImpl::startMessageListener: io_service is stopped. Restarting." <<std::endl;
+ m_io_service.reset();
+ }
+ this->m_pWork = new boost::asio::io_service::work(m_io_service);
+ this->m_pListenerThread = new boost::thread(boost::bind(&boost::asio::io_service::run,
+ &this->m_io_service));
+ DRILL_LOG(LOG_DEBUG) << "DrillClientImpl::startMessageListener: Starting listener thread: "
+ << this->m_pListenerThread << std::endl;
+ }
+}
+
DrillClientQueryResult* DrillClientImpl::SubmitQuery(::exec::shared::QueryType t,
const std::string& plan,
pfnQueryResultsListener l,
@@ -408,20 +501,8 @@ DrillClientQueryResult* DrillClientImpl::SubmitQuery(::exec::shared::QueryType t
}
//run this in a new thread
- {
- if(this->m_pListenerThread==NULL){
- // Stopping the io_service from running out-of-work
- if(m_io_service.stopped()){
- DRILL_LOG(LOG_DEBUG) << "DrillClientImpl::SubmitQuery: io_service is stopped. Restarting." <<std::endl;
- m_io_service.reset();
- }
- this->m_pWork = new boost::asio::io_service::work(m_io_service);
- this->m_pListenerThread = new boost::thread(boost::bind(&boost::asio::io_service::run,
- &this->m_io_service));
- DRILL_LOG(LOG_DEBUG) << "DrillClientImpl::SubmitQuery: Starting listener thread: "
- << this->m_pListenerThread << std::endl;
- }
- }
+ startMessageListener();
+
return pQuery;
}
@@ -437,6 +518,7 @@ void DrillClientImpl::getNextResult(){
AllocatedBuffer::s_memCV.wait(memLock);
}
}
+
//use free, not delete to free
ByteBuf_t readBuf = Utils::allocateBuffer(LEN_PREFIX_BUFLEN);
if (DrillClientConfig::getQueryTimeout() > 0){
@@ -450,6 +532,8 @@ void DrillClientImpl::getNextResult(){
));
}
+ resetHeartbeatTimer();
+
async_read(
this->m_socket,
boost::asio::buffer(readBuf, LEN_PREFIX_BUFLEN),
@@ -464,13 +548,15 @@ void DrillClientImpl::getNextResult(){
}
void DrillClientImpl::waitForResults(){
- if(this->m_pListenerThread!=NULL){
- // do nothing. No we do not need to explicity wait for the listener thread to finish
- delete this->m_pWork; this->m_pWork = NULL; // inform io_service that io_service is permited to exit
- this->m_pListenerThread->join();
- DRILL_LOG(LOG_DEBUG) << "DrillClientImpl::waitForResults: Listener thread "
- << this->m_pListenerThread << " exited." << std::endl;
- delete this->m_pListenerThread; this->m_pListenerThread=NULL;
+ // The listener thread never exists because it may be sending/receiving a heartbeat. Before the heartbeat was introduced
+ // we could check if the listener thread has exited to tell if the queries are done. We can no longer do so now. We check
+ // a condition variable instead
+ {
+ boost::unique_lock<boost::mutex> cvLock(this->m_dcMutex);
+ //if no more data, return NULL;
+ while(this->m_pendingRequests>0) {
+ this->m_cv.wait(cvLock);
+ }
}
}
@@ -511,6 +597,7 @@ status_t DrillClientImpl::readMsg(ByteBuf_t _buf,
<< (rmsgLen - leftover) << std::endl;
ByteBuf_t b=currentBuffer->m_pBuffer + leftover;
size_t bytesToRead=rmsgLen - leftover;
+
while(1){
size_t dataBytesRead=this->m_socket.read_some(
boost::asio::buffer(b, bytesToRead),
@@ -521,6 +608,7 @@ status_t DrillClientImpl::readMsg(ByteBuf_t _buf,
bytesToRead-=dataBytesRead;
b+=dataBytesRead;
}
+
if(!error){
// read data successfully
DrillClientImpl::s_decoder.Decode(currentBuffer->m_pBuffer, rmsgLen, msg);
@@ -583,7 +671,7 @@ status_t DrillClientImpl::processQueryResult(AllocatedBufferPtr allocatedBuffer
ret=QRY_CANCELED;
}
delete allocatedBuffer;
- return ret;
+ //return ret;
}else{
// Normal query results come back with query_state not set.
// Actually this is not strictly true. The query state is set to
@@ -591,6 +679,12 @@ status_t DrillClientImpl::processQueryResult(AllocatedBufferPtr allocatedBuffer
DRILL_LOG(LOG_TRACE) << "DrillClientImpl::processQueryResult: Query State was not set.\n";
}
}
+ DRILL_LOG(LOG_TRACE) << "DrillClientImpl::processQueryResult: " << m_pendingRequests << " requests pending." << std::endl;
+ if(m_pendingRequests==0){
+ // signal any waiting client that it can exit because there are no more any query results to arrive.
+ // We keep the heartbeat going though.
+ m_cv.notify_one();
+ }
return ret;
}
@@ -841,7 +935,20 @@ void DrillClientImpl::handleRead(ByteBuf_t _buf,
return;
}
- if(!error && msg.m_rpc_type==exec::user::QUERY_RESULT){
+ if(!error && msg.m_mode==exec::rpc::PONG){ //heartbeat response. Throw it away
+ m_pendingRequests--;
+ delete allocatedBuffer;
+ DRILL_LOG(LOG_TRACE) << "Received heartbeat from server. " << std::endl;
+ if(m_pendingRequests!=0){
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ getNextResult();
+ }else{
+ boost::unique_lock<boost::mutex> cvLock(this->m_dcMutex);
+ DRILL_LOG(LOG_TRACE) << "No more results expected from server. " << std::endl;
+ m_cv.notify_one();
+ }
+ return;
+ }else if(!error && msg.m_rpc_type==exec::user::QUERY_RESULT){
status_t s = processQueryResult(allocatedBuffer, msg);
if(s !=QRY_SUCCESS && s!= QRY_NO_MORE_DATA){
if(m_pendingRequests!=0){
@@ -991,10 +1098,18 @@ void DrillClientImpl::broadcastError(DrillClientError* pErr){
std::map<int, DrillClientQueryResult*>::iterator iter;
if(!m_queryIds.empty()){
for(iter = m_queryIds.begin(); iter != m_queryIds.end(); iter++) {
- iter->second->signalError(pErr);
+ DrillClientError* err=new DrillClientError(pErr->status, pErr->errnum, pErr->msg);
+ iter->second->signalError(err);
}
}
+ delete pErr;
}
+ // We have an error at the connection level. Cancel the heartbeat.
+ // And close the connection
+ m_heartbeatTimer.cancel();
+ m_pendingRequests=0;
+ m_cv.notify_one();
+ shutdownSocket();
return;
}
@@ -1054,6 +1169,14 @@ void DrillClientImpl::sendCancel(exec::shared::QueryId* pQueryId){
DRILL_LOG(LOG_TRACE) << "CANCEL sent" << std::endl;
}
+void DrillClientImpl::shutdownSocket(){
+ m_io_service.stop();
+ boost::system::error_code ignorederr;
+ m_socket.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignorederr);
+ m_bIsConnected=false;
+ DRILL_LOG(LOG_TRACE) << "Socket shutdown" << std::endl;
+}
+
// This COPIES the FieldMetadata definition for the record batch. ColumnDefs held by this
// class are used by the async callbacks.
status_t DrillClientQueryResult::setupColumnDefs(exec::shared::QueryData* pQueryData) {
diff --git a/contrib/native/client/src/clientlib/drillClientImpl.hpp b/contrib/native/client/src/clientlib/drillClientImpl.hpp
index 04d59c763..ada63e113 100644
--- a/contrib/native/client/src/clientlib/drillClientImpl.hpp
+++ b/contrib/native/client/src/clientlib/drillClientImpl.hpp
@@ -201,6 +201,7 @@ class DrillClientImpl{
m_pWork(NULL),
m_socket(m_io_service),
m_deadlineTimer(m_io_service),
+ m_heartbeatTimer(m_io_service),
m_rbuf(NULL),
m_wbuf(MAX_SOCK_RD_BUFSIZE)
{
@@ -218,6 +219,7 @@ class DrillClientImpl{
this->m_pWork = NULL;
}
+ m_heartbeatTimer.cancel();
m_deadlineTimer.cancel();
m_io_service.stop();
boost::system::error_code ignorederr;
@@ -229,6 +231,13 @@ class DrillClientImpl{
if(m_pError!=NULL){
delete m_pError; m_pError=NULL;
}
+ //Terminate and free the heartbeat thread
+ //if(this->m_pHeartbeatThread!=NULL){
+ // this->m_pHeartbeatThread->interrupt();
+ // this->m_pHeartbeatThread->join();
+ // delete this->m_pHeartbeatThread;
+ // this->m_pHeartbeatThread = NULL;
+ //}
//Terminate and free the listener thread
if(this->m_pListenerThread!=NULL){
this->m_pListenerThread->interrupt();
@@ -260,6 +269,11 @@ class DrillClientImpl{
// Direct connection to a drillbit
// host can be name or ip address, port can be port number or name of service in /etc/services
connectionStatus_t connect(const char* host, const char* port);
+ void startHeartbeatTimer();// start a heartbeat timer
+ connectionStatus_t sendHeartbeat(); // send a heartbeat to the server
+ void resetHeartbeatTimer(); // reset the heartbeat timer (called every time one sends a message to the server (after sendAck, or submitQuery)
+ void handleHeartbeatTimeout(const boost::system::error_code & err); // send a heartbeat. If send fails, broadcast error, close connection and bail out.
+
int32_t getNextCoordinationId(){ return ++m_coordinationId; };
void parseConnectStr(const char* connectStr, std::string& pathToDrill, std::string& protocol, std::string& hostPortStr);
// send synchronous messages
@@ -269,6 +283,8 @@ class DrillClientImpl{
connectionStatus_t recvHandshake();
void handleHandshake(ByteBuf_t b, const boost::system::error_code& err, std::size_t bytes_transferred );
void handleHShakeReadTimeout(const boost::system::error_code & err);
+ // starts the listener thread that receives responses/messages from the server
+ void startMessageListener();
// Query results
void getNextResult();
status_t readMsg(
@@ -302,6 +318,8 @@ class DrillClientImpl{
void sendAck(InBoundRpcMessage& msg, bool isOk);
void sendCancel(exec::shared::QueryId* pQueryId);
+ void shutdownSocket();
+
static RpcEncoder s_encoder;
static RpcDecoder s_decoder;
@@ -325,6 +343,10 @@ class DrillClientImpl{
// If the error is query specific, only the query results object will have the error set.
DrillClientError* m_pError;
+ //Started after the connection is established and sends heartbeat messages after {heartbeat frequency} seconds
+ //The thread is killed on disconnect.
+ //boost::thread * m_pHeartbeatThread;
+
// for boost asio
boost::thread * m_pListenerThread;
boost::asio::io_service m_io_service;
@@ -332,6 +354,7 @@ class DrillClientImpl{
boost::asio::io_service::work * m_pWork;
boost::asio::ip::tcp::socket m_socket;
boost::asio::deadline_timer m_deadlineTimer; // to timeout async queries that never return
+ boost::asio::deadline_timer m_heartbeatTimer; // to send heartbeat messages
//for synchronous messages, like validate handshake
ByteBuf_t m_rbuf; // buffer for receiving synchronous messages
@@ -346,22 +369,15 @@ class DrillClientImpl{
// Map of query id to query result for currently executing queries
std::map<exec::shared::QueryId*, DrillClientQueryResult*, compareQueryId> m_queryResults;
+ // Condition variable to signal completion of all queries.
+ boost::condition_variable m_cv;
+
};
inline bool DrillClientImpl::Active() {
return this->m_bIsConnected;;
}
-inline void DrillClientImpl::Close() {
- //TODO: cancel pending query
- if(this->m_bIsConnected){
- boost::system::error_code ignorederr;
- m_socket.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignorederr);
- m_socket.close();
- m_bIsConnected=false;
- }
-}
-
class ZookeeperImpl{
public:
ZookeeperImpl();
diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp
index 2fa09545c..da411499d 100644
--- a/contrib/native/client/src/include/drill/common.hpp
+++ b/contrib/native/client/src/include/drill/common.hpp
@@ -109,7 +109,8 @@ typedef enum{
CONN_HANDSHAKE_TIMEOUT=5,
CONN_HOSTNAME_RESOLUTION_ERROR=6,
CONN_AUTH_FAILED=7,
- CONN_BAD_RPC_VER=8
+ CONN_BAD_RPC_VER=8,
+ CONN_DEAD=9
} connectionStatus_t;
typedef enum{
diff --git a/contrib/native/client/src/include/drill/drillClient.hpp b/contrib/native/client/src/include/drill/drillClient.hpp
index d7bf33c07..4568ca1fc 100644
--- a/contrib/native/client/src/include/drill/drillClient.hpp
+++ b/contrib/native/client/src/include/drill/drillClient.hpp
@@ -101,9 +101,11 @@ class DECLSPEC_DRILL_CLIENT DrillClientConfig{
static void setSocketTimeout(int32_t l);
static void setHandshakeTimeout(int32_t l);
static void setQueryTimeout(int32_t l);
+ static void setHeartbeatFrequency(int32_t l);
static int32_t getSocketTimeout();
static int32_t getHandshakeTimeout();
static int32_t getQueryTimeout();
+ static int32_t getHeartbeatFrequency();
static logLevel_t getLogLevel();
private:
// The logging level
@@ -127,10 +129,14 @@ class DECLSPEC_DRILL_CLIENT DrillClientConfig{
*
* s_queryTimeout: (default 180)
* place a timeout on waiting result of querying.
+ *
+ * s_heartbeatFrequency: (default 30)
+ * Seconds of idle activity after which a heartbeat is sent to the drillbit
*/
static int32_t s_socketTimeout;
static int32_t s_handshakeTimeout;
static int32_t s_queryTimeout;
+ static int32_t s_heartbeatFrequency;
static boost::mutex s_mutex;
};
@@ -215,6 +221,7 @@ class DECLSPEC_DRILL_CLIENT RecordIterator{
void registerSchemaChangeListener(pfnSchemaListener l);
+ bool hasError();
/*
* Returns the last error message
*/
diff --git a/contrib/native/client/src/protobuf/BitControl.pb.cc b/contrib/native/client/src/protobuf/BitControl.pb.cc
index 827f70815..a4661b449 100644
--- a/contrib/native/client/src/protobuf/BitControl.pb.cc
+++ b/contrib/native/client/src/protobuf/BitControl.pb.cc
@@ -37,6 +37,9 @@ const ::google::protobuf::internal::GeneratedMessageReflection*
const ::google::protobuf::Descriptor* PlanFragment_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
PlanFragment_reflection_ = NULL;
+const ::google::protobuf::Descriptor* QueryContextInformation_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ QueryContextInformation_reflection_ = NULL;
const ::google::protobuf::Descriptor* WorkQueueStatus_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
WorkQueueStatus_reflection_ = NULL;
@@ -118,22 +121,21 @@ void protobuf_AssignDesc_BitControl_2eproto() {
::google::protobuf::MessageFactory::generated_factory(),
sizeof(InitializeFragments));
PlanFragment_descriptor_ = file->message_type(4);
- static const int PlanFragment_offsets_[15] = {
+ static const int PlanFragment_offsets_[14] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, handle_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, network_cost_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, cpu_cost_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, disk_cost_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, memory_cost_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, fragment_json_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, assignment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, leaf_fragment_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, assignment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, foreman_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, mem_initial_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, mem_max_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, query_start_time_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, credentials_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, time_zone_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, options_json_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, context_),
};
PlanFragment_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -146,7 +148,24 @@ void protobuf_AssignDesc_BitControl_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(PlanFragment));
- WorkQueueStatus_descriptor_ = file->message_type(5);
+ QueryContextInformation_descriptor_ = file->message_type(5);
+ static const int QueryContextInformation_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryContextInformation, query_start_time_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryContextInformation, time_zone_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryContextInformation, default_schema_name_),
+ };
+ QueryContextInformation_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ QueryContextInformation_descriptor_,
+ QueryContextInformation::default_instance_,
+ QueryContextInformation_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryContextInformation, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryContextInformation, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(QueryContextInformation));
+ WorkQueueStatus_descriptor_ = file->message_type(6);
static const int WorkQueueStatus_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, endpoint_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, queue_length_),
@@ -163,7 +182,7 @@ void protobuf_AssignDesc_BitControl_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(WorkQueueStatus));
- FinishedReceiver_descriptor_ = file->message_type(6);
+ FinishedReceiver_descriptor_ = file->message_type(7);
static const int FinishedReceiver_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FinishedReceiver, receiver_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FinishedReceiver, sender_),
@@ -203,6 +222,8 @@ void protobuf_RegisterTypes(const ::std::string&) {
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
PlanFragment_descriptor_, &PlanFragment::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ QueryContextInformation_descriptor_, &QueryContextInformation::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
WorkQueueStatus_descriptor_, &WorkQueueStatus::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
FinishedReceiver_descriptor_, &FinishedReceiver::default_instance());
@@ -221,6 +242,8 @@ void protobuf_ShutdownFile_BitControl_2eproto() {
delete InitializeFragments_reflection_;
delete PlanFragment::default_instance_;
delete PlanFragment_reflection_;
+ delete QueryContextInformation::default_instance_;
+ delete QueryContextInformation_reflection_;
delete WorkQueueStatus::default_instance_;
delete WorkQueueStatus_reflection_;
delete FinishedReceiver::default_instance_;
@@ -249,32 +272,36 @@ void protobuf_AddDesc_BitControl_2eproto() {
"red.MinorFragmentProfile\022(\n\006handle\030\002 \001(\013"
"2\030.exec.bit.FragmentHandle\"G\n\023Initialize"
"Fragments\0220\n\010fragment\030\001 \003(\0132\036.exec.bit.c"
- "ontrol.PlanFragment\"\275\003\n\014PlanFragment\022(\n\006"
+ "ontrol.PlanFragment\"\314\003\n\014PlanFragment\022(\n\006"
"handle\030\001 \001(\0132\030.exec.bit.FragmentHandle\022\024"
"\n\014network_cost\030\004 \001(\002\022\020\n\010cpu_cost\030\005 \001(\002\022\021"
"\n\tdisk_cost\030\006 \001(\002\022\023\n\013memory_cost\030\007 \001(\002\022\025"
- "\n\rfragment_json\030\010 \001(\t\022*\n\nassignment\030\n \001("
- "\0132\026.exec.DrillbitEndpoint\022\025\n\rleaf_fragme"
- "nt\030\t \001(\010\022\'\n\007foreman\030\013 \001(\0132\026.exec.Drillbi"
+ "\n\rfragment_json\030\010 \001(\t\022\025\n\rleaf_fragment\030\t"
+ " \001(\010\022*\n\nassignment\030\n \001(\0132\026.exec.Drillbit"
+ "Endpoint\022\'\n\007foreman\030\013 \001(\0132\026.exec.Drillbi"
"tEndpoint\022\035\n\013mem_initial\030\014 \001(\003:\01020000000"
- "\022\033\n\007mem_max\030\r \001(\003:\n2000000000\022\030\n\020query_s"
- "tart_time\030\016 \001(\003\0221\n\013credentials\030\017 \001(\0132\034.e"
- "xec.shared.UserCredentials\022\021\n\ttime_zone\030"
- "\020 \001(\005\022\024\n\014options_json\030\021 \001(\t\"f\n\017WorkQueue"
- "Status\022(\n\010endpoint\030\001 \001(\0132\026.exec.Drillbit"
- "Endpoint\022\024\n\014queue_length\030\002 \001(\005\022\023\n\013report"
- "_time\030\003 \001(\003\"h\n\020FinishedReceiver\022*\n\010recei"
- "ver\030\001 \001(\0132\030.exec.bit.FragmentHandle\022(\n\006s"
- "ender\030\002 \001(\0132\030.exec.bit.FragmentHandle*\271\002"
- "\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOO"
- "DBYE\020\002\022\034\n\030REQ_INIATILIZE_FRAGMENTS\020\003\022\027\n\023"
- "REQ_CANCEL_FRAGMENT\020\006\022\031\n\025REQ_RECEIVER_FI"
- "NISHED\020\007\022\027\n\023REQ_FRAGMENT_STATUS\020\010\022\022\n\016REQ"
- "_BIT_STATUS\020\t\022\024\n\020REQ_QUERY_STATUS\020\n\022\024\n\020R"
- "EQ_QUERY_CANCEL\020\017\022\030\n\024RESP_FRAGMENT_HANDL"
- "E\020\013\022\030\n\024RESP_FRAGMENT_STATUS\020\014\022\023\n\017RESP_BI"
- "T_STATUS\020\r\022\025\n\021RESP_QUERY_STATUS\020\016B+\n\033org"
- ".apache.drill.exec.protoB\nBitControlH\001", 1518);
+ "\022\033\n\007mem_max\030\r \001(\003:\n2000000000\0221\n\013credent"
+ "ials\030\016 \001(\0132\034.exec.shared.UserCredentials"
+ "\022\024\n\014options_json\030\017 \001(\t\022:\n\007context\030\020 \001(\0132"
+ ").exec.bit.control.QueryContextInformati"
+ "on\"c\n\027QueryContextInformation\022\030\n\020query_s"
+ "tart_time\030\001 \001(\003\022\021\n\ttime_zone\030\002 \001(\005\022\033\n\023de"
+ "fault_schema_name\030\003 \001(\t\"f\n\017WorkQueueStat"
+ "us\022(\n\010endpoint\030\001 \001(\0132\026.exec.DrillbitEndp"
+ "oint\022\024\n\014queue_length\030\002 \001(\005\022\023\n\013report_tim"
+ "e\030\003 \001(\003\"h\n\020FinishedReceiver\022*\n\010receiver\030"
+ "\001 \001(\0132\030.exec.bit.FragmentHandle\022(\n\006sende"
+ "r\030\002 \001(\0132\030.exec.bit.FragmentHandle*\323\002\n\007Rp"
+ "cType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE"
+ "\020\002\022\034\n\030REQ_INITIALIZE_FRAGMENTS\020\003\022\027\n\023REQ_"
+ "CANCEL_FRAGMENT\020\006\022\031\n\025REQ_RECEIVER_FINISH"
+ "ED\020\007\022\027\n\023REQ_FRAGMENT_STATUS\020\010\022\022\n\016REQ_BIT"
+ "_STATUS\020\t\022\024\n\020REQ_QUERY_STATUS\020\n\022\024\n\020REQ_Q"
+ "UERY_CANCEL\020\017\022\030\n\024REQ_UNPAUSE_FRAGMENT\020\020\022"
+ "\030\n\024RESP_FRAGMENT_HANDLE\020\013\022\030\n\024RESP_FRAGME"
+ "NT_STATUS\020\014\022\023\n\017RESP_BIT_STATUS\020\r\022\025\n\021RESP"
+ "_QUERY_STATUS\020\016B+\n\033org.apache.drill.exec"
+ ".protoB\nBitControlH\001", 1660);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"BitControl.proto", &protobuf_RegisterTypes);
BitControlHandshake::default_instance_ = new BitControlHandshake();
@@ -282,6 +309,7 @@ void protobuf_AddDesc_BitControl_2eproto() {
FragmentStatus::default_instance_ = new FragmentStatus();
InitializeFragments::default_instance_ = new InitializeFragments();
PlanFragment::default_instance_ = new PlanFragment();
+ QueryContextInformation::default_instance_ = new QueryContextInformation();
WorkQueueStatus::default_instance_ = new WorkQueueStatus();
FinishedReceiver::default_instance_ = new FinishedReceiver();
BitControlHandshake::default_instance_->InitAsDefaultInstance();
@@ -289,6 +317,7 @@ void protobuf_AddDesc_BitControl_2eproto() {
FragmentStatus::default_instance_->InitAsDefaultInstance();
InitializeFragments::default_instance_->InitAsDefaultInstance();
PlanFragment::default_instance_->InitAsDefaultInstance();
+ QueryContextInformation::default_instance_->InitAsDefaultInstance();
WorkQueueStatus::default_instance_->InitAsDefaultInstance();
FinishedReceiver::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_BitControl_2eproto);
@@ -320,6 +349,7 @@ bool RpcType_IsValid(int value) {
case 13:
case 14:
case 15:
+ case 16:
return true;
default:
return false;
@@ -1299,15 +1329,14 @@ const int PlanFragment::kCpuCostFieldNumber;
const int PlanFragment::kDiskCostFieldNumber;
const int PlanFragment::kMemoryCostFieldNumber;
const int PlanFragment::kFragmentJsonFieldNumber;
-const int PlanFragment::kAssignmentFieldNumber;
const int PlanFragment::kLeafFragmentFieldNumber;
+const int PlanFragment::kAssignmentFieldNumber;
const int PlanFragment::kForemanFieldNumber;
const int PlanFragment::kMemInitialFieldNumber;
const int PlanFragment::kMemMaxFieldNumber;
-const int PlanFragment::kQueryStartTimeFieldNumber;
const int PlanFragment::kCredentialsFieldNumber;
-const int PlanFragment::kTimeZoneFieldNumber;
const int PlanFragment::kOptionsJsonFieldNumber;
+const int PlanFragment::kContextFieldNumber;
#endif // !_MSC_VER
PlanFragment::PlanFragment()
@@ -1320,6 +1349,7 @@ void PlanFragment::InitAsDefaultInstance() {
assignment_ = const_cast< ::exec::DrillbitEndpoint*>(&::exec::DrillbitEndpoint::default_instance());
foreman_ = const_cast< ::exec::DrillbitEndpoint*>(&::exec::DrillbitEndpoint::default_instance());
credentials_ = const_cast< ::exec::shared::UserCredentials*>(&::exec::shared::UserCredentials::default_instance());
+ context_ = const_cast< ::exec::bit::control::QueryContextInformation*>(&::exec::bit::control::QueryContextInformation::default_instance());
}
PlanFragment::PlanFragment(const PlanFragment& from)
@@ -1336,15 +1366,14 @@ void PlanFragment::SharedCtor() {
disk_cost_ = 0;
memory_cost_ = 0;
fragment_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
- assignment_ = NULL;
leaf_fragment_ = false;
+ assignment_ = NULL;
foreman_ = NULL;
mem_initial_ = GOOGLE_LONGLONG(20000000);
mem_max_ = GOOGLE_LONGLONG(2000000000);
- query_start_time_ = GOOGLE_LONGLONG(0);
credentials_ = NULL;
- time_zone_ = 0;
options_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ context_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -1364,6 +1393,7 @@ void PlanFragment::SharedDtor() {
delete assignment_;
delete foreman_;
delete credentials_;
+ delete context_;
}
}
@@ -1402,10 +1432,10 @@ void PlanFragment::Clear() {
fragment_json_->clear();
}
}
+ leaf_fragment_ = false;
if (has_assignment()) {
if (assignment_ != NULL) assignment_->::exec::DrillbitEndpoint::Clear();
}
- leaf_fragment_ = false;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (has_foreman()) {
@@ -1413,16 +1443,17 @@ void PlanFragment::Clear() {
}
mem_initial_ = GOOGLE_LONGLONG(20000000);
mem_max_ = GOOGLE_LONGLONG(2000000000);
- query_start_time_ = GOOGLE_LONGLONG(0);
if (has_credentials()) {
if (credentials_ != NULL) credentials_->::exec::shared::UserCredentials::Clear();
}
- time_zone_ = 0;
if (has_options_json()) {
if (options_json_ != &::google::protobuf::internal::kEmptyString) {
options_json_->clear();
}
}
+ if (has_context()) {
+ if (context_ != NULL) context_->::exec::bit::control::QueryContextInformation::Clear();
+ }
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
@@ -1600,29 +1631,13 @@ bool PlanFragment::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
- if (input->ExpectTag(112)) goto parse_query_start_time;
+ if (input->ExpectTag(114)) goto parse_credentials;
break;
}
- // optional int64 query_start_time = 14;
+ // optional .exec.shared.UserCredentials credentials = 14;
case 14: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_query_start_time:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &query_start_time_)));
- set_has_query_start_time();
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(122)) goto parse_credentials;
- break;
- }
-
- // optional .exec.shared.UserCredentials credentials = 15;
- case 15: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_credentials:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
@@ -1630,36 +1645,34 @@ bool PlanFragment::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
- if (input->ExpectTag(128)) goto parse_time_zone;
+ if (input->ExpectTag(122)) goto parse_options_json;
break;
}
- // optional int32 time_zone = 16;
- case 16: {
+ // optional string options_json = 15;
+ case 15: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_time_zone:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &time_zone_)));
- set_has_time_zone();
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_options_json:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_options_json()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->options_json().data(), this->options_json().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
- if (input->ExpectTag(138)) goto parse_options_json;
+ if (input->ExpectTag(130)) goto parse_context;
break;
}
- // optional string options_json = 17;
- case 17: {
+ // optional .exec.bit.control.QueryContextInformation context = 16;
+ case 16: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_options_json:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_options_json()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8String(
- this->options_json().data(), this->options_json().length(),
- ::google::protobuf::internal::WireFormat::PARSE);
+ parse_context:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_context()));
} else {
goto handle_uninterpreted;
}
@@ -1747,29 +1760,25 @@ void PlanFragment::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormatLite::WriteInt64(13, this->mem_max(), output);
}
- // optional int64 query_start_time = 14;
- if (has_query_start_time()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(14, this->query_start_time(), output);
- }
-
- // optional .exec.shared.UserCredentials credentials = 15;
+ // optional .exec.shared.UserCredentials credentials = 14;
if (has_credentials()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 15, this->credentials(), output);
- }
-
- // optional int32 time_zone = 16;
- if (has_time_zone()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(16, this->time_zone(), output);
+ 14, this->credentials(), output);
}
- // optional string options_json = 17;
+ // optional string options_json = 15;
if (has_options_json()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->options_json().data(), this->options_json().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
- 17, this->options_json(), output);
+ 15, this->options_json(), output);
+ }
+
+ // optional .exec.bit.control.QueryContextInformation context = 16;
+ if (has_context()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 16, this->context(), output);
}
if (!unknown_fields().empty()) {
@@ -1846,31 +1855,28 @@ void PlanFragment::SerializeWithCachedSizes(
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(13, this->mem_max(), target);
}
- // optional int64 query_start_time = 14;
- if (has_query_start_time()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(14, this->query_start_time(), target);
- }
-
- // optional .exec.shared.UserCredentials credentials = 15;
+ // optional .exec.shared.UserCredentials credentials = 14;
if (has_credentials()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
- 15, this->credentials(), target);
- }
-
- // optional int32 time_zone = 16;
- if (has_time_zone()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(16, this->time_zone(), target);
+ 14, this->credentials(), target);
}
- // optional string options_json = 17;
+ // optional string options_json = 15;
if (has_options_json()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->options_json().data(), this->options_json().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 17, this->options_json(), target);
+ 15, this->options_json(), target);
+ }
+
+ // optional .exec.bit.control.QueryContextInformation context = 16;
+ if (has_context()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 16, this->context(), target);
}
if (!unknown_fields().empty()) {
@@ -1918,6 +1924,11 @@ int PlanFragment::ByteSize() const {
this->fragment_json());
}
+ // optional bool leaf_fragment = 9;
+ if (has_leaf_fragment()) {
+ total_size += 1 + 1;
+ }
+
// optional .exec.DrillbitEndpoint assignment = 10;
if (has_assignment()) {
total_size += 1 +
@@ -1925,11 +1936,6 @@ int PlanFragment::ByteSize() const {
this->assignment());
}
- // optional bool leaf_fragment = 9;
- if (has_leaf_fragment()) {
- total_size += 1 + 1;
- }
-
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
// optional .exec.DrillbitEndpoint foreman = 11;
@@ -1953,34 +1959,27 @@ int PlanFragment::ByteSize() const {
this->mem_max());
}
- // optional int64 query_start_time = 14;
- if (has_query_start_time()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->query_start_time());
- }
-
- // optional .exec.shared.UserCredentials credentials = 15;
+ // optional .exec.shared.UserCredentials credentials = 14;
if (has_credentials()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->credentials());
}
- // optional int32 time_zone = 16;
- if (has_time_zone()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->time_zone());
- }
-
- // optional string options_json = 17;
+ // optional string options_json = 15;
if (has_options_json()) {
- total_size += 2 +
+ total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->options_json());
}
+ // optional .exec.bit.control.QueryContextInformation context = 16;
+ if (has_context()) {
+ total_size += 2 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->context());
+ }
+
}
if (!unknown_fields().empty()) {
total_size +=
@@ -2026,12 +2025,12 @@ void PlanFragment::MergeFrom(const PlanFragment& from) {
if (from.has_fragment_json()) {
set_fragment_json(from.fragment_json());
}
- if (from.has_assignment()) {
- mutable_assignment()->::exec::DrillbitEndpoint::MergeFrom(from.assignment());
- }
if (from.has_leaf_fragment()) {
set_leaf_fragment(from.leaf_fragment());
}
+ if (from.has_assignment()) {
+ mutable_assignment()->::exec::DrillbitEndpoint::MergeFrom(from.assignment());
+ }
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_foreman()) {
@@ -2043,18 +2042,15 @@ void PlanFragment::MergeFrom(const PlanFragment& from) {
if (from.has_mem_max()) {
set_mem_max(from.mem_max());
}
- if (from.has_query_start_time()) {
- set_query_start_time(from.query_start_time());
- }
if (from.has_credentials()) {
mutable_credentials()->::exec::shared::UserCredentials::MergeFrom(from.credentials());
}
- if (from.has_time_zone()) {
- set_time_zone(from.time_zone());
- }
if (from.has_options_json()) {
set_options_json(from.options_json());
}
+ if (from.has_context()) {
+ mutable_context()->::exec::bit::control::QueryContextInformation::MergeFrom(from.context());
+ }
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
@@ -2084,15 +2080,14 @@ void PlanFragment::Swap(PlanFragment* other) {
std::swap(disk_cost_, other->disk_cost_);
std::swap(memory_cost_, other->memory_cost_);
std::swap(fragment_json_, other->fragment_json_);
- std::swap(assignment_, other->assignment_);
std::swap(leaf_fragment_, other->leaf_fragment_);
+ std::swap(assignment_, other->assignment_);
std::swap(foreman_, other->foreman_);
std::swap(mem_initial_, other->mem_initial_);
std::swap(mem_max_, other->mem_max_);
- std::swap(query_start_time_, other->query_start_time_);
std::swap(credentials_, other->credentials_);
- std::swap(time_zone_, other->time_zone_);
std::swap(options_json_, other->options_json_);
+ std::swap(context_, other->context_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
@@ -2111,6 +2106,311 @@ void PlanFragment::Swap(PlanFragment* other) {
// ===================================================================
#ifndef _MSC_VER
+const int QueryContextInformation::kQueryStartTimeFieldNumber;
+const int QueryContextInformation::kTimeZoneFieldNumber;
+const int QueryContextInformation::kDefaultSchemaNameFieldNumber;
+#endif // !_MSC_VER
+
+QueryContextInformation::QueryContextInformation()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void QueryContextInformation::InitAsDefaultInstance() {
+}
+
+QueryContextInformation::QueryContextInformation(const QueryContextInformation& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void QueryContextInformation::SharedCtor() {
+ _cached_size_ = 0;
+ query_start_time_ = GOOGLE_LONGLONG(0);
+ time_zone_ = 0;
+ default_schema_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+QueryContextInformation::~QueryContextInformation() {
+ SharedDtor();
+}
+
+void QueryContextInformation::SharedDtor() {
+ if (default_schema_name_ != &::google::protobuf::internal::kEmptyString) {
+ delete default_schema_name_;
+ }
+ if (this != default_instance_) {
+ }
+}
+
+void QueryContextInformation::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* QueryContextInformation::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return QueryContextInformation_descriptor_;
+}
+
+const QueryContextInformation& QueryContextInformation::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitControl_2eproto();
+ return *default_instance_;
+}
+
+QueryContextInformation* QueryContextInformation::default_instance_ = NULL;
+
+QueryContextInformation* QueryContextInformation::New() const {
+ return new QueryContextInformation;
+}
+
+void QueryContextInformation::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ query_start_time_ = GOOGLE_LONGLONG(0);
+ time_zone_ = 0;
+ if (has_default_schema_name()) {
+ if (default_schema_name_ != &::google::protobuf::internal::kEmptyString) {
+ default_schema_name_->clear();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool QueryContextInformation::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint32 tag;
+ while ((tag = input->ReadTag()) != 0) {
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // optional int64 query_start_time = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &query_start_time_)));
+ set_has_query_start_time();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_time_zone;
+ break;
+ }
+
+ // optional int32 time_zone = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_time_zone:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &time_zone_)));
+ set_has_time_zone();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_default_schema_name;
+ break;
+ }
+
+ // optional string default_schema_name = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_default_schema_name:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_default_schema_name()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->default_schema_name().data(), this->default_schema_name().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectAtEnd()) return true;
+ break;
+ }
+
+ default: {
+ handle_uninterpreted:
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ return true;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+ return true;
+#undef DO_
+}
+
+void QueryContextInformation::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int64 query_start_time = 1;
+ if (has_query_start_time()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->query_start_time(), output);
+ }
+
+ // optional int32 time_zone = 2;
+ if (has_time_zone()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->time_zone(), output);
+ }
+
+ // optional string default_schema_name = 3;
+ if (has_default_schema_name()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->default_schema_name().data(), this->default_schema_name().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 3, this->default_schema_name(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* QueryContextInformation::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int64 query_start_time = 1;
+ if (has_query_start_time()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->query_start_time(), target);
+ }
+
+ // optional int32 time_zone = 2;
+ if (has_time_zone()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->time_zone(), target);
+ }
+
+ // optional string default_schema_name = 3;
+ if (has_default_schema_name()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->default_schema_name().data(), this->default_schema_name().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 3, this->default_schema_name(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int QueryContextInformation::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int64 query_start_time = 1;
+ if (has_query_start_time()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->query_start_time());
+ }
+
+ // optional int32 time_zone = 2;
+ if (has_time_zone()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->time_zone());
+ }
+
+ // optional string default_schema_name = 3;
+ if (has_default_schema_name()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->default_schema_name());
+ }
+
+ }
+ if (!unknown_fields().empty()) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ unknown_fields());
+ }
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = total_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void QueryContextInformation::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const QueryContextInformation* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const QueryContextInformation*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void QueryContextInformation::MergeFrom(const QueryContextInformation& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_query_start_time()) {
+ set_query_start_time(from.query_start_time());
+ }
+ if (from.has_time_zone()) {
+ set_time_zone(from.time_zone());
+ }
+ if (from.has_default_schema_name()) {
+ set_default_schema_name(from.default_schema_name());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void QueryContextInformation::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void QueryContextInformation::CopyFrom(const QueryContextInformation& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool QueryContextInformation::IsInitialized() const {
+
+ return true;
+}
+
+void QueryContextInformation::Swap(QueryContextInformation* other) {
+ if (other != this) {
+ std::swap(query_start_time_, other->query_start_time_);
+ std::swap(time_zone_, other->time_zone_);
+ std::swap(default_schema_name_, other->default_schema_name_);
+ std::swap(_has_bits_[0], other->_has_bits_[0]);
+ _unknown_fields_.Swap(&other->_unknown_fields_);
+ std::swap(_cached_size_, other->_cached_size_);
+ }
+}
+
+::google::protobuf::Metadata QueryContextInformation::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = QueryContextInformation_descriptor_;
+ metadata.reflection = QueryContextInformation_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
const int WorkQueueStatus::kEndpointFieldNumber;
const int WorkQueueStatus::kQueueLengthFieldNumber;
const int WorkQueueStatus::kReportTimeFieldNumber;
diff --git a/contrib/native/client/src/protobuf/BitControl.pb.h b/contrib/native/client/src/protobuf/BitControl.pb.h
index 865d37728..7a34cc430 100644
--- a/contrib/native/client/src/protobuf/BitControl.pb.h
+++ b/contrib/native/client/src/protobuf/BitControl.pb.h
@@ -44,6 +44,7 @@ class BitStatus;
class FragmentStatus;
class InitializeFragments;
class PlanFragment;
+class QueryContextInformation;
class WorkQueueStatus;
class FinishedReceiver;
@@ -51,13 +52,14 @@ enum RpcType {
HANDSHAKE = 0,
ACK = 1,
GOODBYE = 2,
- REQ_INIATILIZE_FRAGMENTS = 3,
+ REQ_INITIALIZE_FRAGMENTS = 3,
REQ_CANCEL_FRAGMENT = 6,
REQ_RECEIVER_FINISHED = 7,
REQ_FRAGMENT_STATUS = 8,
REQ_BIT_STATUS = 9,
REQ_QUERY_STATUS = 10,
REQ_QUERY_CANCEL = 15,
+ REQ_UNPAUSE_FRAGMENT = 16,
RESP_FRAGMENT_HANDLE = 11,
RESP_FRAGMENT_STATUS = 12,
RESP_BIT_STATUS = 13,
@@ -65,7 +67,7 @@ enum RpcType {
};
bool RpcType_IsValid(int value);
const RpcType RpcType_MIN = HANDSHAKE;
-const RpcType RpcType_MAX = REQ_QUERY_CANCEL;
+const RpcType RpcType_MAX = REQ_UNPAUSE_FRAGMENT;
const int RpcType_ARRAYSIZE = RpcType_MAX + 1;
const ::google::protobuf::EnumDescriptor* RpcType_descriptor();
@@ -553,6 +555,13 @@ class PlanFragment : public ::google::protobuf::Message {
inline ::std::string* release_fragment_json();
inline void set_allocated_fragment_json(::std::string* fragment_json);
+ // optional bool leaf_fragment = 9;
+ inline bool has_leaf_fragment() const;
+ inline void clear_leaf_fragment();
+ static const int kLeafFragmentFieldNumber = 9;
+ inline bool leaf_fragment() const;
+ inline void set_leaf_fragment(bool value);
+
// optional .exec.DrillbitEndpoint assignment = 10;
inline bool has_assignment() const;
inline void clear_assignment();
@@ -562,13 +571,6 @@ class PlanFragment : public ::google::protobuf::Message {
inline ::exec::DrillbitEndpoint* release_assignment();
inline void set_allocated_assignment(::exec::DrillbitEndpoint* assignment);
- // optional bool leaf_fragment = 9;
- inline bool has_leaf_fragment() const;
- inline void clear_leaf_fragment();
- static const int kLeafFragmentFieldNumber = 9;
- inline bool leaf_fragment() const;
- inline void set_leaf_fragment(bool value);
-
// optional .exec.DrillbitEndpoint foreman = 11;
inline bool has_foreman() const;
inline void clear_foreman();
@@ -592,33 +594,19 @@ class PlanFragment : public ::google::protobuf::Message {
inline ::google::protobuf::int64 mem_max() const;
inline void set_mem_max(::google::protobuf::int64 value);
- // optional int64 query_start_time = 14;
- inline bool has_query_start_time() const;
- inline void clear_query_start_time();
- static const int kQueryStartTimeFieldNumber = 14;
- inline ::google::protobuf::int64 query_start_time() const;
- inline void set_query_start_time(::google::protobuf::int64 value);
-
- // optional .exec.shared.UserCredentials credentials = 15;
+ // optional .exec.shared.UserCredentials credentials = 14;
inline bool has_credentials() const;
inline void clear_credentials();
- static const int kCredentialsFieldNumber = 15;
+ static const int kCredentialsFieldNumber = 14;
inline const ::exec::shared::UserCredentials& credentials() const;
inline ::exec::shared::UserCredentials* mutable_credentials();
inline ::exec::shared::UserCredentials* release_credentials();
inline void set_allocated_credentials(::exec::shared::UserCredentials* credentials);
- // optional int32 time_zone = 16;
- inline bool has_time_zone() const;
- inline void clear_time_zone();
- static const int kTimeZoneFieldNumber = 16;
- inline ::google::protobuf::int32 time_zone() const;
- inline void set_time_zone(::google::protobuf::int32 value);
-
- // optional string options_json = 17;
+ // optional string options_json = 15;
inline bool has_options_json() const;
inline void clear_options_json();
- static const int kOptionsJsonFieldNumber = 17;
+ static const int kOptionsJsonFieldNumber = 15;
inline const ::std::string& options_json() const;
inline void set_options_json(const ::std::string& value);
inline void set_options_json(const char* value);
@@ -627,6 +615,15 @@ class PlanFragment : public ::google::protobuf::Message {
inline ::std::string* release_options_json();
inline void set_allocated_options_json(::std::string* options_json);
+ // optional .exec.bit.control.QueryContextInformation context = 16;
+ inline bool has_context() const;
+ inline void clear_context();
+ static const int kContextFieldNumber = 16;
+ inline const ::exec::bit::control::QueryContextInformation& context() const;
+ inline ::exec::bit::control::QueryContextInformation* mutable_context();
+ inline ::exec::bit::control::QueryContextInformation* release_context();
+ inline void set_allocated_context(::exec::bit::control::QueryContextInformation* context);
+
// @@protoc_insertion_point(class_scope:exec.bit.control.PlanFragment)
private:
inline void set_has_handle();
@@ -641,24 +638,22 @@ class PlanFragment : public ::google::protobuf::Message {
inline void clear_has_memory_cost();
inline void set_has_fragment_json();
inline void clear_has_fragment_json();
- inline void set_has_assignment();
- inline void clear_has_assignment();
inline void set_has_leaf_fragment();
inline void clear_has_leaf_fragment();
+ inline void set_has_assignment();
+ inline void clear_has_assignment();
inline void set_has_foreman();
inline void clear_has_foreman();
inline void set_has_mem_initial();
inline void clear_has_mem_initial();
inline void set_has_mem_max();
inline void clear_has_mem_max();
- inline void set_has_query_start_time();
- inline void clear_has_query_start_time();
inline void set_has_credentials();
inline void clear_has_credentials();
- inline void set_has_time_zone();
- inline void clear_has_time_zone();
inline void set_has_options_json();
inline void clear_has_options_json();
+ inline void set_has_context();
+ inline void clear_has_context();
::google::protobuf::UnknownFieldSet _unknown_fields_;
@@ -671,15 +666,14 @@ class PlanFragment : public ::google::protobuf::Message {
::exec::DrillbitEndpoint* assignment_;
::exec::DrillbitEndpoint* foreman_;
::google::protobuf::int64 mem_initial_;
- bool leaf_fragment_;
- ::google::protobuf::int32 time_zone_;
::google::protobuf::int64 mem_max_;
- ::google::protobuf::int64 query_start_time_;
::exec::shared::UserCredentials* credentials_;
::std::string* options_json_;
+ ::exec::bit::control::QueryContextInformation* context_;
+ bool leaf_fragment_;
mutable int _cached_size_;
- ::google::protobuf::uint32 _has_bits_[(15 + 31) / 32];
+ ::google::protobuf::uint32 _has_bits_[(14 + 31) / 32];
friend void protobuf_AddDesc_BitControl_2eproto();
friend void protobuf_AssignDesc_BitControl_2eproto();
@@ -690,6 +684,113 @@ class PlanFragment : public ::google::protobuf::Message {
};
// -------------------------------------------------------------------
+class QueryContextInformation : public ::google::protobuf::Message {
+ public:
+ QueryContextInformation();
+ virtual ~QueryContextInformation();
+
+ QueryContextInformation(const QueryContextInformation& from);
+
+ inline QueryContextInformation& operator=(const QueryContextInformation& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _unknown_fields_;
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return &_unknown_fields_;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const QueryContextInformation& default_instance();
+
+ void Swap(QueryContextInformation* other);
+
+ // implements Message ----------------------------------------------
+
+ QueryContextInformation* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const QueryContextInformation& from);
+ void MergeFrom(const QueryContextInformation& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional int64 query_start_time = 1;
+ inline bool has_query_start_time() const;
+ inline void clear_query_start_time();
+ static const int kQueryStartTimeFieldNumber = 1;
+ inline ::google::protobuf::int64 query_start_time() const;
+ inline void set_query_start_time(::google::protobuf::int64 value);
+
+ // optional int32 time_zone = 2;
+ inline bool has_time_zone() const;
+ inline void clear_time_zone();
+ static const int kTimeZoneFieldNumber = 2;
+ inline ::google::protobuf::int32 time_zone() const;
+ inline void set_time_zone(::google::protobuf::int32 value);
+
+ // optional string default_schema_name = 3;
+ inline bool has_default_schema_name() const;
+ inline void clear_default_schema_name();
+ static const int kDefaultSchemaNameFieldNumber = 3;
+ inline const ::std::string& default_schema_name() const;
+ inline void set_default_schema_name(const ::std::string& value);
+ inline void set_default_schema_name(const char* value);
+ inline void set_default_schema_name(const char* value, size_t size);
+ inline ::std::string* mutable_default_schema_name();
+ inline ::std::string* release_default_schema_name();
+ inline void set_allocated_default_schema_name(::std::string* default_schema_name);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.control.QueryContextInformation)
+ private:
+ inline void set_has_query_start_time();
+ inline void clear_has_query_start_time();
+ inline void set_has_time_zone();
+ inline void clear_has_time_zone();
+ inline void set_has_default_schema_name();
+ inline void clear_has_default_schema_name();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int64 query_start_time_;
+ ::std::string* default_schema_name_;
+ ::google::protobuf::int32 time_zone_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_BitControl_2eproto();
+ friend void protobuf_AssignDesc_BitControl_2eproto();
+ friend void protobuf_ShutdownFile_BitControl_2eproto();
+
+ void InitAsDefaultInstance();
+ static QueryContextInformation* default_instance_;
+};
+// -------------------------------------------------------------------
+
class WorkQueueStatus : public ::google::protobuf::Message {
public:
WorkQueueStatus();
@@ -1316,15 +1417,37 @@ inline void PlanFragment::set_allocated_fragment_json(::std::string* fragment_js
}
}
+// optional bool leaf_fragment = 9;
+inline bool PlanFragment::has_leaf_fragment() const {
+ return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void PlanFragment::set_has_leaf_fragment() {
+ _has_bits_[0] |= 0x00000040u;
+}
+inline void PlanFragment::clear_has_leaf_fragment() {
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline void PlanFragment::clear_leaf_fragment() {
+ leaf_fragment_ = false;
+ clear_has_leaf_fragment();
+}
+inline bool PlanFragment::leaf_fragment() const {
+ return leaf_fragment_;
+}
+inline void PlanFragment::set_leaf_fragment(bool value) {
+ set_has_leaf_fragment();
+ leaf_fragment_ = value;
+}
+
// optional .exec.DrillbitEndpoint assignment = 10;
inline bool PlanFragment::has_assignment() const {
- return (_has_bits_[0] & 0x00000040u) != 0;
+ return (_has_bits_[0] & 0x00000080u) != 0;
}
inline void PlanFragment::set_has_assignment() {
- _has_bits_[0] |= 0x00000040u;
+ _has_bits_[0] |= 0x00000080u;
}
inline void PlanFragment::clear_has_assignment() {
- _has_bits_[0] &= ~0x00000040u;
+ _has_bits_[0] &= ~0x00000080u;
}
inline void PlanFragment::clear_assignment() {
if (assignment_ != NULL) assignment_->::exec::DrillbitEndpoint::Clear();
@@ -1354,28 +1477,6 @@ inline void PlanFragment::set_allocated_assignment(::exec::DrillbitEndpoint* ass
}
}
-// optional bool leaf_fragment = 9;
-inline bool PlanFragment::has_leaf_fragment() const {
- return (_has_bits_[0] & 0x00000080u) != 0;
-}
-inline void PlanFragment::set_has_leaf_fragment() {
- _has_bits_[0] |= 0x00000080u;
-}
-inline void PlanFragment::clear_has_leaf_fragment() {
- _has_bits_[0] &= ~0x00000080u;
-}
-inline void PlanFragment::clear_leaf_fragment() {
- leaf_fragment_ = false;
- clear_has_leaf_fragment();
-}
-inline bool PlanFragment::leaf_fragment() const {
- return leaf_fragment_;
-}
-inline void PlanFragment::set_leaf_fragment(bool value) {
- set_has_leaf_fragment();
- leaf_fragment_ = value;
-}
-
// optional .exec.DrillbitEndpoint foreman = 11;
inline bool PlanFragment::has_foreman() const {
return (_has_bits_[0] & 0x00000100u) != 0;
@@ -1458,37 +1559,15 @@ inline void PlanFragment::set_mem_max(::google::protobuf::int64 value) {
mem_max_ = value;
}
-// optional int64 query_start_time = 14;
-inline bool PlanFragment::has_query_start_time() const {
- return (_has_bits_[0] & 0x00000800u) != 0;
-}
-inline void PlanFragment::set_has_query_start_time() {
- _has_bits_[0] |= 0x00000800u;
-}
-inline void PlanFragment::clear_has_query_start_time() {
- _has_bits_[0] &= ~0x00000800u;
-}
-inline void PlanFragment::clear_query_start_time() {
- query_start_time_ = GOOGLE_LONGLONG(0);
- clear_has_query_start_time();
-}
-inline ::google::protobuf::int64 PlanFragment::query_start_time() const {
- return query_start_time_;
-}
-inline void PlanFragment::set_query_start_time(::google::protobuf::int64 value) {
- set_has_query_start_time();
- query_start_time_ = value;
-}
-
-// optional .exec.shared.UserCredentials credentials = 15;
+// optional .exec.shared.UserCredentials credentials = 14;
inline bool PlanFragment::has_credentials() const {
- return (_has_bits_[0] & 0x00001000u) != 0;
+ return (_has_bits_[0] & 0x00000800u) != 0;
}
inline void PlanFragment::set_has_credentials() {
- _has_bits_[0] |= 0x00001000u;
+ _has_bits_[0] |= 0x00000800u;
}
inline void PlanFragment::clear_has_credentials() {
- _has_bits_[0] &= ~0x00001000u;
+ _has_bits_[0] &= ~0x00000800u;
}
inline void PlanFragment::clear_credentials() {
if (credentials_ != NULL) credentials_->::exec::shared::UserCredentials::Clear();
@@ -1518,37 +1597,15 @@ inline void PlanFragment::set_allocated_credentials(::exec::shared::UserCredenti
}
}
-// optional int32 time_zone = 16;
-inline bool PlanFragment::has_time_zone() const {
- return (_has_bits_[0] & 0x00002000u) != 0;
-}
-inline void PlanFragment::set_has_time_zone() {
- _has_bits_[0] |= 0x00002000u;
-}
-inline void PlanFragment::clear_has_time_zone() {
- _has_bits_[0] &= ~0x00002000u;
-}
-inline void PlanFragment::clear_time_zone() {
- time_zone_ = 0;
- clear_has_time_zone();
-}
-inline ::google::protobuf::int32 PlanFragment::time_zone() const {
- return time_zone_;
-}
-inline void PlanFragment::set_time_zone(::google::protobuf::int32 value) {
- set_has_time_zone();
- time_zone_ = value;
-}
-
-// optional string options_json = 17;
+// optional string options_json = 15;
inline bool PlanFragment::has_options_json() const {
- return (_has_bits_[0] & 0x00004000u) != 0;
+ return (_has_bits_[0] & 0x00001000u) != 0;
}
inline void PlanFragment::set_has_options_json() {
- _has_bits_[0] |= 0x00004000u;
+ _has_bits_[0] |= 0x00001000u;
}
inline void PlanFragment::clear_has_options_json() {
- _has_bits_[0] &= ~0x00004000u;
+ _has_bits_[0] &= ~0x00001000u;
}
inline void PlanFragment::clear_options_json() {
if (options_json_ != &::google::protobuf::internal::kEmptyString) {
@@ -1610,6 +1667,162 @@ inline void PlanFragment::set_allocated_options_json(::std::string* options_json
}
}
+// optional .exec.bit.control.QueryContextInformation context = 16;
+inline bool PlanFragment::has_context() const {
+ return (_has_bits_[0] & 0x00002000u) != 0;
+}
+inline void PlanFragment::set_has_context() {
+ _has_bits_[0] |= 0x00002000u;
+}
+inline void PlanFragment::clear_has_context() {
+ _has_bits_[0] &= ~0x00002000u;
+}
+inline void PlanFragment::clear_context() {
+ if (context_ != NULL) context_->::exec::bit::control::QueryContextInformation::Clear();
+ clear_has_context();
+}
+inline const ::exec::bit::control::QueryContextInformation& PlanFragment::context() const {
+ return context_ != NULL ? *context_ : *default_instance_->context_;
+}
+inline ::exec::bit::control::QueryContextInformation* PlanFragment::mutable_context() {
+ set_has_context();
+ if (context_ == NULL) context_ = new ::exec::bit::control::QueryContextInformation;
+ return context_;
+}
+inline ::exec::bit::control::QueryContextInformation* PlanFragment::release_context() {
+ clear_has_context();
+ ::exec::bit::control::QueryContextInformation* temp = context_;
+ context_ = NULL;
+ return temp;
+}
+inline void PlanFragment::set_allocated_context(::exec::bit::control::QueryContextInformation* context) {
+ delete context_;
+ context_ = context;
+ if (context) {
+ set_has_context();
+ } else {
+ clear_has_context();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// QueryContextInformation
+
+// optional int64 query_start_time = 1;
+inline bool QueryContextInformation::has_query_start_time() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void QueryContextInformation::set_has_query_start_time() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void QueryContextInformation::clear_has_query_start_time() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void QueryContextInformation::clear_query_start_time() {
+ query_start_time_ = GOOGLE_LONGLONG(0);
+ clear_has_query_start_time();
+}
+inline ::google::protobuf::int64 QueryContextInformation::query_start_time() const {
+ return query_start_time_;
+}
+inline void QueryContextInformation::set_query_start_time(::google::protobuf::int64 value) {
+ set_has_query_start_time();
+ query_start_time_ = value;
+}
+
+// optional int32 time_zone = 2;
+inline bool QueryContextInformation::has_time_zone() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void QueryContextInformation::set_has_time_zone() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void QueryContextInformation::clear_has_time_zone() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void QueryContextInformation::clear_time_zone() {
+ time_zone_ = 0;
+ clear_has_time_zone();
+}
+inline ::google::protobuf::int32 QueryContextInformation::time_zone() const {
+ return time_zone_;
+}
+inline void QueryContextInformation::set_time_zone(::google::protobuf::int32 value) {
+ set_has_time_zone();
+ time_zone_ = value;
+}
+
+// optional string default_schema_name = 3;
+inline bool QueryContextInformation::has_default_schema_name() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void QueryContextInformation::set_has_default_schema_name() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void QueryContextInformation::clear_has_default_schema_name() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void QueryContextInformation::clear_default_schema_name() {
+ if (default_schema_name_ != &::google::protobuf::internal::kEmptyString) {
+ default_schema_name_->clear();
+ }
+ clear_has_default_schema_name();
+}
+inline const ::std::string& QueryContextInformation::default_schema_name() const {
+ return *default_schema_name_;
+}
+inline void QueryContextInformation::set_default_schema_name(const ::std::string& value) {
+ set_has_default_schema_name();
+ if (default_schema_name_ == &::google::protobuf::internal::kEmptyString) {
+ default_schema_name_ = new ::std::string;
+ }
+ default_schema_name_->assign(value);
+}
+inline void QueryContextInformation::set_default_schema_name(const char* value) {
+ set_has_default_schema_name();
+ if (default_schema_name_ == &::google::protobuf::internal::kEmptyString) {
+ default_schema_name_ = new ::std::string;
+ }
+ default_schema_name_->assign(value);
+}
+inline void QueryContextInformation::set_default_schema_name(const char* value, size_t size) {
+ set_has_default_schema_name();
+ if (default_schema_name_ == &::google::protobuf::internal::kEmptyString) {
+ default_schema_name_ = new ::std::string;
+ }
+ default_schema_name_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* QueryContextInformation::mutable_default_schema_name() {
+ set_has_default_schema_name();
+ if (default_schema_name_ == &::google::protobuf::internal::kEmptyString) {
+ default_schema_name_ = new ::std::string;
+ }
+ return default_schema_name_;
+}
+inline ::std::string* QueryContextInformation::release_default_schema_name() {
+ clear_has_default_schema_name();
+ if (default_schema_name_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = default_schema_name_;
+ default_schema_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void QueryContextInformation::set_allocated_default_schema_name(::std::string* default_schema_name) {
+ if (default_schema_name_ != &::google::protobuf::internal::kEmptyString) {
+ delete default_schema_name_;
+ }
+ if (default_schema_name) {
+ set_has_default_schema_name();
+ default_schema_name_ = default_schema_name;
+ } else {
+ clear_has_default_schema_name();
+ default_schema_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
// -------------------------------------------------------------------
// WorkQueueStatus
diff --git a/contrib/native/client/src/protobuf/GeneralRPC.pb.cc b/contrib/native/client/src/protobuf/GeneralRPC.pb.cc
index 0ebb3a97c..b02ef0ea6 100644
--- a/contrib/native/client/src/protobuf/GeneralRPC.pb.cc
+++ b/contrib/native/client/src/protobuf/GeneralRPC.pb.cc
@@ -136,10 +136,10 @@ void protobuf_AddDesc_GeneralRPC_2eproto() {
"rdination_id\030\002 \001(\005\022\020\n\010rpc_type\030\003 \001(\005\"b\n\022"
"CompleteRpcMessage\022#\n\006header\030\001 \001(\0132\023.exe"
"c.rpc.RpcHeader\022\025\n\rprotobuf_body\030\002 \001(\014\022\020"
- "\n\010raw_body\030\003 \001(\014*:\n\007RpcMode\022\013\n\007REQUEST\020\000"
- "\022\014\n\010RESPONSE\020\001\022\024\n\020RESPONSE_FAILURE\020\002B1\n\033"
- "org.apache.drill.exec.protoB\020GeneralRPCP"
- "rotosH\001", 367);
+ "\n\010raw_body\030\003 \001(\014*N\n\007RpcMode\022\013\n\007REQUEST\020\000"
+ "\022\014\n\010RESPONSE\020\001\022\024\n\020RESPONSE_FAILURE\020\002\022\010\n\004"
+ "PING\020\003\022\010\n\004PONG\020\004B1\n\033org.apache.drill.exe"
+ "c.protoB\020GeneralRPCProtosH\001", 387);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"GeneralRPC.proto", &protobuf_RegisterTypes);
Ack::default_instance_ = new Ack();
@@ -166,6 +166,8 @@ bool RpcMode_IsValid(int value) {
case 0:
case 1:
case 2:
+ case 3:
+ case 4:
return true;
default:
return false;
diff --git a/contrib/native/client/src/protobuf/GeneralRPC.pb.h b/contrib/native/client/src/protobuf/GeneralRPC.pb.h
index 49f4bf7f7..8ebef9a61 100644
--- a/contrib/native/client/src/protobuf/GeneralRPC.pb.h
+++ b/contrib/native/client/src/protobuf/GeneralRPC.pb.h
@@ -43,11 +43,13 @@ class CompleteRpcMessage;
enum RpcMode {
REQUEST = 0,
RESPONSE = 1,
- RESPONSE_FAILURE = 2
+ RESPONSE_FAILURE = 2,
+ PING = 3,
+ PONG = 4
};
bool RpcMode_IsValid(int value);
const RpcMode RpcMode_MIN = REQUEST;
-const RpcMode RpcMode_MAX = RESPONSE_FAILURE;
+const RpcMode RpcMode_MAX = PONG;
const int RpcMode_ARRAYSIZE = RpcMode_MAX + 1;
const ::google::protobuf::EnumDescriptor* RpcMode_descriptor();
diff --git a/contrib/native/client/src/protobuf/User.pb.cc b/contrib/native/client/src/protobuf/User.pb.cc
index 59f215795..212ad6ad2 100644
--- a/contrib/native/client/src/protobuf/User.pb.cc
+++ b/contrib/native/client/src/protobuf/User.pb.cc
@@ -84,13 +84,14 @@ void protobuf_AssignDesc_User_2eproto() {
::google::protobuf::MessageFactory::generated_factory(),
sizeof(UserProperties));
UserToBitHandshake_descriptor_ = file->message_type(2);
- static const int UserToBitHandshake_offsets_[6] = {
+ static const int UserToBitHandshake_offsets_[7] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, channel_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, support_listening_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, rpc_version_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, credentials_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, properties_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, support_complex_types_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, support_timeout_),
};
UserToBitHandshake_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -213,31 +214,32 @@ void protobuf_AddDesc_User_2eproto() {
"\032\023UserBitShared.proto\"&\n\010Property\022\013\n\003key"
"\030\001 \002(\t\022\r\n\005value\030\002 \002(\t\"9\n\016UserProperties\022"
"\'\n\nproperties\030\001 \003(\0132\023.exec.user.Property"
- "\"\374\001\n\022UserToBitHandshake\022.\n\007channel\030\001 \001(\016"
+ "\"\234\002\n\022UserToBitHandshake\022.\n\007channel\030\001 \001(\016"
"2\027.exec.shared.RpcChannel:\004USER\022\031\n\021suppo"
"rt_listening\030\002 \001(\010\022\023\n\013rpc_version\030\003 \001(\005\022"
"1\n\013credentials\030\004 \001(\0132\034.exec.shared.UserC"
"redentials\022-\n\nproperties\030\005 \001(\0132\031.exec.us"
"er.UserProperties\022$\n\025support_complex_typ"
- "es\030\006 \001(\010:\005false\"S\n\016RequestResults\022&\n\010que"
- "ry_id\030\001 \001(\0132\024.exec.shared.QueryId\022\031\n\021max"
- "imum_responses\030\002 \001(\005\"q\n\010RunQuery\0221\n\014resu"
- "lts_mode\030\001 \001(\0162\033.exec.user.QueryResultsM"
- "ode\022$\n\004type\030\002 \001(\0162\026.exec.shared.QueryTyp"
- "e\022\014\n\004plan\030\003 \001(\t\"|\n\022BitToUserHandshake\022\023\n"
- "\013rpc_version\030\002 \001(\005\022*\n\006status\030\003 \001(\0162\032.exe"
- "c.user.HandshakeStatus\022\017\n\007errorId\030\004 \001(\t\022"
- "\024\n\014errorMessage\030\005 \001(\t*\310\001\n\007RpcType\022\r\n\tHAN"
- "DSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\r\n\tRUN_QU"
- "ERY\020\003\022\020\n\014CANCEL_QUERY\020\004\022\023\n\017REQUEST_RESUL"
- "TS\020\005\022\016\n\nQUERY_DATA\020\006\022\020\n\014QUERY_HANDLE\020\007\022\026"
- "\n\022REQ_META_FUNCTIONS\020\010\022\026\n\022RESP_FUNCTION_"
- "LIST\020\t\022\020\n\014QUERY_RESULT\020\n*#\n\020QueryResults"
- "Mode\022\017\n\013STREAM_FULL\020\001*^\n\017HandshakeStatus"
- "\022\013\n\007SUCCESS\020\001\022\030\n\024RPC_VERSION_MISMATCH\020\002\022"
- "\017\n\013AUTH_FAILED\020\003\022\023\n\017UNKNOWN_FAILURE\020\004B+\n"
- "\033org.apache.drill.exec.protoB\nUserProtos"
- "H\001", 1122);
+ "es\030\006 \001(\010:\005false\022\036\n\017support_timeout\030\007 \001(\010"
+ ":\005false\"S\n\016RequestResults\022&\n\010query_id\030\001 "
+ "\001(\0132\024.exec.shared.QueryId\022\031\n\021maximum_res"
+ "ponses\030\002 \001(\005\"q\n\010RunQuery\0221\n\014results_mode"
+ "\030\001 \001(\0162\033.exec.user.QueryResultsMode\022$\n\004t"
+ "ype\030\002 \001(\0162\026.exec.shared.QueryType\022\014\n\004pla"
+ "n\030\003 \001(\t\"|\n\022BitToUserHandshake\022\023\n\013rpc_ver"
+ "sion\030\002 \001(\005\022*\n\006status\030\003 \001(\0162\032.exec.user.H"
+ "andshakeStatus\022\017\n\007errorId\030\004 \001(\t\022\024\n\014error"
+ "Message\030\005 \001(\t*\341\001\n\007RpcType\022\r\n\tHANDSHAKE\020\000"
+ "\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\r\n\tRUN_QUERY\020\003\022\020\n"
+ "\014CANCEL_QUERY\020\004\022\023\n\017REQUEST_RESULTS\020\005\022\027\n\023"
+ "RESUME_PAUSED_QUERY\020\013\022\016\n\nQUERY_DATA\020\006\022\020\n"
+ "\014QUERY_HANDLE\020\007\022\026\n\022REQ_META_FUNCTIONS\020\010\022"
+ "\026\n\022RESP_FUNCTION_LIST\020\t\022\020\n\014QUERY_RESULT\020"
+ "\n*#\n\020QueryResultsMode\022\017\n\013STREAM_FULL\020\001*^"
+ "\n\017HandshakeStatus\022\013\n\007SUCCESS\020\001\022\030\n\024RPC_VE"
+ "RSION_MISMATCH\020\002\022\017\n\013AUTH_FAILED\020\003\022\023\n\017UNK"
+ "NOWN_FAILURE\020\004B+\n\033org.apache.drill.exec."
+ "protoB\nUserProtosH\001", 1179);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"User.proto", &protobuf_RegisterTypes);
Property::default_instance_ = new Property();
@@ -278,6 +280,7 @@ bool RpcType_IsValid(int value) {
case 8:
case 9:
case 10:
+ case 11:
return true;
default:
return false;
@@ -812,6 +815,7 @@ const int UserToBitHandshake::kRpcVersionFieldNumber;
const int UserToBitHandshake::kCredentialsFieldNumber;
const int UserToBitHandshake::kPropertiesFieldNumber;
const int UserToBitHandshake::kSupportComplexTypesFieldNumber;
+const int UserToBitHandshake::kSupportTimeoutFieldNumber;
#endif // !_MSC_VER
UserToBitHandshake::UserToBitHandshake()
@@ -838,6 +842,7 @@ void UserToBitHandshake::SharedCtor() {
credentials_ = NULL;
properties_ = NULL;
support_complex_types_ = false;
+ support_timeout_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -885,6 +890,7 @@ void UserToBitHandshake::Clear() {
if (properties_ != NULL) properties_->::exec::user::UserProperties::Clear();
}
support_complex_types_ = false;
+ support_timeout_ = false;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
@@ -988,6 +994,22 @@ bool UserToBitHandshake::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
+ if (input->ExpectTag(56)) goto parse_support_timeout;
+ break;
+ }
+
+ // optional bool support_timeout = 7 [default = false];
+ case 7: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_support_timeout:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &support_timeout_)));
+ set_has_support_timeout();
+ } else {
+ goto handle_uninterpreted;
+ }
if (input->ExpectAtEnd()) return true;
break;
}
@@ -1043,6 +1065,11 @@ void UserToBitHandshake::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormatLite::WriteBool(6, this->support_complex_types(), output);
}
+ // optional bool support_timeout = 7 [default = false];
+ if (has_support_timeout()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->support_timeout(), output);
+ }
+
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
@@ -1086,6 +1113,11 @@ void UserToBitHandshake::SerializeWithCachedSizes(
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->support_complex_types(), target);
}
+ // optional bool support_timeout = 7 [default = false];
+ if (has_support_timeout()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->support_timeout(), target);
+ }
+
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
@@ -1134,6 +1166,11 @@ int UserToBitHandshake::ByteSize() const {
total_size += 1 + 1;
}
+ // optional bool support_timeout = 7 [default = false];
+ if (has_support_timeout()) {
+ total_size += 1 + 1;
+ }
+
}
if (!unknown_fields().empty()) {
total_size +=
@@ -1179,6 +1216,9 @@ void UserToBitHandshake::MergeFrom(const UserToBitHandshake& from) {
if (from.has_support_complex_types()) {
set_support_complex_types(from.support_complex_types());
}
+ if (from.has_support_timeout()) {
+ set_support_timeout(from.support_timeout());
+ }
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
@@ -1211,6 +1251,7 @@ void UserToBitHandshake::Swap(UserToBitHandshake* other) {
std::swap(credentials_, other->credentials_);
std::swap(properties_, other->properties_);
std::swap(support_complex_types_, other->support_complex_types_);
+ std::swap(support_timeout_, other->support_timeout_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
diff --git a/contrib/native/client/src/protobuf/User.pb.h b/contrib/native/client/src/protobuf/User.pb.h
index c7deac38a..8628a5412 100644
--- a/contrib/native/client/src/protobuf/User.pb.h
+++ b/contrib/native/client/src/protobuf/User.pb.h
@@ -51,6 +51,7 @@ enum RpcType {
RUN_QUERY = 3,
CANCEL_QUERY = 4,
REQUEST_RESULTS = 5,
+ RESUME_PAUSED_QUERY = 11,
QUERY_DATA = 6,
QUERY_HANDLE = 7,
REQ_META_FUNCTIONS = 8,
@@ -59,7 +60,7 @@ enum RpcType {
};
bool RpcType_IsValid(int value);
const RpcType RpcType_MIN = HANDSHAKE;
-const RpcType RpcType_MAX = QUERY_RESULT;
+const RpcType RpcType_MAX = RESUME_PAUSED_QUERY;
const int RpcType_ARRAYSIZE = RpcType_MAX + 1;
const ::google::protobuf::EnumDescriptor* RpcType_descriptor();
@@ -400,6 +401,13 @@ class UserToBitHandshake : public ::google::protobuf::Message {
inline bool support_complex_types() const;
inline void set_support_complex_types(bool value);
+ // optional bool support_timeout = 7 [default = false];
+ inline bool has_support_timeout() const;
+ inline void clear_support_timeout();
+ static const int kSupportTimeoutFieldNumber = 7;
+ inline bool support_timeout() const;
+ inline void set_support_timeout(bool value);
+
// @@protoc_insertion_point(class_scope:exec.user.UserToBitHandshake)
private:
inline void set_has_channel();
@@ -414,6 +422,8 @@ class UserToBitHandshake : public ::google::protobuf::Message {
inline void clear_has_properties();
inline void set_has_support_complex_types();
inline void clear_has_support_complex_types();
+ inline void set_has_support_timeout();
+ inline void clear_has_support_timeout();
::google::protobuf::UnknownFieldSet _unknown_fields_;
@@ -423,9 +433,10 @@ class UserToBitHandshake : public ::google::protobuf::Message {
::exec::user::UserProperties* properties_;
bool support_listening_;
bool support_complex_types_;
+ bool support_timeout_;
mutable int _cached_size_;
- ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
+ ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
friend void protobuf_AddDesc_User_2eproto();
friend void protobuf_AssignDesc_User_2eproto();
@@ -1102,6 +1113,28 @@ inline void UserToBitHandshake::set_support_complex_types(bool value) {
support_complex_types_ = value;
}
+// optional bool support_timeout = 7 [default = false];
+inline bool UserToBitHandshake::has_support_timeout() const {
+ return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void UserToBitHandshake::set_has_support_timeout() {
+ _has_bits_[0] |= 0x00000040u;
+}
+inline void UserToBitHandshake::clear_has_support_timeout() {
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline void UserToBitHandshake::clear_support_timeout() {
+ support_timeout_ = false;
+ clear_has_support_timeout();
+}
+inline bool UserToBitHandshake::support_timeout() const {
+ return support_timeout_;
+}
+inline void UserToBitHandshake::set_support_timeout(bool value) {
+ set_has_support_timeout();
+ support_timeout_ = value;
+}
+
// -------------------------------------------------------------------
// RequestResults
diff --git a/contrib/native/client/src/protobuf/UserBitShared.pb.cc b/contrib/native/client/src/protobuf/UserBitShared.pb.cc
index b07ecda41..a975438e9 100644
--- a/contrib/native/client/src/protobuf/UserBitShared.pb.cc
+++ b/contrib/native/client/src/protobuf/UserBitShared.pb.cc
@@ -30,6 +30,7 @@ const ::google::protobuf::internal::GeneratedMessageReflection*
const ::google::protobuf::Descriptor* DrillPBError_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
DrillPBError_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* DrillPBError_ErrorType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ExceptionWrapper_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ExceptionWrapper_reflection_ = NULL;
@@ -145,6 +146,7 @@ void protobuf_AssignDesc_UserBitShared_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(DrillPBError));
+ DrillPBError_ErrorType_descriptor_ = DrillPBError_descriptor_->enum_type(0);
ExceptionWrapper_descriptor_ = file->message_type(3);
static const int ExceptionWrapper_offsets_[4] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExceptionWrapper, exception_class_),
@@ -327,7 +329,7 @@ void protobuf_AssignDesc_UserBitShared_2eproto() {
::google::protobuf::MessageFactory::generated_factory(),
sizeof(QueryInfo));
QueryProfile_descriptor_ = file->message_type(13);
- static const int QueryProfile_offsets_[11] = {
+ static const int QueryProfile_offsets_[16] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, start_),
@@ -339,6 +341,11 @@ void protobuf_AssignDesc_UserBitShared_2eproto() {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, total_fragments_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, finished_fragments_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, fragment_profile_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, user_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, error_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, verboseerror_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, error_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryProfile, error_node_),
};
QueryProfile_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -368,7 +375,7 @@ void protobuf_AssignDesc_UserBitShared_2eproto() {
::google::protobuf::MessageFactory::generated_factory(),
sizeof(MajorFragmentProfile));
MinorFragmentProfile_descriptor_ = file->message_type(15);
- static const int MinorFragmentProfile_offsets_[9] = {
+ static const int MinorFragmentProfile_offsets_[11] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, state_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, error_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, minor_fragment_id_),
@@ -378,6 +385,8 @@ void protobuf_AssignDesc_UserBitShared_2eproto() {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, memory_used_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, max_memory_used_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, endpoint_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, last_update_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MinorFragmentProfile, last_progress_),
};
MinorFragmentProfile_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -531,8 +540,10 @@ void protobuf_ShutdownFile_UserBitShared_2eproto() {
delete QueryData_reflection_;
delete QueryInfo::default_instance_;
delete QueryInfo_reflection_;
+ delete QueryInfo::_default_user_;
delete QueryProfile::default_instance_;
delete QueryProfile_reflection_;
+ delete QueryProfile::_default_user_;
delete MajorFragmentProfile::default_instance_;
delete MajorFragmentProfile_reflection_;
delete MinorFragmentProfile::default_instance_;
@@ -559,103 +570,113 @@ void protobuf_AddDesc_UserBitShared_2eproto() {
"s.proto\032\022Coordination.proto\032\017SchemaDef.p"
"roto\"$\n\017UserCredentials\022\021\n\tuser_name\030\001 \001"
"(\t\"\'\n\007QueryId\022\r\n\005part1\030\001 \001(\020\022\r\n\005part2\030\002 "
- "\001(\020\"\323\001\n\014DrillPBError\022\020\n\010error_id\030\001 \001(\t\022("
+ "\001(\020\"\255\003\n\014DrillPBError\022\020\n\010error_id\030\001 \001(\t\022("
"\n\010endpoint\030\002 \001(\0132\026.exec.DrillbitEndpoint"
- "\022\022\n\nerror_type\030\003 \001(\005\022\017\n\007message\030\004 \001(\t\0220\n"
- "\texception\030\005 \001(\0132\035.exec.shared.Exception"
- "Wrapper\0220\n\rparsing_error\030\006 \003(\0132\031.exec.sh"
- "ared.ParsingError\"\246\001\n\020ExceptionWrapper\022\027"
- "\n\017exception_class\030\001 \001(\t\022\017\n\007message\030\002 \001(\t"
- "\022:\n\013stack_trace\030\003 \003(\0132%.exec.shared.Stac"
- "kTraceElementWrapper\022,\n\005cause\030\004 \001(\0132\035.ex"
- "ec.shared.ExceptionWrapper\"\205\001\n\030StackTrac"
- "eElementWrapper\022\022\n\nclass_name\030\001 \001(\t\022\021\n\tf"
- "ile_name\030\002 \001(\t\022\023\n\013line_number\030\003 \001(\005\022\023\n\013m"
- "ethod_name\030\004 \001(\t\022\030\n\020is_native_method\030\005 \001"
- "(\010\"\\\n\014ParsingError\022\024\n\014start_column\030\002 \001(\005"
- "\022\021\n\tstart_row\030\003 \001(\005\022\022\n\nend_column\030\004 \001(\005\022"
- "\017\n\007end_row\030\005 \001(\005\"~\n\016RecordBatchDef\022\024\n\014re"
- "cord_count\030\001 \001(\005\022+\n\005field\030\002 \003(\0132\034.exec.s"
- "hared.SerializedField\022)\n!carries_two_byt"
- "e_selection_vector\030\003 \001(\010\"\205\001\n\010NamePart\022(\n"
- "\004type\030\001 \001(\0162\032.exec.shared.NamePart.Type\022"
- "\014\n\004name\030\002 \001(\t\022$\n\005child\030\003 \001(\0132\025.exec.shar"
- "ed.NamePart\"\033\n\004Type\022\010\n\004NAME\020\000\022\t\n\005ARRAY\020\001"
- "\"\351\001\n\017SerializedField\022%\n\nmajor_type\030\001 \001(\013"
- "2\021.common.MajorType\022(\n\tname_part\030\002 \001(\0132\025"
- ".exec.shared.NamePart\022+\n\005child\030\003 \003(\0132\034.e"
- "xec.shared.SerializedField\022\023\n\013value_coun"
- "t\030\004 \001(\005\022\027\n\017var_byte_length\030\005 \001(\005\022\023\n\013grou"
- "p_count\030\006 \001(\005\022\025\n\rbuffer_length\030\007 \001(\005\"7\n\n"
- "NodeStatus\022\017\n\007node_id\030\001 \001(\005\022\030\n\020memory_fo"
- "otprint\030\002 \001(\003\"\206\002\n\013QueryResult\0228\n\013query_s"
- "tate\030\001 \001(\0162#.exec.shared.QueryResult.Que"
- "ryState\022&\n\010query_id\030\002 \001(\0132\024.exec.shared."
- "QueryId\022(\n\005error\030\003 \003(\0132\031.exec.shared.Dri"
- "llPBError\"k\n\nQueryState\022\013\n\007PENDING\020\000\022\013\n\007"
- "RUNNING\020\001\022\r\n\tCOMPLETED\020\002\022\014\n\010CANCELED\020\003\022\n"
- "\n\006FAILED\020\004\022\032\n\026CANCELLATION_REQUESTED\020\005\"p"
- "\n\tQueryData\022&\n\010query_id\030\001 \001(\0132\024.exec.sha"
- "red.QueryId\022\021\n\trow_count\030\002 \001(\005\022(\n\003def\030\003 "
- "\001(\0132\033.exec.shared.RecordBatchDef\"\224\001\n\tQue"
- "ryInfo\022\r\n\005query\030\001 \001(\t\022\r\n\005start\030\002 \001(\003\0222\n\005"
- "state\030\003 \001(\0162#.exec.shared.QueryResult.Qu"
- "eryState\022\014\n\004user\030\004 \001(\t\022\'\n\007foreman\030\005 \001(\0132"
- "\026.exec.DrillbitEndpoint\"\336\002\n\014QueryProfile"
- "\022 \n\002id\030\001 \001(\0132\024.exec.shared.QueryId\022$\n\004ty"
- "pe\030\002 \001(\0162\026.exec.shared.QueryType\022\r\n\005star"
- "t\030\003 \001(\003\022\013\n\003end\030\004 \001(\003\022\r\n\005query\030\005 \001(\t\022\014\n\004p"
- "lan\030\006 \001(\t\022\'\n\007foreman\030\007 \001(\0132\026.exec.Drillb"
- "itEndpoint\0222\n\005state\030\010 \001(\0162#.exec.shared."
- "QueryResult.QueryState\022\027\n\017total_fragment"
- "s\030\t \001(\005\022\032\n\022finished_fragments\030\n \001(\005\022;\n\020f"
- "ragment_profile\030\013 \003(\0132!.exec.shared.Majo"
- "rFragmentProfile\"t\n\024MajorFragmentProfile"
- "\022\031\n\021major_fragment_id\030\001 \001(\005\022A\n\026minor_fra"
- "gment_profile\030\002 \003(\0132!.exec.shared.MinorF"
- "ragmentProfile\"\274\002\n\024MinorFragmentProfile\022"
- ")\n\005state\030\001 \001(\0162\032.exec.shared.FragmentSta"
- "te\022(\n\005error\030\002 \001(\0132\031.exec.shared.DrillPBE"
- "rror\022\031\n\021minor_fragment_id\030\003 \001(\005\0226\n\020opera"
- "tor_profile\030\004 \003(\0132\034.exec.shared.Operator"
- "Profile\022\022\n\nstart_time\030\005 \001(\003\022\020\n\010end_time\030"
- "\006 \001(\003\022\023\n\013memory_used\030\007 \001(\003\022\027\n\017max_memory"
- "_used\030\010 \001(\003\022(\n\010endpoint\030\t \001(\0132\026.exec.Dri"
- "llbitEndpoint\"\377\001\n\017OperatorProfile\0221\n\rinp"
- "ut_profile\030\001 \003(\0132\032.exec.shared.StreamPro"
- "file\022\023\n\013operator_id\030\003 \001(\005\022\025\n\roperator_ty"
- "pe\030\004 \001(\005\022\023\n\013setup_nanos\030\005 \001(\003\022\025\n\rprocess"
- "_nanos\030\006 \001(\003\022#\n\033peak_local_memory_alloca"
- "ted\030\007 \001(\003\022(\n\006metric\030\010 \003(\0132\030.exec.shared."
- "MetricValue\022\022\n\nwait_nanos\030\t \001(\003\"B\n\rStrea"
- "mProfile\022\017\n\007records\030\001 \001(\003\022\017\n\007batches\030\002 \001"
- "(\003\022\017\n\007schemas\030\003 \001(\003\"J\n\013MetricValue\022\021\n\tme"
- "tric_id\030\001 \001(\005\022\022\n\nlong_value\030\002 \001(\003\022\024\n\014dou"
- "ble_value\030\003 \001(\001*5\n\nRpcChannel\022\017\n\013BIT_CON"
- "TROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002*/\n\tQueryT"
- "ype\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYSICAL\020\003*"
- "k\n\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023AWAITIN"
- "G_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FINISHED\020"
- "\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005*\264\005\n\020CoreOpe"
- "ratorType\022\021\n\rSINGLE_SENDER\020\000\022\024\n\020BROADCAS"
- "T_SENDER\020\001\022\n\n\006FILTER\020\002\022\022\n\016HASH_AGGREGATE"
- "\020\003\022\r\n\tHASH_JOIN\020\004\022\016\n\nMERGE_JOIN\020\005\022\031\n\025HAS"
- "H_PARTITION_SENDER\020\006\022\t\n\005LIMIT\020\007\022\024\n\020MERGI"
- "NG_RECEIVER\020\010\022\034\n\030ORDERED_PARTITION_SENDE"
- "R\020\t\022\013\n\007PROJECT\020\n\022\026\n\022UNORDERED_RECEIVER\020\013"
- "\022\020\n\014RANGE_SENDER\020\014\022\n\n\006SCREEN\020\r\022\034\n\030SELECT"
- "ION_VECTOR_REMOVER\020\016\022\027\n\023STREAMING_AGGREG"
- "ATE\020\017\022\016\n\nTOP_N_SORT\020\020\022\021\n\rEXTERNAL_SORT\020\021"
- "\022\t\n\005TRACE\020\022\022\t\n\005UNION\020\023\022\014\n\010OLD_SORT\020\024\022\032\n\026"
- "PARQUET_ROW_GROUP_SCAN\020\025\022\021\n\rHIVE_SUB_SCA"
- "N\020\026\022\025\n\021SYSTEM_TABLE_SCAN\020\027\022\021\n\rMOCK_SUB_S"
- "CAN\020\030\022\022\n\016PARQUET_WRITER\020\031\022\023\n\017DIRECT_SUB_"
- "SCAN\020\032\022\017\n\013TEXT_WRITER\020\033\022\021\n\rTEXT_SUB_SCAN"
- "\020\034\022\021\n\rJSON_SUB_SCAN\020\035\022\030\n\024INFO_SCHEMA_SUB"
- "_SCAN\020\036\022\023\n\017COMPLEX_TO_JSON\020\037\022\025\n\021PRODUCER"
- "_CONSUMER\020 \022\022\n\016HBASE_SUB_SCAN\020!\022\n\n\006WINDO"
- "W\020\"B.\n\033org.apache.drill.exec.protoB\rUser"
- "BitSharedH\001", 4011);
+ "\0227\n\nerror_type\030\003 \001(\0162#.exec.shared.Drill"
+ "PBError.ErrorType\022\017\n\007message\030\004 \001(\t\0220\n\tex"
+ "ception\030\005 \001(\0132\035.exec.shared.ExceptionWra"
+ "pper\0220\n\rparsing_error\030\006 \003(\0132\031.exec.share"
+ "d.ParsingError\"\262\001\n\tErrorType\022\016\n\nCONNECTI"
+ "ON\020\000\022\r\n\tDATA_READ\020\001\022\016\n\nDATA_WRITE\020\002\022\014\n\010F"
+ "UNCTION\020\003\022\t\n\005PARSE\020\004\022\016\n\nPERMISSION\020\005\022\010\n\004"
+ "PLAN\020\006\022\014\n\010RESOURCE\020\007\022\n\n\006SYSTEM\020\010\022\031\n\025UNSU"
+ "PPORTED_OPERATION\020\t\022\016\n\nVALIDATION\020\n\"\246\001\n\020"
+ "ExceptionWrapper\022\027\n\017exception_class\030\001 \001("
+ "\t\022\017\n\007message\030\002 \001(\t\022:\n\013stack_trace\030\003 \003(\0132"
+ "%.exec.shared.StackTraceElementWrapper\022,"
+ "\n\005cause\030\004 \001(\0132\035.exec.shared.ExceptionWra"
+ "pper\"\205\001\n\030StackTraceElementWrapper\022\022\n\ncla"
+ "ss_name\030\001 \001(\t\022\021\n\tfile_name\030\002 \001(\t\022\023\n\013line"
+ "_number\030\003 \001(\005\022\023\n\013method_name\030\004 \001(\t\022\030\n\020is"
+ "_native_method\030\005 \001(\010\"\\\n\014ParsingError\022\024\n\014"
+ "start_column\030\002 \001(\005\022\021\n\tstart_row\030\003 \001(\005\022\022\n"
+ "\nend_column\030\004 \001(\005\022\017\n\007end_row\030\005 \001(\005\"~\n\016Re"
+ "cordBatchDef\022\024\n\014record_count\030\001 \001(\005\022+\n\005fi"
+ "eld\030\002 \003(\0132\034.exec.shared.SerializedField\022"
+ ")\n!carries_two_byte_selection_vector\030\003 \001"
+ "(\010\"\205\001\n\010NamePart\022(\n\004type\030\001 \001(\0162\032.exec.sha"
+ "red.NamePart.Type\022\014\n\004name\030\002 \001(\t\022$\n\005child"
+ "\030\003 \001(\0132\025.exec.shared.NamePart\"\033\n\004Type\022\010\n"
+ "\004NAME\020\000\022\t\n\005ARRAY\020\001\"\351\001\n\017SerializedField\022%"
+ "\n\nmajor_type\030\001 \001(\0132\021.common.MajorType\022(\n"
+ "\tname_part\030\002 \001(\0132\025.exec.shared.NamePart\022"
+ "+\n\005child\030\003 \003(\0132\034.exec.shared.SerializedF"
+ "ield\022\023\n\013value_count\030\004 \001(\005\022\027\n\017var_byte_le"
+ "ngth\030\005 \001(\005\022\023\n\013group_count\030\006 \001(\005\022\025\n\rbuffe"
+ "r_length\030\007 \001(\005\"7\n\nNodeStatus\022\017\n\007node_id\030"
+ "\001 \001(\005\022\030\n\020memory_footprint\030\002 \001(\003\"\206\002\n\013Quer"
+ "yResult\0228\n\013query_state\030\001 \001(\0162#.exec.shar"
+ "ed.QueryResult.QueryState\022&\n\010query_id\030\002 "
+ "\001(\0132\024.exec.shared.QueryId\022(\n\005error\030\003 \003(\013"
+ "2\031.exec.shared.DrillPBError\"k\n\nQueryStat"
+ "e\022\013\n\007PENDING\020\000\022\013\n\007RUNNING\020\001\022\r\n\tCOMPLETED"
+ "\020\002\022\014\n\010CANCELED\020\003\022\n\n\006FAILED\020\004\022\032\n\026CANCELLA"
+ "TION_REQUESTED\020\005\"p\n\tQueryData\022&\n\010query_i"
+ "d\030\001 \001(\0132\024.exec.shared.QueryId\022\021\n\trow_cou"
+ "nt\030\002 \001(\005\022(\n\003def\030\003 \001(\0132\033.exec.shared.Reco"
+ "rdBatchDef\"\227\001\n\tQueryInfo\022\r\n\005query\030\001 \001(\t\022"
+ "\r\n\005start\030\002 \001(\003\0222\n\005state\030\003 \001(\0162#.exec.sha"
+ "red.QueryResult.QueryState\022\017\n\004user\030\004 \001(\t"
+ ":\001-\022\'\n\007foreman\030\005 \001(\0132\026.exec.DrillbitEndp"
+ "oint\"\272\003\n\014QueryProfile\022 \n\002id\030\001 \001(\0132\024.exec"
+ ".shared.QueryId\022$\n\004type\030\002 \001(\0162\026.exec.sha"
+ "red.QueryType\022\r\n\005start\030\003 \001(\003\022\013\n\003end\030\004 \001("
+ "\003\022\r\n\005query\030\005 \001(\t\022\014\n\004plan\030\006 \001(\t\022\'\n\007forema"
+ "n\030\007 \001(\0132\026.exec.DrillbitEndpoint\0222\n\005state"
+ "\030\010 \001(\0162#.exec.shared.QueryResult.QuerySt"
+ "ate\022\027\n\017total_fragments\030\t \001(\005\022\032\n\022finished"
+ "_fragments\030\n \001(\005\022;\n\020fragment_profile\030\013 \003"
+ "(\0132!.exec.shared.MajorFragmentProfile\022\017\n"
+ "\004user\030\014 \001(\t:\001-\022\r\n\005error\030\r \001(\t\022\024\n\014verbose"
+ "Error\030\016 \001(\t\022\020\n\010error_id\030\017 \001(\t\022\022\n\nerror_n"
+ "ode\030\020 \001(\t\"t\n\024MajorFragmentProfile\022\031\n\021maj"
+ "or_fragment_id\030\001 \001(\005\022A\n\026minor_fragment_p"
+ "rofile\030\002 \003(\0132!.exec.shared.MinorFragment"
+ "Profile\"\350\002\n\024MinorFragmentProfile\022)\n\005stat"
+ "e\030\001 \001(\0162\032.exec.shared.FragmentState\022(\n\005e"
+ "rror\030\002 \001(\0132\031.exec.shared.DrillPBError\022\031\n"
+ "\021minor_fragment_id\030\003 \001(\005\0226\n\020operator_pro"
+ "file\030\004 \003(\0132\034.exec.shared.OperatorProfile"
+ "\022\022\n\nstart_time\030\005 \001(\003\022\020\n\010end_time\030\006 \001(\003\022\023"
+ "\n\013memory_used\030\007 \001(\003\022\027\n\017max_memory_used\030\010"
+ " \001(\003\022(\n\010endpoint\030\t \001(\0132\026.exec.DrillbitEn"
+ "dpoint\022\023\n\013last_update\030\n \001(\003\022\025\n\rlast_prog"
+ "ress\030\013 \001(\003\"\377\001\n\017OperatorProfile\0221\n\rinput_"
+ "profile\030\001 \003(\0132\032.exec.shared.StreamProfil"
+ "e\022\023\n\013operator_id\030\003 \001(\005\022\025\n\roperator_type\030"
+ "\004 \001(\005\022\023\n\013setup_nanos\030\005 \001(\003\022\025\n\rprocess_na"
+ "nos\030\006 \001(\003\022#\n\033peak_local_memory_allocated"
+ "\030\007 \001(\003\022(\n\006metric\030\010 \003(\0132\030.exec.shared.Met"
+ "ricValue\022\022\n\nwait_nanos\030\t \001(\003\"B\n\rStreamPr"
+ "ofile\022\017\n\007records\030\001 \001(\003\022\017\n\007batches\030\002 \001(\003\022"
+ "\017\n\007schemas\030\003 \001(\003\"J\n\013MetricValue\022\021\n\tmetri"
+ "c_id\030\001 \001(\005\022\022\n\nlong_value\030\002 \001(\003\022\024\n\014double"
+ "_value\030\003 \001(\001*5\n\nRpcChannel\022\017\n\013BIT_CONTRO"
+ "L\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002*/\n\tQueryType"
+ "\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYSICAL\020\003*\207\001\n"
+ "\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023AWAITING_"
+ "ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FINISHED\020\003\022"
+ "\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\022\032\n\026CANCELLATI"
+ "ON_REQUESTED\020\006*\335\005\n\020CoreOperatorType\022\021\n\rS"
+ "INGLE_SENDER\020\000\022\024\n\020BROADCAST_SENDER\020\001\022\n\n\006"
+ "FILTER\020\002\022\022\n\016HASH_AGGREGATE\020\003\022\r\n\tHASH_JOI"
+ "N\020\004\022\016\n\nMERGE_JOIN\020\005\022\031\n\025HASH_PARTITION_SE"
+ "NDER\020\006\022\t\n\005LIMIT\020\007\022\024\n\020MERGING_RECEIVER\020\010\022"
+ "\034\n\030ORDERED_PARTITION_SENDER\020\t\022\013\n\007PROJECT"
+ "\020\n\022\026\n\022UNORDERED_RECEIVER\020\013\022\020\n\014RANGE_SEND"
+ "ER\020\014\022\n\n\006SCREEN\020\r\022\034\n\030SELECTION_VECTOR_REM"
+ "OVER\020\016\022\027\n\023STREAMING_AGGREGATE\020\017\022\016\n\nTOP_N"
+ "_SORT\020\020\022\021\n\rEXTERNAL_SORT\020\021\022\t\n\005TRACE\020\022\022\t\n"
+ "\005UNION\020\023\022\014\n\010OLD_SORT\020\024\022\032\n\026PARQUET_ROW_GR"
+ "OUP_SCAN\020\025\022\021\n\rHIVE_SUB_SCAN\020\026\022\025\n\021SYSTEM_"
+ "TABLE_SCAN\020\027\022\021\n\rMOCK_SUB_SCAN\020\030\022\022\n\016PARQU"
+ "ET_WRITER\020\031\022\023\n\017DIRECT_SUB_SCAN\020\032\022\017\n\013TEXT"
+ "_WRITER\020\033\022\021\n\rTEXT_SUB_SCAN\020\034\022\021\n\rJSON_SUB"
+ "_SCAN\020\035\022\030\n\024INFO_SCHEMA_SUB_SCAN\020\036\022\023\n\017COM"
+ "PLEX_TO_JSON\020\037\022\025\n\021PRODUCER_CONSUMER\020 \022\022\n"
+ "\016HBASE_SUB_SCAN\020!\022\n\n\006WINDOW\020\"\022\024\n\020NESTED_"
+ "LOOP_JOIN\020#\022\021\n\rAVRO_SUB_SCAN\020$B.\n\033org.ap"
+ "ache.drill.exec.protoB\rUserBitSharedH\001", 4438);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"UserBitShared.proto", &protobuf_RegisterTypes);
UserCredentials::default_instance_ = new UserCredentials();
@@ -670,7 +691,11 @@ void protobuf_AddDesc_UserBitShared_2eproto() {
NodeStatus::default_instance_ = new NodeStatus();
QueryResult::default_instance_ = new QueryResult();
QueryData::default_instance_ = new QueryData();
+ QueryInfo::_default_user_ =
+ new ::std::string("-", 1);
QueryInfo::default_instance_ = new QueryInfo();
+ QueryProfile::_default_user_ =
+ new ::std::string("-", 1);
QueryProfile::default_instance_ = new QueryProfile();
MajorFragmentProfile::default_instance_ = new MajorFragmentProfile();
MinorFragmentProfile::default_instance_ = new MinorFragmentProfile();
@@ -747,6 +772,7 @@ bool FragmentState_IsValid(int value) {
case 3:
case 4:
case 5:
+ case 6:
return true;
default:
return false;
@@ -794,6 +820,8 @@ bool CoreOperatorType_IsValid(int value) {
case 32:
case 33:
case 34:
+ case 35:
+ case 36:
return true;
default:
return false;
@@ -1272,6 +1300,45 @@ void QueryId::Swap(QueryId* other) {
// ===================================================================
+const ::google::protobuf::EnumDescriptor* DrillPBError_ErrorType_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return DrillPBError_ErrorType_descriptor_;
+}
+bool DrillPBError_ErrorType_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#ifndef _MSC_VER
+const DrillPBError_ErrorType DrillPBError::CONNECTION;
+const DrillPBError_ErrorType DrillPBError::DATA_READ;
+const DrillPBError_ErrorType DrillPBError::DATA_WRITE;
+const DrillPBError_ErrorType DrillPBError::FUNCTION;
+const DrillPBError_ErrorType DrillPBError::PARSE;
+const DrillPBError_ErrorType DrillPBError::PERMISSION;
+const DrillPBError_ErrorType DrillPBError::PLAN;
+const DrillPBError_ErrorType DrillPBError::RESOURCE;
+const DrillPBError_ErrorType DrillPBError::SYSTEM;
+const DrillPBError_ErrorType DrillPBError::UNSUPPORTED_OPERATION;
+const DrillPBError_ErrorType DrillPBError::VALIDATION;
+const DrillPBError_ErrorType DrillPBError::ErrorType_MIN;
+const DrillPBError_ErrorType DrillPBError::ErrorType_MAX;
+const int DrillPBError::ErrorType_ARRAYSIZE;
+#endif // _MSC_VER
#ifndef _MSC_VER
const int DrillPBError::kErrorIdFieldNumber;
const int DrillPBError::kEndpointFieldNumber;
@@ -1406,15 +1473,20 @@ bool DrillPBError::MergePartialFromCodedStream(
break;
}
- // optional int32 error_type = 3;
+ // optional .exec.shared.DrillPBError.ErrorType error_type = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_error_type:
+ int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &error_type_)));
- set_has_error_type();
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::shared::DrillPBError_ErrorType_IsValid(value)) {
+ set_error_type(static_cast< ::exec::shared::DrillPBError_ErrorType >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(3, value);
+ }
} else {
goto handle_uninterpreted;
}
@@ -1501,9 +1573,10 @@ void DrillPBError::SerializeWithCachedSizes(
2, this->endpoint(), output);
}
- // optional int32 error_type = 3;
+ // optional .exec.shared.DrillPBError.ErrorType error_type = 3;
if (has_error_type()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->error_type(), output);
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 3, this->error_type(), output);
}
// optional string message = 4;
@@ -1552,9 +1625,10 @@ void DrillPBError::SerializeWithCachedSizes(
2, this->endpoint(), target);
}
- // optional int32 error_type = 3;
+ // optional .exec.shared.DrillPBError.ErrorType error_type = 3;
if (has_error_type()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->error_type(), target);
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 3, this->error_type(), target);
}
// optional string message = 4;
@@ -1606,11 +1680,10 @@ int DrillPBError::ByteSize() const {
this->endpoint());
}
- // optional int32 error_type = 3;
+ // optional .exec.shared.DrillPBError.ErrorType error_type = 3;
if (has_error_type()) {
total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->error_type());
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->error_type());
}
// optional string message = 4;
@@ -4791,6 +4864,7 @@ void QueryData::Swap(QueryData* other) {
// ===================================================================
+::std::string* QueryInfo::_default_user_ = NULL;
#ifndef _MSC_VER
const int QueryInfo::kQueryFieldNumber;
const int QueryInfo::kStartFieldNumber;
@@ -4819,7 +4893,7 @@ void QueryInfo::SharedCtor() {
query_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
start_ = GOOGLE_LONGLONG(0);
state_ = 0;
- user_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ user_ = const_cast< ::std::string*>(_default_user_);
foreman_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -4832,7 +4906,7 @@ void QueryInfo::SharedDtor() {
if (query_ != &::google::protobuf::internal::kEmptyString) {
delete query_;
}
- if (user_ != &::google::protobuf::internal::kEmptyString) {
+ if (user_ != _default_user_) {
delete user_;
}
if (this != default_instance_) {
@@ -4871,8 +4945,8 @@ void QueryInfo::Clear() {
start_ = GOOGLE_LONGLONG(0);
state_ = 0;
if (has_user()) {
- if (user_ != &::google::protobuf::internal::kEmptyString) {
- user_->clear();
+ if (user_ != _default_user_) {
+ user_->assign(*_default_user_);
}
}
if (has_foreman()) {
@@ -4942,7 +5016,7 @@ bool QueryInfo::MergePartialFromCodedStream(
break;
}
- // optional string user = 4;
+ // optional string user = 4 [default = "-"];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
@@ -5011,7 +5085,7 @@ void QueryInfo::SerializeWithCachedSizes(
3, this->state(), output);
}
- // optional string user = 4;
+ // optional string user = 4 [default = "-"];
if (has_user()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->user().data(), this->user().length(),
@@ -5055,7 +5129,7 @@ void QueryInfo::SerializeWithCachedSizes(
3, this->state(), target);
}
- // optional string user = 4;
+ // optional string user = 4 [default = "-"];
if (has_user()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->user().data(), this->user().length(),
@@ -5103,7 +5177,7 @@ int QueryInfo::ByteSize() const {
::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
}
- // optional string user = 4;
+ // optional string user = 4 [default = "-"];
if (has_user()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
@@ -5204,6 +5278,7 @@ void QueryInfo::Swap(QueryInfo* other) {
// ===================================================================
+::std::string* QueryProfile::_default_user_ = NULL;
#ifndef _MSC_VER
const int QueryProfile::kIdFieldNumber;
const int QueryProfile::kTypeFieldNumber;
@@ -5216,6 +5291,11 @@ const int QueryProfile::kStateFieldNumber;
const int QueryProfile::kTotalFragmentsFieldNumber;
const int QueryProfile::kFinishedFragmentsFieldNumber;
const int QueryProfile::kFragmentProfileFieldNumber;
+const int QueryProfile::kUserFieldNumber;
+const int QueryProfile::kErrorFieldNumber;
+const int QueryProfile::kVerboseErrorFieldNumber;
+const int QueryProfile::kErrorIdFieldNumber;
+const int QueryProfile::kErrorNodeFieldNumber;
#endif // !_MSC_VER
QueryProfile::QueryProfile()
@@ -5246,6 +5326,11 @@ void QueryProfile::SharedCtor() {
state_ = 0;
total_fragments_ = 0;
finished_fragments_ = 0;
+ user_ = const_cast< ::std::string*>(_default_user_);
+ error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ verboseerror_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ error_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ error_node_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -5260,6 +5345,21 @@ void QueryProfile::SharedDtor() {
if (plan_ != &::google::protobuf::internal::kEmptyString) {
delete plan_;
}
+ if (user_ != _default_user_) {
+ delete user_;
+ }
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
+ delete error_;
+ }
+ if (verboseerror_ != &::google::protobuf::internal::kEmptyString) {
+ delete verboseerror_;
+ }
+ if (error_id_ != &::google::protobuf::internal::kEmptyString) {
+ delete error_id_;
+ }
+ if (error_node_ != &::google::protobuf::internal::kEmptyString) {
+ delete error_node_;
+ }
if (this != default_instance_) {
delete id_;
delete foreman_;
@@ -5313,6 +5413,31 @@ void QueryProfile::Clear() {
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
total_fragments_ = 0;
finished_fragments_ = 0;
+ if (has_user()) {
+ if (user_ != _default_user_) {
+ user_->assign(*_default_user_);
+ }
+ }
+ if (has_error()) {
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
+ error_->clear();
+ }
+ }
+ if (has_verboseerror()) {
+ if (verboseerror_ != &::google::protobuf::internal::kEmptyString) {
+ verboseerror_->clear();
+ }
+ }
+ if (has_error_id()) {
+ if (error_id_ != &::google::protobuf::internal::kEmptyString) {
+ error_id_->clear();
+ }
+ }
+ if (has_error_node()) {
+ if (error_node_ != &::google::protobuf::internal::kEmptyString) {
+ error_node_->clear();
+ }
+ }
}
fragment_profile_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
@@ -5503,6 +5628,91 @@ bool QueryProfile::MergePartialFromCodedStream(
goto handle_uninterpreted;
}
if (input->ExpectTag(90)) goto parse_fragment_profile;
+ if (input->ExpectTag(98)) goto parse_user;
+ break;
+ }
+
+ // optional string user = 12 [default = "-"];
+ case 12: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_user:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_user()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->user().data(), this->user().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(106)) goto parse_error;
+ break;
+ }
+
+ // optional string error = 13;
+ case 13: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_error:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_error()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error().data(), this->error().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(114)) goto parse_verboseError;
+ break;
+ }
+
+ // optional string verboseError = 14;
+ case 14: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_verboseError:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_verboseerror()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->verboseerror().data(), this->verboseerror().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(122)) goto parse_error_id;
+ break;
+ }
+
+ // optional string error_id = 15;
+ case 15: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_error_id:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_error_id()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error_id().data(), this->error_id().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(130)) goto parse_error_node;
+ break;
+ }
+
+ // optional string error_node = 16;
+ case 16: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_error_node:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_error_node()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error_node().data(), this->error_node().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
if (input->ExpectAtEnd()) return true;
break;
}
@@ -5593,6 +5803,51 @@ void QueryProfile::SerializeWithCachedSizes(
11, this->fragment_profile(i), output);
}
+ // optional string user = 12 [default = "-"];
+ if (has_user()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->user().data(), this->user().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 12, this->user(), output);
+ }
+
+ // optional string error = 13;
+ if (has_error()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error().data(), this->error().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 13, this->error(), output);
+ }
+
+ // optional string verboseError = 14;
+ if (has_verboseerror()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->verboseerror().data(), this->verboseerror().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 14, this->verboseerror(), output);
+ }
+
+ // optional string error_id = 15;
+ if (has_error_id()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error_id().data(), this->error_id().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 15, this->error_id(), output);
+ }
+
+ // optional string error_node = 16;
+ if (has_error_node()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error_node().data(), this->error_node().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 16, this->error_node(), output);
+ }
+
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
@@ -5674,6 +5929,56 @@ void QueryProfile::SerializeWithCachedSizes(
11, this->fragment_profile(i), target);
}
+ // optional string user = 12 [default = "-"];
+ if (has_user()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->user().data(), this->user().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 12, this->user(), target);
+ }
+
+ // optional string error = 13;
+ if (has_error()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error().data(), this->error().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 13, this->error(), target);
+ }
+
+ // optional string verboseError = 14;
+ if (has_verboseerror()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->verboseerror().data(), this->verboseerror().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 14, this->verboseerror(), target);
+ }
+
+ // optional string error_id = 15;
+ if (has_error_id()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error_id().data(), this->error_id().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 15, this->error_id(), target);
+ }
+
+ // optional string error_node = 16;
+ if (has_error_node()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->error_node().data(), this->error_node().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 16, this->error_node(), target);
+ }
+
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
@@ -5755,6 +6060,41 @@ int QueryProfile::ByteSize() const {
this->finished_fragments());
}
+ // optional string user = 12 [default = "-"];
+ if (has_user()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->user());
+ }
+
+ // optional string error = 13;
+ if (has_error()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->error());
+ }
+
+ // optional string verboseError = 14;
+ if (has_verboseerror()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->verboseerror());
+ }
+
+ // optional string error_id = 15;
+ if (has_error_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->error_id());
+ }
+
+ // optional string error_node = 16;
+ if (has_error_node()) {
+ total_size += 2 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->error_node());
+ }
+
}
// repeated .exec.shared.MajorFragmentProfile fragment_profile = 11;
total_size += 1 * this->fragment_profile_size();
@@ -5823,6 +6163,21 @@ void QueryProfile::MergeFrom(const QueryProfile& from) {
if (from.has_finished_fragments()) {
set_finished_fragments(from.finished_fragments());
}
+ if (from.has_user()) {
+ set_user(from.user());
+ }
+ if (from.has_error()) {
+ set_error(from.error());
+ }
+ if (from.has_verboseerror()) {
+ set_verboseerror(from.verboseerror());
+ }
+ if (from.has_error_id()) {
+ set_error_id(from.error_id());
+ }
+ if (from.has_error_node()) {
+ set_error_node(from.error_node());
+ }
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
@@ -5857,6 +6212,11 @@ void QueryProfile::Swap(QueryProfile* other) {
std::swap(total_fragments_, other->total_fragments_);
std::swap(finished_fragments_, other->finished_fragments_);
fragment_profile_.Swap(&other->fragment_profile_);
+ std::swap(user_, other->user_);
+ std::swap(error_, other->error_);
+ std::swap(verboseerror_, other->verboseerror_);
+ std::swap(error_id_, other->error_id_);
+ std::swap(error_node_, other->error_node_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
@@ -6132,6 +6492,8 @@ const int MinorFragmentProfile::kEndTimeFieldNumber;
const int MinorFragmentProfile::kMemoryUsedFieldNumber;
const int MinorFragmentProfile::kMaxMemoryUsedFieldNumber;
const int MinorFragmentProfile::kEndpointFieldNumber;
+const int MinorFragmentProfile::kLastUpdateFieldNumber;
+const int MinorFragmentProfile::kLastProgressFieldNumber;
#endif // !_MSC_VER
MinorFragmentProfile::MinorFragmentProfile()
@@ -6160,6 +6522,8 @@ void MinorFragmentProfile::SharedCtor() {
memory_used_ = GOOGLE_LONGLONG(0);
max_memory_used_ = GOOGLE_LONGLONG(0);
endpoint_ = NULL;
+ last_update_ = GOOGLE_LONGLONG(0);
+ last_progress_ = GOOGLE_LONGLONG(0);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -6211,6 +6575,8 @@ void MinorFragmentProfile::Clear() {
if (has_endpoint()) {
if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
}
+ last_update_ = GOOGLE_LONGLONG(0);
+ last_progress_ = GOOGLE_LONGLONG(0);
}
operator_profile_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
@@ -6362,6 +6728,38 @@ bool MinorFragmentProfile::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
+ if (input->ExpectTag(80)) goto parse_last_update;
+ break;
+ }
+
+ // optional int64 last_update = 10;
+ case 10: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_last_update:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &last_update_)));
+ set_has_last_update();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(88)) goto parse_last_progress;
+ break;
+ }
+
+ // optional int64 last_progress = 11;
+ case 11: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_last_progress:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &last_progress_)));
+ set_has_last_progress();
+ } else {
+ goto handle_uninterpreted;
+ }
if (input->ExpectAtEnd()) return true;
break;
}
@@ -6433,6 +6831,16 @@ void MinorFragmentProfile::SerializeWithCachedSizes(
9, this->endpoint(), output);
}
+ // optional int64 last_update = 10;
+ if (has_last_update()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(10, this->last_update(), output);
+ }
+
+ // optional int64 last_progress = 11;
+ if (has_last_progress()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(11, this->last_progress(), output);
+ }
+
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
@@ -6493,6 +6901,16 @@ void MinorFragmentProfile::SerializeWithCachedSizes(
9, this->endpoint(), target);
}
+ // optional int64 last_update = 10;
+ if (has_last_update()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(10, this->last_update(), target);
+ }
+
+ // optional int64 last_progress = 11;
+ if (has_last_progress()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(11, this->last_progress(), target);
+ }
+
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
@@ -6561,6 +6979,20 @@ int MinorFragmentProfile::ByteSize() const {
this->endpoint());
}
+ // optional int64 last_update = 10;
+ if (has_last_update()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->last_update());
+ }
+
+ // optional int64 last_progress = 11;
+ if (has_last_progress()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->last_progress());
+ }
+
}
// repeated .exec.shared.OperatorProfile operator_profile = 4;
total_size += 1 * this->operator_profile_size();
@@ -6623,6 +7055,12 @@ void MinorFragmentProfile::MergeFrom(const MinorFragmentProfile& from) {
if (from.has_endpoint()) {
mutable_endpoint()->::exec::DrillbitEndpoint::MergeFrom(from.endpoint());
}
+ if (from.has_last_update()) {
+ set_last_update(from.last_update());
+ }
+ if (from.has_last_progress()) {
+ set_last_progress(from.last_progress());
+ }
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
@@ -6655,6 +7093,8 @@ void MinorFragmentProfile::Swap(MinorFragmentProfile* other) {
std::swap(memory_used_, other->memory_used_);
std::swap(max_memory_used_, other->max_memory_used_);
std::swap(endpoint_, other->endpoint_);
+ std::swap(last_update_, other->last_update_);
+ std::swap(last_progress_, other->last_progress_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
diff --git a/contrib/native/client/src/protobuf/UserBitShared.pb.h b/contrib/native/client/src/protobuf/UserBitShared.pb.h
index e2f5fd0fa..b7073ff90 100644
--- a/contrib/native/client/src/protobuf/UserBitShared.pb.h
+++ b/contrib/native/client/src/protobuf/UserBitShared.pb.h
@@ -58,6 +58,34 @@ class OperatorProfile;
class StreamProfile;
class MetricValue;
+enum DrillPBError_ErrorType {
+ DrillPBError_ErrorType_CONNECTION = 0,
+ DrillPBError_ErrorType_DATA_READ = 1,
+ DrillPBError_ErrorType_DATA_WRITE = 2,
+ DrillPBError_ErrorType_FUNCTION = 3,
+ DrillPBError_ErrorType_PARSE = 4,
+ DrillPBError_ErrorType_PERMISSION = 5,
+ DrillPBError_ErrorType_PLAN = 6,
+ DrillPBError_ErrorType_RESOURCE = 7,
+ DrillPBError_ErrorType_SYSTEM = 8,
+ DrillPBError_ErrorType_UNSUPPORTED_OPERATION = 9,
+ DrillPBError_ErrorType_VALIDATION = 10
+};
+bool DrillPBError_ErrorType_IsValid(int value);
+const DrillPBError_ErrorType DrillPBError_ErrorType_ErrorType_MIN = DrillPBError_ErrorType_CONNECTION;
+const DrillPBError_ErrorType DrillPBError_ErrorType_ErrorType_MAX = DrillPBError_ErrorType_VALIDATION;
+const int DrillPBError_ErrorType_ErrorType_ARRAYSIZE = DrillPBError_ErrorType_ErrorType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* DrillPBError_ErrorType_descriptor();
+inline const ::std::string& DrillPBError_ErrorType_Name(DrillPBError_ErrorType value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ DrillPBError_ErrorType_descriptor(), value);
+}
+inline bool DrillPBError_ErrorType_Parse(
+ const ::std::string& name, DrillPBError_ErrorType* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<DrillPBError_ErrorType>(
+ DrillPBError_ErrorType_descriptor(), name, value);
+}
enum NamePart_Type {
NamePart_Type_NAME = 0,
NamePart_Type_ARRAY = 1
@@ -146,11 +174,12 @@ enum FragmentState {
RUNNING = 2,
FINISHED = 3,
CANCELLED = 4,
- FAILED = 5
+ FAILED = 5,
+ CANCELLATION_REQUESTED = 6
};
bool FragmentState_IsValid(int value);
const FragmentState FragmentState_MIN = SENDING;
-const FragmentState FragmentState_MAX = FAILED;
+const FragmentState FragmentState_MAX = CANCELLATION_REQUESTED;
const int FragmentState_ARRAYSIZE = FragmentState_MAX + 1;
const ::google::protobuf::EnumDescriptor* FragmentState_descriptor();
@@ -198,11 +227,13 @@ enum CoreOperatorType {
COMPLEX_TO_JSON = 31,
PRODUCER_CONSUMER = 32,
HBASE_SUB_SCAN = 33,
- WINDOW = 34
+ WINDOW = 34,
+ NESTED_LOOP_JOIN = 35,
+ AVRO_SUB_SCAN = 36
};
bool CoreOperatorType_IsValid(int value);
const CoreOperatorType CoreOperatorType_MIN = SINGLE_SENDER;
-const CoreOperatorType CoreOperatorType_MAX = WINDOW;
+const CoreOperatorType CoreOperatorType_MAX = AVRO_SUB_SCAN;
const int CoreOperatorType_ARRAYSIZE = CoreOperatorType_MAX + 1;
const ::google::protobuf::EnumDescriptor* CoreOperatorType_descriptor();
@@ -448,6 +479,39 @@ class DrillPBError : public ::google::protobuf::Message {
// nested types ----------------------------------------------------
+ typedef DrillPBError_ErrorType ErrorType;
+ static const ErrorType CONNECTION = DrillPBError_ErrorType_CONNECTION;
+ static const ErrorType DATA_READ = DrillPBError_ErrorType_DATA_READ;
+ static const ErrorType DATA_WRITE = DrillPBError_ErrorType_DATA_WRITE;
+ static const ErrorType FUNCTION = DrillPBError_ErrorType_FUNCTION;
+ static const ErrorType PARSE = DrillPBError_ErrorType_PARSE;
+ static const ErrorType PERMISSION = DrillPBError_ErrorType_PERMISSION;
+ static const ErrorType PLAN = DrillPBError_ErrorType_PLAN;
+ static const ErrorType RESOURCE = DrillPBError_ErrorType_RESOURCE;
+ static const ErrorType SYSTEM = DrillPBError_ErrorType_SYSTEM;
+ static const ErrorType UNSUPPORTED_OPERATION = DrillPBError_ErrorType_UNSUPPORTED_OPERATION;
+ static const ErrorType VALIDATION = DrillPBError_ErrorType_VALIDATION;
+ static inline bool ErrorType_IsValid(int value) {
+ return DrillPBError_ErrorType_IsValid(value);
+ }
+ static const ErrorType ErrorType_MIN =
+ DrillPBError_ErrorType_ErrorType_MIN;
+ static const ErrorType ErrorType_MAX =
+ DrillPBError_ErrorType_ErrorType_MAX;
+ static const int ErrorType_ARRAYSIZE =
+ DrillPBError_ErrorType_ErrorType_ARRAYSIZE;
+ static inline const ::google::protobuf::EnumDescriptor*
+ ErrorType_descriptor() {
+ return DrillPBError_ErrorType_descriptor();
+ }
+ static inline const ::std::string& ErrorType_Name(ErrorType value) {
+ return DrillPBError_ErrorType_Name(value);
+ }
+ static inline bool ErrorType_Parse(const ::std::string& name,
+ ErrorType* value) {
+ return DrillPBError_ErrorType_Parse(name, value);
+ }
+
// accessors -------------------------------------------------------
// optional string error_id = 1;
@@ -471,12 +535,12 @@ class DrillPBError : public ::google::protobuf::Message {
inline ::exec::DrillbitEndpoint* release_endpoint();
inline void set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint);
- // optional int32 error_type = 3;
+ // optional .exec.shared.DrillPBError.ErrorType error_type = 3;
inline bool has_error_type() const;
inline void clear_error_type();
static const int kErrorTypeFieldNumber = 3;
- inline ::google::protobuf::int32 error_type() const;
- inline void set_error_type(::google::protobuf::int32 value);
+ inline ::exec::shared::DrillPBError_ErrorType error_type() const;
+ inline void set_error_type(::exec::shared::DrillPBError_ErrorType value);
// optional string message = 4;
inline bool has_message() const;
@@ -531,7 +595,7 @@ class DrillPBError : public ::google::protobuf::Message {
::std::string* message_;
::exec::shared::ExceptionWrapper* exception_;
::google::protobuf::RepeatedPtrField< ::exec::shared::ParsingError > parsing_error_;
- ::google::protobuf::int32 error_type_;
+ int error_type_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
@@ -1721,7 +1785,7 @@ class QueryInfo : public ::google::protobuf::Message {
inline ::exec::shared::QueryResult_QueryState state() const;
inline void set_state(::exec::shared::QueryResult_QueryState value);
- // optional string user = 4;
+ // optional string user = 4 [default = "-"];
inline bool has_user() const;
inline void clear_user();
static const int kUserFieldNumber = 4;
@@ -1760,6 +1824,7 @@ class QueryInfo : public ::google::protobuf::Message {
::std::string* query_;
::google::protobuf::int64 start_;
::std::string* user_;
+ static ::std::string* _default_user_;
::exec::DrillbitEndpoint* foreman_;
int state_;
@@ -1925,6 +1990,66 @@ class QueryProfile : public ::google::protobuf::Message {
inline ::google::protobuf::RepeatedPtrField< ::exec::shared::MajorFragmentProfile >*
mutable_fragment_profile();
+ // optional string user = 12 [default = "-"];
+ inline bool has_user() const;
+ inline void clear_user();
+ static const int kUserFieldNumber = 12;
+ inline const ::std::string& user() const;
+ inline void set_user(const ::std::string& value);
+ inline void set_user(const char* value);
+ inline void set_user(const char* value, size_t size);
+ inline ::std::string* mutable_user();
+ inline ::std::string* release_user();
+ inline void set_allocated_user(::std::string* user);
+
+ // optional string error = 13;
+ inline bool has_error() const;
+ inline void clear_error();
+ static const int kErrorFieldNumber = 13;
+ inline const ::std::string& error() const;
+ inline void set_error(const ::std::string& value);
+ inline void set_error(const char* value);
+ inline void set_error(const char* value, size_t size);
+ inline ::std::string* mutable_error();
+ inline ::std::string* release_error();
+ inline void set_allocated_error(::std::string* error);
+
+ // optional string verboseError = 14;
+ inline bool has_verboseerror() const;
+ inline void clear_verboseerror();
+ static const int kVerboseErrorFieldNumber = 14;
+ inline const ::std::string& verboseerror() const;
+ inline void set_verboseerror(const ::std::string& value);
+ inline void set_verboseerror(const char* value);
+ inline void set_verboseerror(const char* value, size_t size);
+ inline ::std::string* mutable_verboseerror();
+ inline ::std::string* release_verboseerror();
+ inline void set_allocated_verboseerror(::std::string* verboseerror);
+
+ // optional string error_id = 15;
+ inline bool has_error_id() const;
+ inline void clear_error_id();
+ static const int kErrorIdFieldNumber = 15;
+ inline const ::std::string& error_id() const;
+ inline void set_error_id(const ::std::string& value);
+ inline void set_error_id(const char* value);
+ inline void set_error_id(const char* value, size_t size);
+ inline ::std::string* mutable_error_id();
+ inline ::std::string* release_error_id();
+ inline void set_allocated_error_id(::std::string* error_id);
+
+ // optional string error_node = 16;
+ inline bool has_error_node() const;
+ inline void clear_error_node();
+ static const int kErrorNodeFieldNumber = 16;
+ inline const ::std::string& error_node() const;
+ inline void set_error_node(const ::std::string& value);
+ inline void set_error_node(const char* value);
+ inline void set_error_node(const char* value, size_t size);
+ inline ::std::string* mutable_error_node();
+ inline ::std::string* release_error_node();
+ inline void set_allocated_error_node(::std::string* error_node);
+
// @@protoc_insertion_point(class_scope:exec.shared.QueryProfile)
private:
inline void set_has_id();
@@ -1947,6 +2072,16 @@ class QueryProfile : public ::google::protobuf::Message {
inline void clear_has_total_fragments();
inline void set_has_finished_fragments();
inline void clear_has_finished_fragments();
+ inline void set_has_user();
+ inline void clear_has_user();
+ inline void set_has_error();
+ inline void clear_has_error();
+ inline void set_has_verboseerror();
+ inline void clear_has_verboseerror();
+ inline void set_has_error_id();
+ inline void clear_has_error_id();
+ inline void set_has_error_node();
+ inline void clear_has_error_node();
::google::protobuf::UnknownFieldSet _unknown_fields_;
@@ -1961,9 +2096,15 @@ class QueryProfile : public ::google::protobuf::Message {
::google::protobuf::int32 total_fragments_;
::google::protobuf::int32 finished_fragments_;
::google::protobuf::RepeatedPtrField< ::exec::shared::MajorFragmentProfile > fragment_profile_;
+ ::std::string* user_;
+ static ::std::string* _default_user_;
+ ::std::string* error_;
+ ::std::string* verboseerror_;
+ ::std::string* error_id_;
+ ::std::string* error_node_;
mutable int _cached_size_;
- ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32];
+ ::google::protobuf::uint32 _has_bits_[(16 + 31) / 32];
friend void protobuf_AddDesc_UserBitShared_2eproto();
friend void protobuf_AssignDesc_UserBitShared_2eproto();
@@ -2195,6 +2336,20 @@ class MinorFragmentProfile : public ::google::protobuf::Message {
inline ::exec::DrillbitEndpoint* release_endpoint();
inline void set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint);
+ // optional int64 last_update = 10;
+ inline bool has_last_update() const;
+ inline void clear_last_update();
+ static const int kLastUpdateFieldNumber = 10;
+ inline ::google::protobuf::int64 last_update() const;
+ inline void set_last_update(::google::protobuf::int64 value);
+
+ // optional int64 last_progress = 11;
+ inline bool has_last_progress() const;
+ inline void clear_last_progress();
+ static const int kLastProgressFieldNumber = 11;
+ inline ::google::protobuf::int64 last_progress() const;
+ inline void set_last_progress(::google::protobuf::int64 value);
+
// @@protoc_insertion_point(class_scope:exec.shared.MinorFragmentProfile)
private:
inline void set_has_state();
@@ -2213,6 +2368,10 @@ class MinorFragmentProfile : public ::google::protobuf::Message {
inline void clear_has_max_memory_used();
inline void set_has_endpoint();
inline void clear_has_endpoint();
+ inline void set_has_last_update();
+ inline void clear_has_last_update();
+ inline void set_has_last_progress();
+ inline void clear_has_last_progress();
::google::protobuf::UnknownFieldSet _unknown_fields_;
@@ -2225,9 +2384,11 @@ class MinorFragmentProfile : public ::google::protobuf::Message {
::google::protobuf::int64 memory_used_;
::google::protobuf::int64 max_memory_used_;
::exec::DrillbitEndpoint* endpoint_;
+ ::google::protobuf::int64 last_update_;
+ ::google::protobuf::int64 last_progress_;
mutable int _cached_size_;
- ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32];
+ ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32];
friend void protobuf_AddDesc_UserBitShared_2eproto();
friend void protobuf_AssignDesc_UserBitShared_2eproto();
@@ -2835,7 +2996,7 @@ inline void DrillPBError::set_allocated_endpoint(::exec::DrillbitEndpoint* endpo
}
}
-// optional int32 error_type = 3;
+// optional .exec.shared.DrillPBError.ErrorType error_type = 3;
inline bool DrillPBError::has_error_type() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
@@ -2849,10 +3010,11 @@ inline void DrillPBError::clear_error_type() {
error_type_ = 0;
clear_has_error_type();
}
-inline ::google::protobuf::int32 DrillPBError::error_type() const {
- return error_type_;
+inline ::exec::shared::DrillPBError_ErrorType DrillPBError::error_type() const {
+ return static_cast< ::exec::shared::DrillPBError_ErrorType >(error_type_);
}
-inline void DrillPBError::set_error_type(::google::protobuf::int32 value) {
+inline void DrillPBError::set_error_type(::exec::shared::DrillPBError_ErrorType value) {
+ assert(::exec::shared::DrillPBError_ErrorType_IsValid(value));
set_has_error_type();
error_type_ = value;
}
@@ -4307,7 +4469,7 @@ inline void QueryInfo::set_state(::exec::shared::QueryResult_QueryState value) {
state_ = value;
}
-// optional string user = 4;
+// optional string user = 4 [default = "-"];
inline bool QueryInfo::has_user() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
@@ -4318,8 +4480,8 @@ inline void QueryInfo::clear_has_user() {
_has_bits_[0] &= ~0x00000008u;
}
inline void QueryInfo::clear_user() {
- if (user_ != &::google::protobuf::internal::kEmptyString) {
- user_->clear();
+ if (user_ != _default_user_) {
+ user_->assign(*_default_user_);
}
clear_has_user();
}
@@ -4328,44 +4490,44 @@ inline const ::std::string& QueryInfo::user() const {
}
inline void QueryInfo::set_user(const ::std::string& value) {
set_has_user();
- if (user_ == &::google::protobuf::internal::kEmptyString) {
+ if (user_ == _default_user_) {
user_ = new ::std::string;
}
user_->assign(value);
}
inline void QueryInfo::set_user(const char* value) {
set_has_user();
- if (user_ == &::google::protobuf::internal::kEmptyString) {
+ if (user_ == _default_user_) {
user_ = new ::std::string;
}
user_->assign(value);
}
inline void QueryInfo::set_user(const char* value, size_t size) {
set_has_user();
- if (user_ == &::google::protobuf::internal::kEmptyString) {
+ if (user_ == _default_user_) {
user_ = new ::std::string;
}
user_->assign(reinterpret_cast<const char*>(value), size);
}
inline ::std::string* QueryInfo::mutable_user() {
set_has_user();
- if (user_ == &::google::protobuf::internal::kEmptyString) {
- user_ = new ::std::string;
+ if (user_ == _default_user_) {
+ user_ = new ::std::string(*_default_user_);
}
return user_;
}
inline ::std::string* QueryInfo::release_user() {
clear_has_user();
- if (user_ == &::google::protobuf::internal::kEmptyString) {
+ if (user_ == _default_user_) {
return NULL;
} else {
::std::string* temp = user_;
- user_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ user_ = const_cast< ::std::string*>(_default_user_);
return temp;
}
}
inline void QueryInfo::set_allocated_user(::std::string* user) {
- if (user_ != &::google::protobuf::internal::kEmptyString) {
+ if (user_ != _default_user_) {
delete user_;
}
if (user) {
@@ -4373,7 +4535,7 @@ inline void QueryInfo::set_allocated_user(::std::string* user) {
user_ = user;
} else {
clear_has_user();
- user_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ user_ = const_cast< ::std::string*>(_default_user_);
}
}
@@ -4794,6 +4956,356 @@ QueryProfile::mutable_fragment_profile() {
return &fragment_profile_;
}
+// optional string user = 12 [default = "-"];
+inline bool QueryProfile::has_user() const {
+ return (_has_bits_[0] & 0x00000800u) != 0;
+}
+inline void QueryProfile::set_has_user() {
+ _has_bits_[0] |= 0x00000800u;
+}
+inline void QueryProfile::clear_has_user() {
+ _has_bits_[0] &= ~0x00000800u;
+}
+inline void QueryProfile::clear_user() {
+ if (user_ != _default_user_) {
+ user_->assign(*_default_user_);
+ }
+ clear_has_user();
+}
+inline const ::std::string& QueryProfile::user() const {
+ return *user_;
+}
+inline void QueryProfile::set_user(const ::std::string& value) {
+ set_has_user();
+ if (user_ == _default_user_) {
+ user_ = new ::std::string;
+ }
+ user_->assign(value);
+}
+inline void QueryProfile::set_user(const char* value) {
+ set_has_user();
+ if (user_ == _default_user_) {
+ user_ = new ::std::string;
+ }
+ user_->assign(value);
+}
+inline void QueryProfile::set_user(const char* value, size_t size) {
+ set_has_user();
+ if (user_ == _default_user_) {
+ user_ = new ::std::string;
+ }
+ user_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* QueryProfile::mutable_user() {
+ set_has_user();
+ if (user_ == _default_user_) {
+ user_ = new ::std::string(*_default_user_);
+ }
+ return user_;
+}
+inline ::std::string* QueryProfile::release_user() {
+ clear_has_user();
+ if (user_ == _default_user_) {
+ return NULL;
+ } else {
+ ::std::string* temp = user_;
+ user_ = const_cast< ::std::string*>(_default_user_);
+ return temp;
+ }
+}
+inline void QueryProfile::set_allocated_user(::std::string* user) {
+ if (user_ != _default_user_) {
+ delete user_;
+ }
+ if (user) {
+ set_has_user();
+ user_ = user;
+ } else {
+ clear_has_user();
+ user_ = const_cast< ::std::string*>(_default_user_);
+ }
+}
+
+// optional string error = 13;
+inline bool QueryProfile::has_error() const {
+ return (_has_bits_[0] & 0x00001000u) != 0;
+}
+inline void QueryProfile::set_has_error() {
+ _has_bits_[0] |= 0x00001000u;
+}
+inline void QueryProfile::clear_has_error() {
+ _has_bits_[0] &= ~0x00001000u;
+}
+inline void QueryProfile::clear_error() {
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
+ error_->clear();
+ }
+ clear_has_error();
+}
+inline const ::std::string& QueryProfile::error() const {
+ return *error_;
+}
+inline void QueryProfile::set_error(const ::std::string& value) {
+ set_has_error();
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
+ error_ = new ::std::string;
+ }
+ error_->assign(value);
+}
+inline void QueryProfile::set_error(const char* value) {
+ set_has_error();
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
+ error_ = new ::std::string;
+ }
+ error_->assign(value);
+}
+inline void QueryProfile::set_error(const char* value, size_t size) {
+ set_has_error();
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
+ error_ = new ::std::string;
+ }
+ error_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* QueryProfile::mutable_error() {
+ set_has_error();
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
+ error_ = new ::std::string;
+ }
+ return error_;
+}
+inline ::std::string* QueryProfile::release_error() {
+ clear_has_error();
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = error_;
+ error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void QueryProfile::set_allocated_error(::std::string* error) {
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
+ delete error_;
+ }
+ if (error) {
+ set_has_error();
+ error_ = error;
+ } else {
+ clear_has_error();
+ error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional string verboseError = 14;
+inline bool QueryProfile::has_verboseerror() const {
+ return (_has_bits_[0] & 0x00002000u) != 0;
+}
+inline void QueryProfile::set_has_verboseerror() {
+ _has_bits_[0] |= 0x00002000u;
+}
+inline void QueryProfile::clear_has_verboseerror() {
+ _has_bits_[0] &= ~0x00002000u;
+}
+inline void QueryProfile::clear_verboseerror() {
+ if (verboseerror_ != &::google::protobuf::internal::kEmptyString) {
+ verboseerror_->clear();
+ }
+ clear_has_verboseerror();
+}
+inline const ::std::string& QueryProfile::verboseerror() const {
+ return *verboseerror_;
+}
+inline void QueryProfile::set_verboseerror(const ::std::string& value) {
+ set_has_verboseerror();
+ if (verboseerror_ == &::google::protobuf::internal::kEmptyString) {
+ verboseerror_ = new ::std::string;
+ }
+ verboseerror_->assign(value);
+}
+inline void QueryProfile::set_verboseerror(const char* value) {
+ set_has_verboseerror();
+ if (verboseerror_ == &::google::protobuf::internal::kEmptyString) {
+ verboseerror_ = new ::std::string;
+ }
+ verboseerror_->assign(value);
+}
+inline void QueryProfile::set_verboseerror(const char* value, size_t size) {
+ set_has_verboseerror();
+ if (verboseerror_ == &::google::protobuf::internal::kEmptyString) {
+ verboseerror_ = new ::std::string;
+ }
+ verboseerror_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* QueryProfile::mutable_verboseerror() {
+ set_has_verboseerror();
+ if (verboseerror_ == &::google::protobuf::internal::kEmptyString) {
+ verboseerror_ = new ::std::string;
+ }
+ return verboseerror_;
+}
+inline ::std::string* QueryProfile::release_verboseerror() {
+ clear_has_verboseerror();
+ if (verboseerror_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = verboseerror_;
+ verboseerror_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void QueryProfile::set_allocated_verboseerror(::std::string* verboseerror) {
+ if (verboseerror_ != &::google::protobuf::internal::kEmptyString) {
+ delete verboseerror_;
+ }
+ if (verboseerror) {
+ set_has_verboseerror();
+ verboseerror_ = verboseerror;
+ } else {
+ clear_has_verboseerror();
+ verboseerror_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional string error_id = 15;
+inline bool QueryProfile::has_error_id() const {
+ return (_has_bits_[0] & 0x00004000u) != 0;
+}
+inline void QueryProfile::set_has_error_id() {
+ _has_bits_[0] |= 0x00004000u;
+}
+inline void QueryProfile::clear_has_error_id() {
+ _has_bits_[0] &= ~0x00004000u;
+}
+inline void QueryProfile::clear_error_id() {
+ if (error_id_ != &::google::protobuf::internal::kEmptyString) {
+ error_id_->clear();
+ }
+ clear_has_error_id();
+}
+inline const ::std::string& QueryProfile::error_id() const {
+ return *error_id_;
+}
+inline void QueryProfile::set_error_id(const ::std::string& value) {
+ set_has_error_id();
+ if (error_id_ == &::google::protobuf::internal::kEmptyString) {
+ error_id_ = new ::std::string;
+ }
+ error_id_->assign(value);
+}
+inline void QueryProfile::set_error_id(const char* value) {
+ set_has_error_id();
+ if (error_id_ == &::google::protobuf::internal::kEmptyString) {
+ error_id_ = new ::std::string;
+ }
+ error_id_->assign(value);
+}
+inline void QueryProfile::set_error_id(const char* value, size_t size) {
+ set_has_error_id();
+ if (error_id_ == &::google::protobuf::internal::kEmptyString) {
+ error_id_ = new ::std::string;
+ }
+ error_id_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* QueryProfile::mutable_error_id() {
+ set_has_error_id();
+ if (error_id_ == &::google::protobuf::internal::kEmptyString) {
+ error_id_ = new ::std::string;
+ }
+ return error_id_;
+}
+inline ::std::string* QueryProfile::release_error_id() {
+ clear_has_error_id();
+ if (error_id_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = error_id_;
+ error_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void QueryProfile::set_allocated_error_id(::std::string* error_id) {
+ if (error_id_ != &::google::protobuf::internal::kEmptyString) {
+ delete error_id_;
+ }
+ if (error_id) {
+ set_has_error_id();
+ error_id_ = error_id;
+ } else {
+ clear_has_error_id();
+ error_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional string error_node = 16;
+inline bool QueryProfile::has_error_node() const {
+ return (_has_bits_[0] & 0x00008000u) != 0;
+}
+inline void QueryProfile::set_has_error_node() {
+ _has_bits_[0] |= 0x00008000u;
+}
+inline void QueryProfile::clear_has_error_node() {
+ _has_bits_[0] &= ~0x00008000u;
+}
+inline void QueryProfile::clear_error_node() {
+ if (error_node_ != &::google::protobuf::internal::kEmptyString) {
+ error_node_->clear();
+ }
+ clear_has_error_node();
+}
+inline const ::std::string& QueryProfile::error_node() const {
+ return *error_node_;
+}
+inline void QueryProfile::set_error_node(const ::std::string& value) {
+ set_has_error_node();
+ if (error_node_ == &::google::protobuf::internal::kEmptyString) {
+ error_node_ = new ::std::string;
+ }
+ error_node_->assign(value);
+}
+inline void QueryProfile::set_error_node(const char* value) {
+ set_has_error_node();
+ if (error_node_ == &::google::protobuf::internal::kEmptyString) {
+ error_node_ = new ::std::string;
+ }
+ error_node_->assign(value);
+}
+inline void QueryProfile::set_error_node(const char* value, size_t size) {
+ set_has_error_node();
+ if (error_node_ == &::google::protobuf::internal::kEmptyString) {
+ error_node_ = new ::std::string;
+ }
+ error_node_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* QueryProfile::mutable_error_node() {
+ set_has_error_node();
+ if (error_node_ == &::google::protobuf::internal::kEmptyString) {
+ error_node_ = new ::std::string;
+ }
+ return error_node_;
+}
+inline ::std::string* QueryProfile::release_error_node() {
+ clear_has_error_node();
+ if (error_node_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = error_node_;
+ error_node_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void QueryProfile::set_allocated_error_node(::std::string* error_node) {
+ if (error_node_ != &::google::protobuf::internal::kEmptyString) {
+ delete error_node_;
+ }
+ if (error_node) {
+ set_has_error_node();
+ error_node_ = error_node;
+ } else {
+ clear_has_error_node();
+ error_node_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
// -------------------------------------------------------------------
// MajorFragmentProfile
@@ -5083,6 +5595,50 @@ inline void MinorFragmentProfile::set_allocated_endpoint(::exec::DrillbitEndpoin
}
}
+// optional int64 last_update = 10;
+inline bool MinorFragmentProfile::has_last_update() const {
+ return (_has_bits_[0] & 0x00000200u) != 0;
+}
+inline void MinorFragmentProfile::set_has_last_update() {
+ _has_bits_[0] |= 0x00000200u;
+}
+inline void MinorFragmentProfile::clear_has_last_update() {
+ _has_bits_[0] &= ~0x00000200u;
+}
+inline void MinorFragmentProfile::clear_last_update() {
+ last_update_ = GOOGLE_LONGLONG(0);
+ clear_has_last_update();
+}
+inline ::google::protobuf::int64 MinorFragmentProfile::last_update() const {
+ return last_update_;
+}
+inline void MinorFragmentProfile::set_last_update(::google::protobuf::int64 value) {
+ set_has_last_update();
+ last_update_ = value;
+}
+
+// optional int64 last_progress = 11;
+inline bool MinorFragmentProfile::has_last_progress() const {
+ return (_has_bits_[0] & 0x00000400u) != 0;
+}
+inline void MinorFragmentProfile::set_has_last_progress() {
+ _has_bits_[0] |= 0x00000400u;
+}
+inline void MinorFragmentProfile::clear_has_last_progress() {
+ _has_bits_[0] &= ~0x00000400u;
+}
+inline void MinorFragmentProfile::clear_last_progress() {
+ last_progress_ = GOOGLE_LONGLONG(0);
+ clear_has_last_progress();
+}
+inline ::google::protobuf::int64 MinorFragmentProfile::last_progress() const {
+ return last_progress_;
+}
+inline void MinorFragmentProfile::set_last_progress(::google::protobuf::int64 value) {
+ set_has_last_progress();
+ last_progress_ = value;
+}
+
// -------------------------------------------------------------------
// OperatorProfile
@@ -5420,6 +5976,10 @@ namespace google {
namespace protobuf {
template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::shared::DrillPBError_ErrorType>() {
+ return ::exec::shared::DrillPBError_ErrorType_descriptor();
+}
+template <>
inline const EnumDescriptor* GetEnumDescriptor< ::exec::shared::NamePart_Type>() {
return ::exec::shared::NamePart_Type_descriptor();
}