aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorParth Chandra <pchandra@maprtech.com>2014-05-20 09:42:10 -0700
committerJacques Nadeau <jacques@apache.org>2014-05-29 15:32:29 -0700
commite1e5ea0eddd9199672ab01c5ae31f7a3c0a57249 (patch)
tree92e1761f396dbc02762dd57f4dd1cf66a8b37fc5 /contrib
parentb1d91c8187d197991306b4d054db135121ceca85 (diff)
DRILL-423: C++ Client. Initial implementation (reviewed)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/native/client/CMakeLists.txt75
-rw-r--r--contrib/native/client/cmakeModules/FindZookeeper.cmake44
-rw-r--r--contrib/native/client/example/querySubmitter.cpp312
-rw-r--r--contrib/native/client/resources/parquet_scan_union_screen_physical.json40
-rw-r--r--contrib/native/client/resources/simple_plan.json94
-rw-r--r--contrib/native/client/resources/testTypes.json30
-rwxr-xr-xcontrib/native/client/scripts/cpProtofiles.sh48
-rwxr-xr-xcontrib/native/client/scripts/fixProtodefs.sh58
-rw-r--r--contrib/native/client/src/clientlib/CMakeLists.txt43
-rw-r--r--contrib/native/client/src/clientlib/decimalUtils.cpp168
-rw-r--r--contrib/native/client/src/clientlib/drillClient.cpp288
-rw-r--r--contrib/native/client/src/clientlib/drillClientImpl.cpp857
-rw-r--r--contrib/native/client/src/clientlib/drillClientImpl.hpp316
-rw-r--r--contrib/native/client/src/clientlib/errmsgs.cpp75
-rw-r--r--contrib/native/client/src/clientlib/errmsgs.hpp87
-rw-r--r--contrib/native/client/src/clientlib/recordBatch.cpp464
-rw-r--r--contrib/native/client/src/clientlib/rpcDecoder.cpp149
-rw-r--r--contrib/native/client/src/clientlib/rpcDecoder.hpp38
-rw-r--r--contrib/native/client/src/clientlib/rpcEncoder.cpp106
-rw-r--r--contrib/native/client/src/clientlib/rpcEncoder.hpp55
-rw-r--r--contrib/native/client/src/clientlib/rpcMessage.hpp50
-rw-r--r--contrib/native/client/src/include/drill/common.hpp84
-rw-r--r--contrib/native/client/src/include/drill/decimalUtils.hpp61
-rw-r--r--contrib/native/client/src/include/drill/drillClient.hpp230
-rw-r--r--contrib/native/client/src/include/drill/drillc.hpp29
-rw-r--r--contrib/native/client/src/include/drill/protobuf/Types.pb.h409
-rw-r--r--contrib/native/client/src/include/drill/protobuf/User.pb.h1944
-rw-r--r--contrib/native/client/src/include/drill/recordBatch.hpp873
-rw-r--r--contrib/native/client/src/protobuf/BitControl.pb.cc2486
-rw-r--r--contrib/native/client/src/protobuf/BitControl.pb.h1785
-rw-r--r--contrib/native/client/src/protobuf/BitData.pb.cc1116
-rw-r--r--contrib/native/client/src/protobuf/BitData.pb.h695
-rw-r--r--contrib/native/client/src/protobuf/CMakeLists.txt112
-rw-r--r--contrib/native/client/src/protobuf/Coordination.pb.cc1227
-rw-r--r--contrib/native/client/src/protobuf/Coordination.pb.h845
-rw-r--r--contrib/native/client/src/protobuf/ExecutionProtos.pb.cc404
-rw-r--r--contrib/native/client/src/protobuf/ExecutionProtos.pb.h251
-rw-r--r--contrib/native/client/src/protobuf/GeneralRPC.pb.cc1381
-rw-r--r--contrib/native/client/src/protobuf/GeneralRPC.pb.h975
-rw-r--r--contrib/native/client/src/protobuf/SchemaDef.pb.cc97
-rw-r--r--contrib/native/client/src/protobuf/SchemaDef.pb.h85
-rw-r--r--contrib/native/client/src/protobuf/Types.pb.cc611
-rw-r--r--contrib/native/client/src/protobuf/User.pb.cc2940
-rw-r--r--contrib/native/client/src/protobuf/UserBitShared.pb.cc2596
-rw-r--r--contrib/native/client/src/protobuf/UserBitShared.pb.h1775
45 files changed, 26408 insertions, 0 deletions
diff --git a/contrib/native/client/CMakeLists.txt b/contrib/native/client/CMakeLists.txt
new file mode 100644
index 000000000..a306780a4
--- /dev/null
+++ b/contrib/native/client/CMakeLists.txt
@@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+cmake_minimum_required(VERSION 2.8)
+
+project(drillclient)
+
+message("Project Dir = ${PROJECT_SOURCE_DIR}")
+message("Source Dir = ${CMAKE_SOURCE_DIR} ")
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmakeModules/")
+
+
+# Find Boost
+set(Boost_USE_STATIC_LIBS OFF)
+set(Boost_USE_MULTITHREADED ON)
+set(Boost_USE_STATIC_RUNTIME OFF)
+find_package(Boost REQUIRED COMPONENTS regex system date_time chrono thread log log_setup)
+include_directories(${Boost_INCLUDE_DIRS})
+
+if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_EXE_LINKER_FLAGS "-lrt -lpthread")
+endif()
+
+add_definitions(-DBOOST_ALL_DYN_LINK)
+
+# Find Protobufs
+find_package(Protobuf REQUIRED)
+include_directories(${PROTOBUF_INCLUDE_DIR})
+
+#Find Zookeeper
+find_package(Zookeeper REQUIRED )
+
+#
+# TARGETS
+#
+
+# Preprocess to fix protobuf .proto definitions
+add_subdirectory("${CMAKE_SOURCE_DIR}/src/protobuf")
+# protobuf includes are required by clientlib
+include_directories(${ProtoHeadersDir})
+include_directories(${ProtoIncludesDir})
+
+# Build the Client Library as a shared library
+add_subdirectory("${CMAKE_SOURCE_DIR}/src/clientlib")
+include_directories(${CMAKE_SOURCE_DIR}/src/include ${Zookeeper_INCLUDE_DIRS} )
+
+# add a DEBUG preprocessor macro
+set_property(
+ DIRECTORY
+ PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG DEBUG=1 THREADED
+ )
+
+# Link directory
+link_directories(/usr/local/lib)
+
+add_executable(querySubmitter example/querySubmitter.cpp )
+
+target_link_libraries(querySubmitter ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY} drillClient protomsgs )
+
+
diff --git a/contrib/native/client/cmakeModules/FindZookeeper.cmake b/contrib/native/client/cmakeModules/FindZookeeper.cmake
new file mode 100644
index 000000000..c727ad26c
--- /dev/null
+++ b/contrib/native/client/cmakeModules/FindZookeeper.cmake
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# - Try to find Zookeeper
+# Defines
+# Zookeeper_FOUND - System has Zookeeper
+# Zookeeper_INCLUDE_DIRS - The Zookeeper include directories
+# Zookeeper_LIBRARIES - The libraries needed to use Zookeeper
+# Zookeeper_DEFINITIONS - Compiler switches required for using LibZookeeper
+
+#find_package(PkgConfig)
+#pkg_check_modules(PC_LIBXML QUIET libxml-2.0)
+#set(Zookeeper_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
+
+find_path(Zookeeper_INCLUDE_DIR zookeeper/zookeeper.h /usr/local/include)
+
+set(Zookeeper_LIB_PATHS /usr/local/lib /opt/local/lib)
+find_library(Zookeeper_LIBRARY NAMES zookeeper_mt PATHS ${Zookeeper_LIB_PATHS})
+
+set(Zookeeper_LIBRARIES ${Zookeeper_LIBRARY} )
+set(Zookeeper_INCLUDE_DIRS ${Zookeeper_INCLUDE_DIR} )
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set Zookeeper_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(Zookeeper DEFAULT_MSG
+ Zookeeper_LIBRARY Zookeeper_INCLUDE_DIR)
+
+mark_as_advanced(Zookeeper_INCLUDE_DIR Zookeeper_LIBRARY )
diff --git a/contrib/native/client/example/querySubmitter.cpp b/contrib/native/client/example/querySubmitter.cpp
new file mode 100644
index 000000000..96e2c6557
--- /dev/null
+++ b/contrib/native/client/example/querySubmitter.cpp
@@ -0,0 +1,312 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <fstream>
+#include <iostream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <boost/asio.hpp>
+#include "drill/drillc.hpp"
+
+Drill::status_t QueryResultsListener(void* ctx, Drill::RecordBatch* b, Drill::DrillClientError* err){
+ if(!err){
+ b->print(std::cout, 0); // print all rows
+ delete b; // we're done with this batch, we can delete it
+ return Drill::QRY_SUCCESS ;
+ }else{
+ std::cerr<< "ERROR: " << err->msg << std::endl;
+ return Drill::QRY_FAILURE;
+ }
+}
+
+void print(const Drill::FieldMetadata* pFieldMetadata, void* buf, size_t sz){
+ common::MinorType type = pFieldMetadata->getMinorType();
+ common::DataMode mode = pFieldMetadata->getDataMode();
+ unsigned char printBuffer[10240];
+ memset(printBuffer, 0, sizeof(printBuffer));
+ switch (type) {
+ case common::BIGINT:
+ switch (mode) {
+ case common::DM_REQUIRED:
+ sprintf((char*)printBuffer, "%lld", *(uint64_t*)buf);
+ case common::DM_OPTIONAL:
+ break;
+ case common::DM_REPEATED:
+ break;
+ }
+ break;
+ case common::VARBINARY:
+ switch (mode) {
+ case common::DM_REQUIRED:
+ memcpy(printBuffer, buf, sz);
+ case common::DM_OPTIONAL:
+ break;
+ case common::DM_REPEATED:
+ break;
+ }
+ break;
+ case common::VARCHAR:
+ switch (mode) {
+ case common::DM_REQUIRED:
+ memcpy(printBuffer, buf, sz);
+ case common::DM_OPTIONAL:
+ break;
+ case common::DM_REPEATED:
+ break;
+ }
+ break;
+ default:
+ //memcpy(printBuffer, buf, sz);
+ sprintf((char*)printBuffer, "NIY");
+ break;
+ }
+ printf("%s\t", (char*)printBuffer);
+ return;
+}
+
+int nOptions=5;
+
+struct Option{
+ char name[32];
+ char desc[128];
+ bool required;
+}qsOptions[]= {
+ {"plan", "Plan files separated by semicolons", false},
+ {"query", "Query strings, separated by semicolons", false},
+ {"type", "Query type [physical|logical|sql]", true},
+ {"connectStr", "Connect string", true},
+ {"api", "API type [sync|async]", true}
+};
+
+std::map<std::string, std::string> qsOptionValues;
+
+void printUsage(){
+ std::cerr<<"Usage: querySubmitter ";
+ for(int j=0; j<nOptions ;j++){
+ std::cerr<< " "<< qsOptions[j].name <<"=" << "[" <<qsOptions[j].desc <<"]" ;
+ }
+ std::cerr<<std::endl;
+}
+
+int parseArgs(int argc, char* argv[]){
+ bool error=false;
+ for(int i=1; i<argc; i++){
+ char*a =argv[i];
+ char* o=strtok(a, "=");
+ char*v=strtok(NULL, "");
+
+ bool found=false;
+ for(int j=0; j<nOptions ;j++){
+ if(!strcmp(qsOptions[j].name, o)){
+ found=true; break;
+ }
+ }
+ if(!found){
+ std::cerr<< "Unknown option:"<< o <<". Ignoring" << std::endl;
+ continue;
+ }
+
+ if(v==NULL){
+ std::cerr<< ""<< qsOptions[i].name << " [" <<qsOptions[i].desc <<"] " << "requires a parameter." << std::endl;
+ error=true;
+ }
+ qsOptionValues[o]=v;
+ }
+
+ for(int j=0; j<nOptions ;j++){
+ if(qsOptions[j].required ){
+ if(qsOptionValues.find(qsOptions[j].name) == qsOptionValues.end()){
+ std::cerr<< ""<< qsOptions[j].name << " [" <<qsOptions[j].desc <<"] " << "is required." << std::endl;
+ error=true;
+ }
+ }
+ }
+ if(error){
+ printUsage();
+ exit(1);
+ }
+ return 0;
+}
+
+void parseUrl(std::string& url, std::string& protocol, std::string& host, std::string& port){
+ char u[1024];
+ strcpy(u,url.c_str());
+ char* z=strtok(u, "=");
+ char* h=strtok(NULL, ":");
+ char* p=strtok(NULL, ":");
+ protocol=z; host=h; port=p;
+}
+
+std::vector<std::string> &splitString(const std::string& s, char delim, std::vector<std::string>& elems){
+ std::stringstream ss(s);
+ std::string item;
+ while (std::getline(ss, item, delim)){
+ elems.push_back(item);
+ }
+ return elems;
+}
+
+int readPlans(const std::string& planList, std::vector<std::string>& plans){
+ std::vector<std::string> planFiles;
+ std::vector<std::string>::iterator iter;
+ splitString(planList, ';', planFiles);
+ for(iter = planFiles.begin(); iter != planFiles.end(); iter++) {
+ std::ifstream f((*iter).c_str());
+ std::string plan((std::istreambuf_iterator<char>(f)), (std::istreambuf_iterator<char>()));
+ std::cout << "plan:" << plan << std::endl;
+ plans.push_back(plan);
+ }
+ return 0;
+}
+
+int readQueries(const std::string& queryList, std::vector<std::string>& queries){
+ splitString(queryList, ';', queries);
+ return 0;
+}
+
+bool validate(const std::string& type, const std::string& query, const std::string& plan){
+ if(query.empty() && plan.empty()){
+ std::cerr<< "Either query or plan must be specified"<<std::endl;
+ return false; }
+ if(type=="physical" || type == "logical" ){
+ if(plan.empty()){
+ std::cerr<< "A logical or physical plan must be specified"<<std::endl;
+ return false;
+ }
+ }else
+ if(type=="sql"){
+ if(query.empty()){
+ std::cerr<< "A drill SQL query must be specified"<<std::endl;
+ return false;
+ }
+ }else{
+ std::cerr<< "Unknown query type: "<< type << std::endl;
+ return false;
+ }
+ return true;
+}
+
+int main(int argc, char* argv[]) {
+ try {
+
+ parseArgs(argc, argv);
+
+ std::vector<std::string*> queries;
+
+ std::string connectStr=qsOptionValues["connectStr"];
+ std::string queryList=qsOptionValues["query"];
+ std::string planList=qsOptionValues["plan"];
+ std::string api=qsOptionValues["api"];
+ std::string type_str=qsOptionValues["type"];
+
+ exec::user::QueryType type;
+
+ if(!validate(type_str, queryList, planList)){
+ exit(1);
+ }
+
+ std::vector<std::string> queryInputs;
+ if(type_str=="sql" ){
+ readQueries(queryList, queryInputs);
+ type=exec::user::SQL;
+ }else if(type_str=="physical" ){
+ readPlans(planList, queryInputs);
+ type=exec::user::PHYSICAL;
+ }else if(type_str == "logical"){
+ readPlans(planList, queryInputs);
+ type=exec::user::LOGICAL;
+ }else{
+ readQueries(queryList, queryInputs);
+ type=exec::user::SQL;
+ }
+
+ std::vector<std::string>::iterator queryInpIter;
+
+ std::vector<Drill::RecordIterator*> recordIterators;
+ std::vector<Drill::RecordIterator*>::iterator recordIterIter;
+
+ std::vector<Drill::QueryHandle_t*> queryHandles;
+ std::vector<Drill::QueryHandle_t*>::iterator queryHandleIter;
+
+ Drill::DrillClient client;
+ // To log to file
+ //DrillClient::initLogging("/var/log/drill/", LOG_INFO);
+ // To log to stderr
+ Drill::DrillClient::initLogging(NULL, Drill::LOG_INFO);
+
+ if(client.connect(connectStr.c_str())!=Drill::CONN_SUCCESS){
+ std::cerr<< "Failed to connect with error: "<< client.getError() << " (Using:"<<connectStr<<")"<<std::endl;
+ return -1;
+ }
+ std::cout<< "Connected!\n" << std::endl;
+
+ if(api=="sync"){
+ Drill::DrillClientError* err=NULL;
+ Drill::status_t ret;
+ for(queryInpIter = queryInputs.begin(); queryInpIter != queryInputs.end(); queryInpIter++) {
+ Drill::RecordIterator* pRecIter = client.submitQuery(type, *queryInpIter, err);
+ if(pRecIter!=NULL){
+ recordIterators.push_back(pRecIter);
+ }
+ }
+ size_t row=0;
+ for(recordIterIter = recordIterators.begin(); recordIterIter != recordIterators.end(); recordIterIter++) {
+ // get fields.
+ row=0;
+ Drill::RecordIterator* pRecIter=*recordIterIter;
+ std::vector<Drill::FieldMetadata*>& fields = pRecIter->getColDefs();
+ while((ret=pRecIter->next())==Drill::QRY_SUCCESS){
+ row++;
+ if(row%4095==0){
+ for(size_t i=0; i<fields.size(); i++){
+ std::string name= fields[i]->getName();
+ printf("%s\t", name.c_str());
+ }
+ printf("\n");
+ }
+ printf("ROW: %ld\t", row);
+ for(size_t i=0; i<fields.size(); i++){
+ void* pBuf; size_t sz;
+ pRecIter->getCol(i, &pBuf, &sz);
+ print(fields[i], pBuf, sz);
+ }
+ printf("\n");
+ }
+ if(ret!=Drill::QRY_NO_MORE_DATA){
+ std::cerr<< pRecIter->getError();
+ }
+ client.freeQueryIterator(&pRecIter);
+ }
+ }else{
+ for(queryInpIter = queryInputs.begin(); queryInpIter != queryInputs.end(); queryInpIter++) {
+ Drill::QueryHandle_t* qryHandle = new Drill::QueryHandle_t;
+ client.submitQuery(type, *queryInpIter, QueryResultsListener, NULL, qryHandle);
+ queryHandles.push_back(qryHandle);
+ }
+ client.waitForResults();
+ for(queryHandleIter = queryHandles.begin(); queryHandleIter != queryHandles.end(); queryHandleIter++) {
+ client.freeQueryResources(*queryHandleIter);
+ }
+ }
+ client.close();
+ } catch (std::exception& e) {
+ std::cerr << e.what() << std::endl;
+ }
+
+ return 0;
+}
diff --git a/contrib/native/client/resources/parquet_scan_union_screen_physical.json b/contrib/native/client/resources/parquet_scan_union_screen_physical.json
new file mode 100644
index 000000000..e677b156e
--- /dev/null
+++ b/contrib/native/client/resources/parquet_scan_union_screen_physical.json
@@ -0,0 +1,40 @@
+{
+ head:
+ {
+ type: "APACHE_DRILL_PHYSICAL",
+ version: 1,
+ generator:
+ {
+ type: "manual"
+ }
+ },
+ graph:
+ [
+ {
+ @id: 1,
+ pop: "parquet-scan",
+ entries:
+ [
+ {
+ path: "./sample-data/region.parquet"
+ }
+ ],
+ storageengine:
+ {
+ "type": "parquet",
+ "dfsName": "file:///"
+ }
+ },
+ {
+ @id: 2,
+ child: 1,
+ pop: "union-exchange"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
+
diff --git a/contrib/native/client/resources/simple_plan.json b/contrib/native/client/resources/simple_plan.json
new file mode 100644
index 000000000..ad3cdc739
--- /dev/null
+++ b/contrib/native/client/resources/simple_plan.json
@@ -0,0 +1,94 @@
+{
+ head:{
+ type:"APACHE_DRILL_LOGICAL",
+ version:"1",
+ generator:{
+ type:"manual",
+ info:"na"
+ }
+ },
+ storage:{
+ console: {type: "console"},
+ fs1: {type: "fs", root:"file:///"},
+ cp: {type: "classpath"}
+ },
+ query:[
+
+ {
+ @id:"1",
+ op: "scan",
+ memo: "initial_scan",
+ ref: "donuts",
+ storageengine: "cp",
+ selection: {
+ path: "/donuts.json",
+ type: "JSON"
+ }
+ },
+ {
+ @id:"2",
+ input:"1",
+ op: "transform",
+ transforms: [
+ { ref: "quantity", expr: "donuts.sales"}
+ ]
+ },
+ {
+ @id:"3",
+ input:"2",
+ op: "filter",
+ expr: "donuts.ppu < 1.00"
+ },
+ {
+ @id:"4",
+ input:"3",
+ op: "segment",
+ ref: "ppusegment",
+ exprs: ["donuts.ppu"]
+ },
+ {
+ @id:"5",
+ input:"4",
+ op: "collapsingaggregate",
+ within: "ppusegment",
+ carryovers: ["donuts.ppu"],
+ aggregations: [
+ { ref: "donuts.typeCount", expr: "count(1)" },
+ { ref: "donuts.quantity", expr: "sum(quantity)" },
+ { ref: "donuts.sales", expr: "sum(donuts.ppu * quantity)" }
+ ]
+ },
+ {
+ @id:"6",
+ input:"5",
+ op: "order",
+ orderings: [
+ {order: "DESC", expr: "donuts.ppu" }
+ ]
+ },
+ {
+ @id:"7",
+ input:"6",
+ op: "project",
+ projections: [
+ { ref: "output.output", expr: "donuts" }
+ ]
+ },
+ {
+ @id:"8",
+ input:"7",
+ op: "limit",
+ first: 0,
+ last: 100
+ },
+ {
+ @id:"9",
+ input:"8",
+ op: "store",
+ memo: "output sink",
+ storageengine: "console",
+ target: {pipe: "STD_OUT"}
+ }
+ ]
+}
+
diff --git a/contrib/native/client/resources/testTypes.json b/contrib/native/client/resources/testTypes.json
new file mode 100644
index 000000000..910b96615
--- /dev/null
+++ b/contrib/native/client/resources/testTypes.json
@@ -0,0 +1,30 @@
+{
+ "first": "Jimmy",
+ "last": "James",
+ "age": 29,
+ "sex": "M",
+ "salary": 6300.10,
+ "join_date": "2011-11-30",
+ "join_time": "09:11:10",
+ "days_worked": "P10DT1H2M3S",
+ "years_worked": "P1Y11M"
+}
+{
+ "first": "anderson",
+ "last": "carr",
+ "sex": "M",
+ "salary": 6300.10,
+ "registered": false
+}
+{
+ "first": "John",
+ "last": "James",
+ "age": 29,
+ "sex": "M",
+ "salary": 6300.10,
+ "registered": true,
+ "join_date": "2009-12-30",
+ "join_time": "8:59:32.000",
+ "days_worked": "P1DT1H2M3.46S",
+ "years_worked": "P1Y2M"
+}
diff --git a/contrib/native/client/scripts/cpProtofiles.sh b/contrib/native/client/scripts/cpProtofiles.sh
new file mode 100755
index 000000000..4b0df36e1
--- /dev/null
+++ b/contrib/native/client/scripts/cpProtofiles.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SRCDIR=$1 #../build/src/protobuf
+TARGDIR=$2 #../protobuf
+INCDIR=$3 #../include/drill/protobuf
+
+
+main() {
+ if [ ! -e ${TARGDIR} ]
+ then
+ echo "Creating Protobuf directory"
+ mkdir -p ${TARGDIR}
+ fi
+
+ cp -r ${SRCDIR}/*.cc ${TARGDIR}
+ cp -r ${SRCDIR}/*.h ${TARGDIR}
+
+ if [ ! -e ${INCDIR} ]
+ then
+ echo "Creating Protobuf includes directory"
+ mkdir -p ${INCDIR}
+ fi
+
+ mv ${TARGDIR}/Types.pb.h ${INCDIR}
+ mv ${TARGDIR}/User.pb.h ${INCDIR}
+
+}
+
+main
+
diff --git a/contrib/native/client/scripts/fixProtodefs.sh b/contrib/native/client/scripts/fixProtodefs.sh
new file mode 100755
index 000000000..7cb9710d2
--- /dev/null
+++ b/contrib/native/client/scripts/fixProtodefs.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SRCDIR=$1 #../../../../protocol/src/main/protobuf
+TARGDIR=$2 #../build/protobuf
+FNAME=$3 #Types.proto
+
+fixFile(){
+ echo "Fixing $1"
+ pushd ${TARGDIR} >& /dev/null
+ sed -e 's/REQUIRED/DM_REQUIRED/g' -e 's/OPTIONAL/DM_OPTIONAL/g' -e 's/REPEATED/DM_REPEATED/g' -e 's/NULL/DM_UNKNOWN/g' $1 > temp1.proto
+ cp temp1.proto $1
+ rm temp1.proto
+ popd >& /dev/null
+}
+
+main() {
+ if [ ! -e ${TARGDIR} ]
+ then
+ echo "Creating Protobuf directory"
+ mkdir -p ${TARGDIR}
+ cp -r ${SRCDIR}/* ${TARGDIR}
+ fixFile ${FNAME}
+ else
+ cp -r ${SRCDIR}/* ${TARGDIR}
+
+ if [ -e ${TARGDIR}/${FNAME} ]
+ then
+ if [ ${SRCDIR}/${FNAME} -nt ${TARGDIR}/${FNAME} ]
+ then
+ fixFile ${FNAME}
+ fi
+ else
+ echo "$FNAME not found"
+ exit 1
+ fi
+ fi
+}
+
+main
+
diff --git a/contrib/native/client/src/clientlib/CMakeLists.txt b/contrib/native/client/src/clientlib/CMakeLists.txt
new file mode 100644
index 000000000..d07f9309e
--- /dev/null
+++ b/contrib/native/client/src/clientlib/CMakeLists.txt
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Drill Client library
+
+set (CLIENTLIB_SRC_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/decimalUtils.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/drillClient.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/drillClientImpl.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/recordBatch.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/rpcEncoder.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/rpcDecoder.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/errmsgs.cpp
+ )
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../include )
+include_directories(${PROTOBUF_INCLUDE_DIR})
+include_directories(${Zookeeper_INCLUDE_DIRS})
+
+link_directories(/usr/local/lib)
+
+set_property(
+ DIRECTORY
+ PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG DEBUG=1 THREADED
+ )
+
+add_library(drillClient SHARED ${CLIENTLIB_SRC_FILES} )
+target_link_libraries(drillClient ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY} ${Zookeeper_LIBRARIES} protomsgs)
diff --git a/contrib/native/client/src/clientlib/decimalUtils.cpp b/contrib/native/client/src/clientlib/decimalUtils.cpp
new file mode 100644
index 000000000..39439c5b9
--- /dev/null
+++ b/contrib/native/client/src/clientlib/decimalUtils.cpp
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <vector>
+#include "drill/recordBatch.hpp"
+#include "drill/decimalUtils.hpp"
+
+#ifdef _WIN32
+#define bswap_16 _byteswap_ushort
+#define bswap_32 _byteswap_ulong
+#define bswap_64 _byteswap_uint64
+#elif defined(__linux__)
+#include <byteswap.h> //for bswap_16,32,64
+#elif defined(__APPLE__)
+#include <libkern/OSByteOrder.h>
+#define bswap_16 OSSwapInt16
+#define bswap_32 OSSwapInt32
+#define bswap_64 OSSwapInt64
+#endif
+
+using namespace boost::multiprecision;
+
+#define MAX_DIGITS 9
+#define INTEGER_SIZE sizeof(uint32_t)
+#define DIGITS_BASE 1000000000
+
+namespace Drill
+{
+
+// Code is ported from Java DecimalUtility.java implementation.
+// The big differences are that we expose a DecimalValue struct,
+// We store the unscaled value in a boost cpp_int
+// And that when we retrieve integer data off the wire, we need to do an endianness swap on.
+// We only do the endianness swap on dense types.
+// on little-endian platforms.
+
+DecimalValue getDecimalValueFromByteBuf(SlicedByteBuf& data, size_t startIndex, int nDecimalDigits, int scale, bool truncateScale)
+{
+
+ // For sparse decimal type we have padded zeroes at the end, strip them while converting to BigDecimal.
+ int32_t actualDigits;
+
+ // Indicate if we need an endianness swap (truncateScale = true for sparse types, which don't need an endianness swap).
+ bool needsEndiannessSwap = !truncateScale;
+
+ // Initialize the BigDecimal, first digit in the ByteBuf has the sign so mask it out
+ cpp_int decimalDigits = (needsEndiannessSwap ?
+ bswap_32(data.getUint32(startIndex)) & 0x7FFFFFFF :
+ (data.getUint32(startIndex) & 0x7FFFFFFF));
+
+ cpp_int base(DIGITS_BASE);
+
+ for (int i = 1; i < nDecimalDigits; i++) {
+
+ // Note: we need to byteswap when we retrieve integers off the wire since they are
+ // stored in big-endian format.
+ cpp_int temp = (needsEndiannessSwap ?
+ bswap_32(data.getUint32(startIndex + (i * INTEGER_SIZE))) :
+ (data.getUint32(startIndex + (i * INTEGER_SIZE))));
+
+ decimalDigits *= base;
+ decimalDigits += temp;
+ }
+
+ // Truncate any additional padding we might have added
+ if (truncateScale && scale > 0 && (actualDigits = scale % MAX_DIGITS) != 0) {
+ cpp_int truncate = (int32_t) std::pow(10.0, (MAX_DIGITS - actualDigits));
+ decimalDigits /= truncate;
+ }
+
+ DecimalValue val;
+ val.m_unscaledValue = decimalDigits;
+
+ // set the sign
+ if (data.getUint32((startIndex) & 0x80000000) != 0)
+ {
+ val.m_unscaledValue *= -1;
+ }
+
+ val.m_scale = scale;
+ return val;
+}
+
+DecimalValue getDecimalValueFromDense(SlicedByteBuf& data, size_t startIndex, int nDecimalDigits, int scale, int maxPrecision, int width)
+{
+ /* This method converts the dense representation to
+ * an intermediate representation. The intermediate
+ * representation has one more integer than the dense
+ * representation.
+ */
+ std::vector<uint8_t> intermediateBytes((nDecimalDigits + 1) * INTEGER_SIZE, 0);
+
+ int32_t intermediateIndex = 3;
+
+ int32_t mask[] = {0x03, 0x0F, 0x3F, 0xFF};
+ int32_t reverseMask[] = {0xFC, 0xF0, 0xC0, 0x00};
+
+ int32_t maskIndex;
+ int32_t shiftOrder;
+ uint8_t shiftBits;
+
+ // TODO: Some of the logic here is common with casting from Dense to Sparse types, factor out common code
+ if (maxPrecision == 38) {
+ maskIndex = 0;
+ shiftOrder = 6;
+ shiftBits = 0x00;
+ intermediateBytes[intermediateIndex++] = (uint8_t) (data.getByte(startIndex) & 0x7F);
+ } else if (maxPrecision == 28) {
+ maskIndex = 1;
+ shiftOrder = 4;
+ shiftBits = (uint8_t) ((data.getByte(startIndex) & 0x03) << shiftOrder);
+ intermediateBytes[intermediateIndex++] = (uint8_t) (((data.getByte(startIndex) & 0x3C) & 0xFF) >> 2);
+ } else {
+ assert("Dense types with max precision 38 and 28 are only supported");
+ }
+
+ int32_t inputIndex = 1;
+ bool sign = false;
+
+ if ((data.getByte(startIndex) & 0x80) != 0) {
+ sign = true;
+ }
+
+ while (inputIndex < width) {
+
+ intermediateBytes[intermediateIndex] = (uint8_t) ((shiftBits) | (((data.getByte(startIndex + inputIndex) & reverseMask[maskIndex]) & 0xFF) >> (8 - shiftOrder)));
+
+ shiftBits = (uint8_t) ((data.getByte(startIndex + inputIndex) & mask[maskIndex]) << shiftOrder);
+
+ inputIndex++;
+ intermediateIndex++;
+
+ if (((inputIndex - 1) % INTEGER_SIZE) == 0) {
+ shiftBits = (uint8_t) ((shiftBits & 0xFF) >> 2);
+ maskIndex++;
+ shiftOrder -= 2;
+ }
+
+ }
+ /* copy the last byte */
+ intermediateBytes[intermediateIndex] = shiftBits;
+
+ if (sign) {
+ intermediateBytes[0] = (uint8_t) (intermediateBytes[0] | 0x80);
+ }
+
+ SlicedByteBuf intermediateData(&intermediateBytes[0], 0, intermediateBytes.size());
+ return getDecimalValueFromIntermediate(intermediateData, 0, nDecimalDigits + 1, scale);
+}
+
+}
+
diff --git a/contrib/native/client/src/clientlib/drillClient.cpp b/contrib/native/client/src/clientlib/drillClient.cpp
new file mode 100644
index 000000000..9a9b919ce
--- /dev/null
+++ b/contrib/native/client/src/clientlib/drillClient.cpp
@@ -0,0 +1,288 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <boost/format.hpp>
+#include <boost/log/expressions.hpp>
+#include <boost/log/sinks/text_file_backend.hpp>
+#include <boost/log/utility/setup/file.hpp>
+#include <boost/log/utility/setup/common_attributes.hpp>
+#include <boost/log/sources/severity_logger.hpp>
+
+#include "drill/drillClient.hpp"
+#include "drill/recordBatch.hpp"
+#include "drillClientImpl.hpp"
+#include "errmsgs.hpp"
+
+#include "Types.pb.h"
+
+namespace Drill{
+
+DrillClientError* DrillClientError::getErrorObject(const exec::shared::DrillPBError& e){
+ std::string s=Drill::getMessage(ERR_QRY_FAILURE, e.message().c_str());
+ DrillClientError* err=NULL;
+ err=new DrillClientError(QRY_FAILURE, QRY_ERROR_START+QRY_FAILURE, s);
+ return err;
+}
+
+DrillClientInitializer::DrillClientInitializer(){
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+}
+
+DrillClientInitializer::~DrillClientInitializer(){
+ google::protobuf::ShutdownProtobufLibrary();
+}
+
+logLevel_t DrillClientConfig::s_logLevel=LOG_ERROR;
+uint64_t DrillClientConfig::s_bufferLimit=-1;
+boost::mutex DrillClientConfig::s_mutex;
+
+DrillClientConfig::DrillClientConfig(){
+ initLogging(NULL);
+}
+
+void DrillClientConfig::initLogging(const char* path){
+ if(path!=NULL){
+ std::string f=std::string(path)+"drill_clientlib_%N.log";
+ try{
+ boost::log::add_file_log
+ (
+ boost::log::keywords::file_name = f.c_str(),
+ boost::log::keywords::rotation_size = 10 * 1024 * 1024,
+ boost::log::keywords::time_based_rotation =
+ boost::log::sinks::file::rotation_at_time_point(0, 0, 0),
+ boost::log::keywords::format = "[%TimeStamp%]: %Message%"
+ );
+ }catch(std::exception& e){
+ // do nothing. Logging will happen to stderr
+ BOOST_LOG_TRIVIAL(error) << "Logging could not be initialized. Logging to stderr." ;
+ }
+ }
+ boost::log::add_common_attributes();
+ boost::log::core::get()->set_filter(boost::log::trivial::severity >= s_logLevel);
+}
+
+void DrillClientConfig::setLogLevel(logLevel_t l){
+ boost::lock_guard<boost::mutex> bufferLock(DrillClientConfig::s_mutex);
+ s_logLevel=l;
+ boost::log::core::get()->set_filter(boost::log::trivial::severity >= s_logLevel);
+}
+
+void DrillClientConfig::setBufferLimit(uint64_t l){
+ boost::lock_guard<boost::mutex> bufferLock(DrillClientConfig::s_mutex);
+ s_bufferLimit=l;
+}
+
+uint64_t DrillClientConfig::getBufferLimit(){
+ boost::lock_guard<boost::mutex> bufferLock(DrillClientConfig::s_mutex);
+ return s_bufferLimit;
+}
+
+logLevel_t DrillClientConfig::getLogLevel(){
+ boost::lock_guard<boost::mutex> bufferLock(DrillClientConfig::s_mutex);
+ return s_logLevel;
+}
+
+RecordIterator::~RecordIterator(){
+ if(m_pColDefs!=NULL){
+ for(std::vector<Drill::FieldMetadata*>::iterator it=m_pColDefs->begin();
+ it!=m_pColDefs->end();
+ ++it){
+ delete *it;
+ }
+ }
+ delete this->m_pColDefs;
+ this->m_pColDefs=NULL;
+ delete this->m_pQueryResult;
+ this->m_pQueryResult=NULL;
+}
+
+std::vector<Drill::FieldMetadata*>& RecordIterator::getColDefs(){
+ if(m_pQueryResult->hasError()){
+ return DrillClientQueryResult::s_emptyColDefs;
+ }
+ //NOTE: if query is cancelled, return whatever you have. Client applications job to deal with it.
+ if(this->m_pColDefs==NULL){
+ if(this->m_pCurrentRecordBatch==NULL){
+ this->m_pQueryResult->waitForData();
+ if(m_pQueryResult->hasError()){
+ return DrillClientQueryResult::s_emptyColDefs;
+ }
+ }
+ std::vector<Drill::FieldMetadata*>* pColDefs = new std::vector<Drill::FieldMetadata*>;
+ { //lock after we come out of the wait.
+ boost::lock_guard<boost::mutex> bufferLock(this->m_recordBatchMutex);
+ std::vector<Drill::FieldMetadata*>& currentColDefs=DrillClientQueryResult::s_emptyColDefs;
+ if(this->m_pCurrentRecordBatch!=NULL){
+ currentColDefs=this->m_pCurrentRecordBatch->getColumnDefs();
+ }else{
+ // This is reached only when the first results have been received but
+ // the getNext call has not been made to retrieve the record batch
+ RecordBatch* pR=this->m_pQueryResult->peekNext();
+ if(pR!=NULL){
+ currentColDefs=pR->getColumnDefs();
+ }
+ }
+ for(std::vector<Drill::FieldMetadata*>::iterator it=currentColDefs.begin(); it!=currentColDefs.end(); ++it){
+ Drill::FieldMetadata* fmd= new Drill::FieldMetadata;
+ fmd->copy(*(*it));//Yup, that's 2 stars
+ pColDefs->push_back(fmd);
+ }
+ }
+ this->m_pColDefs = pColDefs;
+ }
+ return *this->m_pColDefs;
+}
+
+status_t RecordIterator::next(){
+ status_t ret=QRY_SUCCESS;
+ this->m_pQueryResult->waitForData();
+ if(m_pQueryResult->hasError()){
+ return m_pQueryResult->getErrorStatus();
+ }
+ this->m_currentRecord++;
+
+ if(!this->m_pQueryResult->isCancelled()){
+ if(this->m_pCurrentRecordBatch==NULL || this->m_currentRecord==this->m_pCurrentRecordBatch->getNumRecords()){
+ boost::lock_guard<boost::mutex> bufferLock(this->m_recordBatchMutex);
+ delete this->m_pCurrentRecordBatch; //free the previous record batch
+ this->m_currentRecord=0;
+ this->m_pCurrentRecordBatch=this->m_pQueryResult->getNext();
+ BOOST_LOG_TRIVIAL(trace) << "Fetched new Record batch " ;
+ if(this->m_pCurrentRecordBatch==NULL || this->m_pCurrentRecordBatch->getNumRecords()==0){
+ BOOST_LOG_TRIVIAL(trace) << "No more data." ;
+ ret = QRY_NO_MORE_DATA;
+ }else if(this->m_pCurrentRecordBatch->hasSchemaChanged()){
+ ret=QRY_SUCCESS_WITH_INFO;
+ }
+ }
+ }else{
+ ret=QRY_CANCEL;
+ }
+ return ret;
+}
+
+/* Gets the ith column in the current record. */
+status_t RecordIterator::getCol(size_t i, void** b, size_t* sz){
+ //TODO: check fields out of bounds without calling getColDefs
+ //if(i>=getColDefs().size()) return QRY_OUT_OF_BOUNDS;
+ //return raw byte buffer
+ if(!this->m_pQueryResult->isCancelled()){
+ const ValueVectorBase* pVector=this->m_pCurrentRecordBatch->getFields()[i]->getVector();
+ if(!pVector->isNull(this->m_currentRecord)){
+ *b=pVector->getRaw(this->m_currentRecord);
+ *sz=pVector->getSize(this->m_currentRecord);
+ }else{
+ *b=NULL;
+ *sz=0;
+
+ }
+ return QRY_SUCCESS;
+ }else{
+ return QRY_CANCEL;
+ }
+}
+
+/* true if ith column in the current record is NULL. */
+bool RecordIterator::isNull(size_t i){
+ if(!this->m_pQueryResult->isCancelled()){
+ const ValueVectorBase* pVector=this->m_pCurrentRecordBatch->getFields()[i]->getVector();
+ return pVector->isNull(this->m_currentRecord);
+ }else{
+ return false;
+ }
+}
+
+status_t RecordIterator::cancel(){
+ this->m_pQueryResult->cancel();
+ return QRY_CANCEL;
+}
+
+void RecordIterator::registerSchemaChangeListener(pfnSchemaListener* l){
+ //TODO:
+}
+
+std::string& RecordIterator::getError(){
+ return m_pQueryResult->getError()->msg;
+}
+
+DrillClientInitializer DrillClient::s_init;
+
+DrillClientConfig DrillClient::s_config;
+
+void DrillClient::initLogging(const char* path, logLevel_t l){
+ if(path!=NULL) s_config.initLogging(path);
+ s_config.setLogLevel(l);
+}
+
+DrillClient::DrillClient(){
+ this->m_pImpl=new DrillClientImpl;
+}
+
+DrillClient::~DrillClient(){
+ delete this->m_pImpl;
+}
+
+connectionStatus_t DrillClient::connect(const char* connectStr ){
+ connectionStatus_t ret=CONN_SUCCESS;
+ ret=this->m_pImpl->connect(connectStr);
+
+ if(ret==CONN_SUCCESS)
+ ret=this->m_pImpl->ValidateHandShake()?CONN_SUCCESS:CONN_HANDSHAKE_FAILED;
+ return ret;
+
+}
+
+bool DrillClient::isActive(){
+ return this->m_pImpl->Active();
+}
+
+void DrillClient::close() {
+ this->m_pImpl->Close();
+}
+
+status_t DrillClient::submitQuery(exec::user::QueryType t, const std::string& plan, pfnQueryResultsListener listener, void* listenerCtx, QueryHandle_t* qHandle){
+ DrillClientQueryResult* pResult=this->m_pImpl->SubmitQuery(t, plan, listener, listenerCtx);
+ *qHandle=(QueryHandle_t)pResult;
+ return QRY_SUCCESS;
+}
+
+RecordIterator* DrillClient::submitQuery(exec::user::QueryType t, const std::string& plan, DrillClientError* err){
+ RecordIterator* pIter=NULL;
+ DrillClientQueryResult* pResult=this->m_pImpl->SubmitQuery(t, plan, NULL, NULL);
+ if(pResult){
+ pIter=new RecordIterator(pResult);
+ }
+ return pIter;
+}
+
+std::string& DrillClient::getError(){
+ return m_pImpl->getError()->msg;
+}
+
+
+void DrillClient::waitForResults(){
+ this->m_pImpl->waitForResults();
+}
+
+void DrillClient::freeQueryResources(QueryHandle_t* handle){
+ delete (DrillClientQueryResult*)(*handle);
+ *handle=NULL;
+}
+
+} // namespace Drill
diff --git a/contrib/native/client/src/clientlib/drillClientImpl.cpp b/contrib/native/client/src/clientlib/drillClientImpl.cpp
new file mode 100644
index 000000000..14b4f7dcf
--- /dev/null
+++ b/contrib/native/client/src/clientlib/drillClientImpl.cpp
@@ -0,0 +1,857 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <queue>
+#include <string.h>
+#include <boost/asio.hpp>
+#include <boost/bind.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/thread.hpp>
+#include <boost/log/trivial.hpp>
+#include <zookeeper/zookeeper.h>
+
+#include "drill/drillClient.hpp"
+#include "drill/recordBatch.hpp"
+#include "drillClientImpl.hpp"
+#include "errmsgs.hpp"
+#include "rpcEncoder.hpp"
+#include "rpcDecoder.hpp"
+#include "rpcMessage.hpp"
+
+#include "GeneralRPC.pb.h"
+#include "UserBitShared.pb.h"
+
+#ifdef DEBUG
+#define BOOST_ASIO_ENABLE_HANDLER_TRACKING
+#endif
+
+
+namespace Drill{
+
+RpcEncoder DrillClientImpl::s_encoder;
+RpcDecoder DrillClientImpl::s_decoder;
+
+std::string debugPrintQid(const exec::shared::QueryId& qid){
+ return std::string("[")+boost::lexical_cast<std::string>(qid.part1()) +std::string(":") + boost::lexical_cast<std::string>(qid.part2())+std::string("] ");
+}
+
+void DrillClientImpl::parseConnectStr(const char* connectStr, std::string& protocol, std::string& hostPortStr){
+ char u[1024];
+ strcpy(u,connectStr);
+ char* z=strtok(u, "=");
+ char* c=strtok(NULL, "");
+ protocol=z; hostPortStr=c;
+}
+
+connectionStatus_t DrillClientImpl::connect(const char* connStr){
+ std::string protocol, hostPortStr;
+ std::string host;
+ std::string port;
+ if(!this->m_bIsConnected){
+ parseConnectStr(connStr, protocol, hostPortStr);
+ if(!strcmp(protocol.c_str(), "jdbc:drill:zk")){
+ ZookeeperImpl zook;
+ if(zook.connectToZookeeper(hostPortStr.c_str())!=0){
+ return handleConnError(CONN_ZOOKEEPER_ERROR, getMessage(ERR_CONN_ZOOKEEPER, zook.getError().c_str()));
+ }
+ zook.debugPrint();
+ exec::DrillbitEndpoint e=zook.getEndPoint();
+ host=boost::lexical_cast<std::string>(e.address());
+ port=boost::lexical_cast<std::string>(e.user_port());
+ zook.close();
+ }else if(!strcmp(protocol.c_str(), "jdbc:drill:local")){
+ char tempStr[1024];
+ strcpy(tempStr, hostPortStr.c_str());
+ host=strtok(tempStr, ":");
+ port=strtok(NULL, "");
+ }else{
+ return handleConnError(CONN_INVALID_INPUT, getMessage(ERR_CONN_UNKPROTO, protocol.c_str()));
+ }
+ return this->connect(host.c_str(), port.c_str());
+ }
+ return CONN_SUCCESS;
+}
+
+connectionStatus_t DrillClientImpl::connect(const char* host, const char* port){
+ using boost::asio::ip::tcp;
+ tcp::endpoint endpoint;
+ try{
+ tcp::resolver resolver(m_io_service);
+ tcp::resolver::query query(tcp::v4(), host, port);
+ tcp::resolver::iterator iter = resolver.resolve(query);
+ tcp::resolver::iterator end;
+ while (iter != end){
+ endpoint = *iter++;
+ BOOST_LOG_TRIVIAL(trace) << endpoint << std::endl;
+ }
+ boost::system::error_code ec;
+ m_socket.connect(endpoint, ec);
+ if(ec){
+ return handleConnError(CONN_FAILURE, getMessage(ERR_CONN_FAILURE, host, port, ec.message().c_str()));
+ }
+
+ }catch(std::exception e){
+ return handleConnError(CONN_FAILURE, getMessage(ERR_CONN_EXCEPT, e.what()));
+ }
+ return CONN_SUCCESS;
+}
+
+void DrillClientImpl::sendSync(OutBoundRpcMessage& msg){
+ DrillClientImpl::s_encoder.Encode(m_wbuf, msg);
+ m_socket.write_some(boost::asio::buffer(m_wbuf));
+}
+
+void DrillClientImpl::recvSync(InBoundRpcMessage& msg){
+ m_socket.read_some(boost::asio::buffer(m_rbuf));
+ uint32_t length = 0;
+ int bytes_read = DrillClientImpl::s_decoder.LengthDecode(m_rbuf.data(), &length);
+ DrillClientImpl::s_decoder.Decode(m_rbuf.data() + bytes_read, length, msg);
+}
+
+bool DrillClientImpl::ValidateHandShake(){
+ exec::user::UserToBitHandshake u2b;
+ exec::user::BitToUserHandshake b2u;
+
+ u2b.set_channel(exec::shared::USER);
+ u2b.set_rpc_version(1);
+ u2b.set_support_listening(true);
+
+ {
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ uint64_t coordId = this->getNextCoordinationId();
+
+ OutBoundRpcMessage out_msg(exec::rpc::REQUEST, exec::user::HANDSHAKE, coordId, &u2b);
+ sendSync(out_msg);
+
+ InBoundRpcMessage in_msg;
+ recvSync(in_msg);
+
+ b2u.ParseFromArray(in_msg.m_pbody.data(), in_msg.m_pbody.size());
+ }
+
+ // validate handshake
+ if (b2u.rpc_version() != u2b.rpc_version()) {
+ BOOST_LOG_TRIVIAL(trace) << "Invalid rpc version. Expected << "
+ << u2b.rpc_version() << ", actual "<< b2u.rpc_version() << "." ;
+ handleConnError(CONN_HANDSHAKE_FAILED,
+ getMessage(ERR_CONN_NOHSHAKE, u2b.rpc_version(), b2u.rpc_version()));
+ return false;
+ }
+ return true;
+}
+
+
+std::vector<Drill::FieldMetadata*> DrillClientQueryResult::s_emptyColDefs;
+
+DrillClientQueryResult* DrillClientImpl::SubmitQuery(exec::user::QueryType t,
+ const std::string& plan,
+ pfnQueryResultsListener l,
+ void* lCtx){
+ exec::user::RunQuery query;
+ query.set_results_mode(exec::user::STREAM_FULL);
+ query.set_type(t);
+ query.set_plan(plan);
+
+ uint64_t coordId;
+ DrillClientQueryResult* pQuery=NULL;
+ {
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ coordId = this->getNextCoordinationId();
+ OutBoundRpcMessage out_msg(exec::rpc::REQUEST, exec::user::RUN_QUERY, coordId, &query);
+ sendSync(out_msg);
+
+ pQuery = new DrillClientQueryResult(this, coordId);
+ pQuery->registerListener(l, lCtx);
+ bool sendRequest=false;
+ this->m_queryIds[coordId]=pQuery;
+
+ BOOST_LOG_TRIVIAL(debug) << "Submit Query Request. Coordination id = " << coordId;
+
+ if(m_pendingRequests++==0){
+ sendRequest=true;
+ }else{
+ BOOST_LOG_TRIVIAL(debug) << "Queueing read request to server" << std::endl;
+ BOOST_LOG_TRIVIAL(debug) << "Number of pending requests = " << m_pendingRequests << std::endl;
+ }
+ if(sendRequest){
+ BOOST_LOG_TRIVIAL(debug) << "Sending read request. Number of pending requests = "
+ << m_pendingRequests << std::endl;
+ getNextResult(); // async wait for results
+ }
+ }
+
+ //run this in a new thread
+ {
+ if(this->m_pListenerThread==NULL){
+ BOOST_LOG_TRIVIAL(debug) << "Starting listener thread." << std::endl;
+ this->m_pListenerThread= new boost::thread(boost::bind(&boost::asio::io_service::run,
+ &this->m_io_service));
+ }
+ }
+ return pQuery;
+}
+
+void DrillClientImpl::getNextResult(){
+
+ // This call is always made from within a function where the mutex has already been acquired
+ //boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+
+ //use free, not delete to free
+ ByteBuf_t readBuf = allocateBuffer(LEN_PREFIX_BUFLEN);
+ async_read(
+ this->m_socket,
+ boost::asio::buffer(readBuf, LEN_PREFIX_BUFLEN),
+ boost::bind(
+ &DrillClientImpl::handleRead,
+ this,
+ readBuf,
+ boost::asio::placeholders::error,
+ boost::asio::placeholders::bytes_transferred)
+ );
+ BOOST_LOG_TRIVIAL(debug) << "Sent read request to server" << std::endl;
+}
+
+void DrillClientImpl::waitForResults(){
+ this->m_pListenerThread->join();
+ BOOST_LOG_TRIVIAL(debug) << "Listener thread exited." << std::endl;
+ delete this->m_pListenerThread; this->m_pListenerThread=NULL;
+}
+
+status_t DrillClientImpl::readMsg(ByteBuf_t _buf, InBoundRpcMessage& msg, boost::system::error_code& error){
+ size_t leftover=0;
+ uint32_t rmsgLen;
+ ByteBuf_t currentBuffer;
+ {
+ // We need to protect the readLength and read buffer, and the pending requests counter,
+ // but we don't have to keep the lock while we decode the rest of the buffer.
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ int bytes_read = DrillClientImpl::s_decoder.LengthDecode(_buf, &rmsgLen);
+ BOOST_LOG_TRIVIAL(trace) << "len bytes = " << bytes_read << std::endl;
+ BOOST_LOG_TRIVIAL(trace) << "rmsgLen = " << rmsgLen << std::endl;
+
+ if(rmsgLen>0){
+ leftover = LEN_PREFIX_BUFLEN - bytes_read;
+ // Allocate a buffer
+ BOOST_LOG_TRIVIAL(trace) << "Allocated and locked buffer." << std::endl;
+ currentBuffer=allocateBuffer(rmsgLen);
+ if(currentBuffer==NULL){
+ return handleQryError(QRY_CLIENT_OUTOFMEM, getMessage(ERR_QRY_OUTOFMEM), NULL);
+ }
+ if(leftover){
+ memcpy(currentBuffer, _buf + bytes_read, leftover);
+ }
+ freeBuffer(_buf);
+ BOOST_LOG_TRIVIAL(trace) << "reading data (rmsgLen - leftover) : "
+ << (rmsgLen - leftover) << std::endl;
+ ByteBuf_t b=currentBuffer + leftover;
+ size_t bytesToRead=rmsgLen - leftover;
+ while(1){
+ size_t dataBytesRead=this->m_socket.read_some(
+ boost::asio::buffer(b, bytesToRead),
+ error);
+ if(error) break;
+ BOOST_LOG_TRIVIAL(trace) << "Data Message: actual bytes read = " << dataBytesRead << std::endl;
+ if(dataBytesRead==bytesToRead) break;
+ bytesToRead-=dataBytesRead;
+ b+=dataBytesRead;
+ }
+ if(!error){
+ // read data successfully
+ DrillClientImpl::s_decoder.Decode(currentBuffer, rmsgLen, msg);
+ BOOST_LOG_TRIVIAL(trace) << "Done decoding chunk. Coordination id: " <<msg.m_coord_id<< std::endl;
+ }else{
+ return handleQryError(QRY_COMM_ERROR,
+ getMessage(ERR_QRY_COMMERR, error.message().c_str()), NULL);
+ }
+ }else{
+ // got a message with an invalid read length.
+ return handleQryError(QRY_INTERNAL_ERROR, getMessage(ERR_QRY_INVREADLEN), NULL);
+ }
+ }
+ return QRY_SUCCESS;
+}
+
+status_t DrillClientImpl::processQueryResult(InBoundRpcMessage& msg ){
+ DrillClientQueryResult* pDrillClientQueryResult=NULL;
+ status_t ret=QRY_SUCCESS;
+ {
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ exec::user::QueryResult* qr = new exec::user::QueryResult; //Record Batch will own this object and free it up.
+
+ BOOST_LOG_TRIVIAL(debug) << "Processing Query Result " << std::endl;
+ qr->ParseFromArray(msg.m_pbody.data(), msg.m_pbody.size());
+ BOOST_LOG_TRIVIAL(trace) << qr->DebugString();
+
+ BOOST_LOG_TRIVIAL(debug) << "Searching for Query Id - " << debugPrintQid(qr->query_id()) << std::endl;
+
+ exec::shared::QueryId qid;
+ qid.CopyFrom(qr->query_id());
+ std::map<exec::shared::QueryId*, DrillClientQueryResult*, compareQueryId>::iterator it;
+ it=this->m_queryResults.find(&qid);
+ if(it!=this->m_queryResults.end()){
+ pDrillClientQueryResult=(*it).second;
+ }else{
+ assert(0);
+ //assert might be compiled away in a release build. So return an error to the app.
+ status_t ret= handleQryError(QRY_INTERNAL_ERROR, getMessage(ERR_QRY_OUTOFORDER), NULL);
+ delete qr;
+ return ret;
+ }
+ BOOST_LOG_TRIVIAL(debug) << "Drill Client Query Result Query Id - " <<
+ debugPrintQid(*pDrillClientQueryResult->m_pQueryId)
+ << std::endl;
+ //Check QueryResult.queryState. QueryResult could have an error.
+ if(qr->query_state() == exec::user::QueryResult_QueryState_FAILED){
+ status_t ret=handleQryError(QRY_FAILURE, qr->error(0), pDrillClientQueryResult);
+ delete qr;
+ return ret;
+ }
+ //Validate the RPC message
+ std::string valErr;
+ if( (ret=validateMessage(msg, *qr, valErr)) != QRY_SUCCESS){
+ return handleQryError(ret, getMessage(ERR_QRY_INVRPC, valErr.c_str()), pDrillClientQueryResult);
+ }
+
+ //Build Record Batch here
+ BOOST_LOG_TRIVIAL(trace) << qr->DebugString();
+
+ RecordBatch* pRecordBatch= new RecordBatch(qr, msg.m_dbody);
+ pRecordBatch->build();
+ BOOST_LOG_TRIVIAL(debug) << debugPrintQid(qr->query_id())<<"recordBatch.numRecords "
+ << pRecordBatch->getNumRecords() << std::endl;
+ BOOST_LOG_TRIVIAL(debug) << debugPrintQid(qr->query_id())<<"recordBatch.numFields "
+ << pRecordBatch->getNumFields() << std::endl;
+ BOOST_LOG_TRIVIAL(debug) << debugPrintQid(qr->query_id())<<"recordBatch.isLastChunk "
+ << pRecordBatch->isLastChunk() << std::endl;
+
+ pDrillClientQueryResult->m_bIsQueryPending=true;
+ pDrillClientQueryResult->m_bIsLastChunk=qr->is_last_chunk();
+ pfnQueryResultsListener pResultsListener=pDrillClientQueryResult->m_pResultsListener;
+ if(pResultsListener!=NULL){
+ ret = pResultsListener(pDrillClientQueryResult, pRecordBatch, NULL);
+ }else{
+ //Use a default callback that is called when a record batch is received
+ ret = pDrillClientQueryResult->defaultQueryResultsListener(pDrillClientQueryResult,
+ pRecordBatch, NULL);
+ }
+ } // release lock
+ if(ret==QRY_FAILURE){
+ sendCancel(msg);
+ {
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ m_pendingRequests--;
+ }
+ pDrillClientQueryResult->m_bIsQueryPending=false;
+ BOOST_LOG_TRIVIAL(debug) << "Client app cancelled query.";
+ return ret;
+ }
+ if(pDrillClientQueryResult->m_bIsLastChunk){
+ {
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ m_pendingRequests--;
+ BOOST_LOG_TRIVIAL(debug) << debugPrintQid(*pDrillClientQueryResult->m_pQueryId)
+ << "Received last batch. " << std::endl;
+ BOOST_LOG_TRIVIAL(debug) << debugPrintQid(*pDrillClientQueryResult->m_pQueryId)
+ << "Pending requests: " << m_pendingRequests <<"." << std::endl;
+ }
+ ret=QRY_NO_MORE_DATA;
+ sendAck(msg);
+ return ret;
+ }
+ sendAck(msg);
+ return ret;
+}
+
+status_t DrillClientImpl::processQueryId(InBoundRpcMessage& msg ){
+ DrillClientQueryResult* pDrillClientQueryResult=NULL;
+ BOOST_LOG_TRIVIAL(debug) << "Processing Query Handle with coordination id:" << msg.m_coord_id << std::endl;
+ status_t ret=QRY_SUCCESS;
+
+ boost::lock_guard<boost::mutex> lock(m_dcMutex);
+ std::map<int,DrillClientQueryResult*>::iterator it;
+ it=this->m_queryIds.find(msg.m_coord_id);
+ if(it!=this->m_queryIds.end()){
+ pDrillClientQueryResult=(*it).second;
+ exec::shared::QueryId *qid = new exec::shared::QueryId;
+ BOOST_LOG_TRIVIAL(trace) << "Received Query Handle" << msg.m_pbody.size();
+ qid->ParseFromArray(msg.m_pbody.data(), msg.m_pbody.size());
+ BOOST_LOG_TRIVIAL(trace) << qid->DebugString();
+ m_queryResults[qid]=pDrillClientQueryResult;
+ //save queryId allocated here so we can free it later
+ pDrillClientQueryResult->setQueryId(qid);
+ }else{
+ return handleQryError(QRY_INTERNAL_ERROR, getMessage(ERR_QRY_INVQUERYID), NULL);
+ }
+ return ret;
+}
+
+void DrillClientImpl::handleRead(ByteBuf_t _buf,
+ const boost::system::error_code& err,
+ size_t bytes_transferred) {
+ boost::system::error_code error=err;
+ if(!error){
+ InBoundRpcMessage msg;
+
+ BOOST_LOG_TRIVIAL(trace) << "Getting new message" << std::endl;
+
+ if(readMsg(_buf, msg, error)!=QRY_SUCCESS){
+ if(m_pendingRequests!=0){
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ getNextResult();
+ }
+ return;
+ }
+
+ if(!error && msg.m_rpc_type==exec::user::QUERY_RESULT){
+ if(processQueryResult(msg)!=QRY_SUCCESS){
+ if(m_pendingRequests!=0){
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ getNextResult();
+ }
+ return;
+ }
+ }else if(!error && msg.m_rpc_type==exec::user::QUERY_HANDLE){
+ if(processQueryId(msg)!=QRY_SUCCESS){
+ if(m_pendingRequests!=0){
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ getNextResult();
+ }
+ return;
+ }
+ }else{
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ if(error){
+ // We have a socket read error, but we do not know which query this is for.
+ // Signal ALL pending queries that they should stop waiting.
+ BOOST_LOG_TRIVIAL(trace) << "read error: " << error << "\n";
+ handleQryError(QRY_COMM_ERROR, getMessage(ERR_QRY_COMMERR, error.message().c_str()), NULL);
+ return;
+ }else{
+ //If not QUERY_RESULT, then we think something serious has gone wrong?
+ assert(0);
+ BOOST_LOG_TRIVIAL(trace) << "QueryResult returned " << msg.m_rpc_type;
+ handleQryError(QRY_INTERNAL_ERROR, getMessage(ERR_QRY_INVRPCTYPE, msg.m_rpc_type), NULL);
+ return;
+ }
+ }
+ {
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ getNextResult();
+ }
+ }else{
+ // boost error
+ boost::lock_guard<boost::mutex> lock(this->m_dcMutex);
+ handleQryError(QRY_COMM_ERROR, getMessage(ERR_QRY_COMMERR, error.message().c_str()), NULL);
+ return;
+ }
+ return;
+}
+
+status_t DrillClientImpl::validateMessage(InBoundRpcMessage& msg, exec::user::QueryResult& qr, std::string& valErr){
+ if(msg.m_mode == exec::rpc::RESPONSE_FAILURE){
+ valErr=getMessage(ERR_QRY_RESPFAIL);
+ return QRY_FAILURE;
+ }
+ if(qr.query_state()== exec::user::QueryResult_QueryState_UNKNOWN_QUERY){
+ valErr=getMessage(ERR_QRY_UNKQRY);
+ return QRY_FAILURE;
+ }
+ if(qr.query_state()== exec::user::QueryResult_QueryState_CANCELED){
+ valErr=getMessage(ERR_QRY_CANCELED);
+ return QRY_FAILURE;
+ }
+ if(qr.def().is_selection_vector_2() == true){
+ valErr=getMessage(ERR_QRY_SELVEC2);
+ return QRY_FAILURE;
+ }
+ return QRY_SUCCESS;
+}
+
+connectionStatus_t DrillClientImpl::handleConnError(connectionStatus_t status, std::string msg){
+ DrillClientError* pErr = new DrillClientError(status, DrillClientError::CONN_ERROR_START+status, msg);
+ m_pendingRequests=0;
+ m_pError=pErr;
+ broadcastError(this->m_pError);
+ return status;
+}
+
+status_t DrillClientImpl::handleQryError(status_t status, std::string msg, DrillClientQueryResult* pQueryResult){
+ DrillClientError* pErr = new DrillClientError(status, DrillClientError::QRY_ERROR_START+status, msg);
+ if(pQueryResult!=NULL){
+ m_pendingRequests--;
+ pQueryResult->signalError(pErr);
+ }else{
+ m_pendingRequests=0;
+ m_pError=pErr;
+ broadcastError(this->m_pError);
+ }
+ return status;
+}
+
+status_t DrillClientImpl::handleQryError(status_t status,
+ const exec::shared::DrillPBError& e,
+ DrillClientQueryResult* pQueryResult){
+ assert(pQueryResult!=NULL);
+ this->m_pError = DrillClientError::getErrorObject(e);
+ pQueryResult->signalError(this->m_pError);
+ m_pendingRequests--;
+ return status;
+}
+
+void DrillClientImpl::broadcastError(DrillClientError* pErr){
+ if(pErr!=NULL){
+ std::map<int, DrillClientQueryResult*>::iterator iter;
+ for(iter = m_queryIds.begin(); iter != m_queryIds.end(); iter++) {
+ iter->second->signalError(pErr);
+ }
+ }
+ return;
+}
+
+void DrillClientImpl::clearMapEntries(DrillClientQueryResult* pQueryResult){
+ std::map<int, DrillClientQueryResult*>::iterator iter;
+ boost::lock_guard<boost::mutex> lock(m_dcMutex);
+ for(iter=m_queryIds.begin(); iter!=m_queryIds.end(); iter++) {
+ if(pQueryResult==(DrillClientQueryResult*)iter->second){
+ m_queryIds.erase(iter->first);
+ break;
+ }
+ }
+ std::map<exec::shared::QueryId*, DrillClientQueryResult*, compareQueryId>::iterator it;
+ for(it=m_queryResults.begin(); it!=m_queryResults.end(); it++) {
+ if(pQueryResult==(DrillClientQueryResult*)it->second){
+ m_queryResults.erase(it->first);
+ break;
+ }
+ }
+}
+
+void DrillClientImpl::sendAck(InBoundRpcMessage& msg){
+ exec::rpc::Ack ack;
+ ack.set_ok(true);
+ OutBoundRpcMessage ack_msg(exec::rpc::RESPONSE, exec::user::ACK, msg.m_coord_id, &ack);
+ boost::lock_guard<boost::mutex> lock(m_dcMutex);
+ sendSync(ack_msg);
+ BOOST_LOG_TRIVIAL(trace) << "ACK sent" << std::endl;
+}
+
+void DrillClientImpl::sendCancel(InBoundRpcMessage& msg){
+ exec::rpc::Ack ack;
+ ack.set_ok(true);
+ OutBoundRpcMessage ack_msg(exec::rpc::RESPONSE, exec::user::CANCEL_QUERY, msg.m_coord_id, &ack);
+ boost::lock_guard<boost::mutex> lock(m_dcMutex);
+ sendSync(ack_msg);
+ BOOST_LOG_TRIVIAL(trace) << "CANCEL sent" << 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::user::QueryResult* pQueryResult) {
+ bool hasSchemaChanged=false;
+ boost::lock_guard<boost::mutex> schLock(this->m_schemaMutex);
+
+ std::vector<Drill::FieldMetadata*> prevSchema=this->m_columnDefs;
+ std::map<std::string, Drill::FieldMetadata*> oldSchema;
+ for(std::vector<Drill::FieldMetadata*>::iterator it = prevSchema.begin(); it != prevSchema.end(); ++it){
+ // the key is the field_name + type
+ char type[256];
+ sprintf(type, ":%d:%d",(*it)->getMinorType(), (*it)->getDataMode() );
+ std::string k= (*it)->getName()+type;
+ oldSchema[k]=*it;
+ }
+
+ m_columnDefs.clear();
+ size_t numFields=pQueryResult->def().field_size();
+ for(size_t i=0; i<numFields; i++){
+ //TODO: free this??
+ Drill::FieldMetadata* fmd= new Drill::FieldMetadata;
+ fmd->set(pQueryResult->def().field(i));
+ this->m_columnDefs.push_back(fmd);
+
+ //Look for changes in the vector and trigger a Schema change event if necessary.
+ //If vectors are different, then call the schema change listener.
+ char type[256];
+ sprintf(type, ":%d:%d",fmd->getMinorType(), fmd->getDataMode() );
+ std::string k= fmd->getName()+type;
+ std::map<std::string, Drill::FieldMetadata*>::iterator iter=oldSchema.find(k);
+ if(iter==oldSchema.end()){
+ // not found
+ hasSchemaChanged=true;
+ }else{
+ oldSchema.erase(iter);
+ }
+ }
+ if(oldSchema.size()>0){
+ hasSchemaChanged=true;
+ }
+
+ //free memory allocated for FieldMetadata objects saved in previous columnDefs;
+ for(std::vector<Drill::FieldMetadata*>::iterator it = prevSchema.begin(); it != prevSchema.end(); ++it){
+ delete *it;
+ }
+ prevSchema.clear();
+ this->m_bHasSchemaChanged=hasSchemaChanged;
+ if(hasSchemaChanged){
+ //TODO: invoke schema change Listener
+ }
+ return hasSchemaChanged?QRY_SUCCESS_WITH_INFO:QRY_SUCCESS;
+}
+
+status_t DrillClientQueryResult::defaultQueryResultsListener(void* ctx,
+ RecordBatch* b,
+ DrillClientError* err) {
+ //ctx; // unused, we already have the this pointer
+ BOOST_LOG_TRIVIAL(trace) << "Query result listener called" << std::endl;
+ //check if the query has been canceled. IF so then return FAILURE. Caller will send cancel to the server.
+ if(this->m_bCancel){
+ return QRY_FAILURE;
+ }
+ if (!err) {
+ // signal the cond var
+ {
+ #ifdef DEBUG
+ BOOST_LOG_TRIVIAL(debug)<<debugPrintQid(b->getQueryResult()->query_id())
+ << "Query result listener saved result to queue." << std::endl;
+ #endif
+ boost::lock_guard<boost::mutex> cvLock(this->m_cvMutex);
+ this->m_recordBatches.push(b);
+ this->m_bHasData=true;
+ }
+ m_cv.notify_one();
+ }else{
+ return QRY_FAILURE;
+ }
+ return QRY_SUCCESS;
+}
+
+RecordBatch* DrillClientQueryResult::peekNext() {
+ RecordBatch* pRecordBatch=NULL;
+ //if no more data, return NULL;
+ if(!m_bIsQueryPending) return NULL;
+ boost::unique_lock<boost::mutex> cvLock(this->m_cvMutex);
+ BOOST_LOG_TRIVIAL(trace) << "Synchronous read waiting for data." << std::endl;
+ while(!this->m_bHasData && !m_bHasError) {
+ this->m_cv.wait(cvLock);
+ }
+ // READ but not remove first element from queue
+ pRecordBatch = this->m_recordBatches.front();
+ return pRecordBatch;
+}
+
+RecordBatch* DrillClientQueryResult::getNext() {
+ RecordBatch* pRecordBatch=NULL;
+ //if no more data, return NULL;
+ if(!m_bIsQueryPending) return NULL;
+
+ boost::unique_lock<boost::mutex> cvLock(this->m_cvMutex);
+ BOOST_LOG_TRIVIAL(trace) << "Synchronous read waiting for data." << std::endl;
+ while(!this->m_bHasData && !m_bHasError) {
+ this->m_cv.wait(cvLock);
+ }
+ // remove first element from queue
+ pRecordBatch = this->m_recordBatches.front();
+ this->m_recordBatches.pop();
+ this->m_bHasData=!this->m_recordBatches.empty();
+ // if vector is empty, set m_bHasDataPending to false;
+ m_bIsQueryPending=!(this->m_recordBatches.empty()&&m_bIsLastChunk);
+ return pRecordBatch;
+}
+
+// Blocks until data is available
+void DrillClientQueryResult::waitForData() {
+ //if no more data, return NULL;
+ if(!m_bIsQueryPending) return;
+ boost::unique_lock<boost::mutex> cvLock(this->m_cvMutex);
+ while(!this->m_bHasData && !m_bHasError) {
+ this->m_cv.wait(cvLock);
+ }
+}
+
+void DrillClientQueryResult::cancel() {
+ this->m_bCancel=true;
+}
+
+void DrillClientQueryResult::signalError(DrillClientError* pErr){
+ // Ignore return values from the listener.
+ if(pErr!=NULL){
+ m_pError=pErr;
+ pfnQueryResultsListener pResultsListener=this->m_pResultsListener;
+ if(pResultsListener!=NULL){
+ pResultsListener(this, NULL, pErr);
+ }else{
+ defaultQueryResultsListener(this, NULL, pErr);
+ }
+ m_bIsQueryPending=false;
+ {
+ boost::lock_guard<boost::mutex> cvLock(this->m_cvMutex);
+ m_bHasData=false;
+ m_bHasError=true;
+ }
+ //Signal the cv in case there is a client waiting for data already.
+ m_cv.notify_one();
+ }
+ return;
+}
+
+void DrillClientQueryResult::clearAndDestroy(){
+ if(this->m_pQueryId!=NULL){
+ delete this->m_pQueryId; this->m_pQueryId=NULL;
+ }
+ //free memory allocated for FieldMetadata objects saved in m_columnDefs;
+ for(std::vector<Drill::FieldMetadata*>::iterator it = m_columnDefs.begin(); it != m_columnDefs.end(); ++it){
+ delete *it;
+ }
+ m_columnDefs.clear();
+ //Tell the parent to remove this from it's lists
+ m_pClient->clearMapEntries(this);
+}
+
+char ZookeeperImpl::s_drillRoot[]="/drill/drillbits1";
+
+ZookeeperImpl::ZookeeperImpl(){
+ m_pDrillbits=new String_vector;
+ srand (time(NULL));
+ m_bConnecting=true;
+ memset(&m_id, 0, sizeof(m_id));
+}
+
+ZookeeperImpl::~ZookeeperImpl(){
+ delete m_pDrillbits;
+}
+
+ZooLogLevel ZookeeperImpl::getZkLogLevel(){
+ //typedef enum {ZOO_LOG_LEVEL_ERROR=1,
+ // ZOO_LOG_LEVEL_WARN=2,
+ // ZOO_LOG_LEVEL_INFO=3,
+ // ZOO_LOG_LEVEL_DEBUG=4
+ //} ZooLogLevel;
+ switch(DrillClientConfig::getLogLevel()){
+ case LOG_TRACE:
+ case LOG_DEBUG:
+ return ZOO_LOG_LEVEL_DEBUG;
+ case LOG_INFO:
+ return ZOO_LOG_LEVEL_INFO;
+ case LOG_WARNING:
+ return ZOO_LOG_LEVEL_WARN;
+ case LOG_ERROR:
+ case LOG_FATAL:
+ default:
+ return ZOO_LOG_LEVEL_ERROR;
+ }
+ return ZOO_LOG_LEVEL_ERROR;
+}
+
+int ZookeeperImpl::connectToZookeeper(const char* connectStr){
+ uint32_t waitTime=30000; // 10 seconds
+ zoo_set_debug_level(getZkLogLevel());
+ zoo_deterministic_conn_order(1); // enable deterministic order
+ m_zh = zookeeper_init(connectStr, watcher, waitTime, 0, this, 0);
+ if(!m_zh) {
+ m_err = getMessage(ERR_CONN_ZKFAIL);
+ return CONN_FAILURE;
+ }else{
+ m_err="";
+ //Wait for the completion handler to signal successful connection
+ boost::unique_lock<boost::mutex> bufferLock(this->m_cvMutex);
+ boost::system_time const timeout=boost::get_system_time()+ boost::posix_time::milliseconds(waitTime);
+ while(this->m_bConnecting) {
+ if(!this->m_cv.timed_wait(bufferLock, timeout)){
+ m_err = getMessage(ERR_CONN_ZKTIMOUT);
+ return CONN_FAILURE;
+ }
+ }
+ }
+ if(m_state!=ZOO_CONNECTED_STATE){
+ return CONN_FAILURE;
+ }
+ int rc = ZOK;
+ rc=zoo_get_children(m_zh, (char*)s_drillRoot, 0, m_pDrillbits);
+ if(rc!=ZOK){
+ m_err=getMessage(ERR_CONN_ZKERR, rc);
+ zookeeper_close(m_zh);
+ return -1;
+ }
+
+
+ //Let's pick a random drillbit.
+ if(m_pDrillbits && m_pDrillbits->count >0){
+ int r=rand()%(this->m_pDrillbits->count);
+ assert(r<this->m_pDrillbits->count);
+ char * bit=this->m_pDrillbits->data[r];
+ std::string s;
+ s=s_drillRoot + std::string("/") + bit;
+ int buffer_len=1024;
+ char buffer[1024];
+ struct Stat stat;
+ rc= zoo_get(m_zh, s.c_str(), 0, buffer, &buffer_len, &stat);
+ if(rc!=ZOK){
+ m_err=getMessage(ERR_CONN_ZKDBITERR, rc);
+ zookeeper_close(m_zh);
+ return -1;
+ }
+ m_drillServiceInstance.ParseFromArray(buffer, buffer_len);
+ }else{
+ m_err=getMessage(ERR_CONN_ZKNODBIT);
+ zookeeper_close(m_zh);
+ return -1;
+ }
+ return 0;
+}
+
+void ZookeeperImpl::close(){
+ zookeeper_close(m_zh);
+}
+
+void ZookeeperImpl::watcher(zhandle_t *zzh, int type, int state, const char *path, void* context) {
+ //From cli.c
+
+ /* Be careful using zh here rather than zzh - as this may be mt code
+ * the client lib may call the watcher before zookeeper_init returns */
+
+ ZookeeperImpl* self=(ZookeeperImpl*)context;
+ self->m_state=state;
+ if (type == ZOO_SESSION_EVENT) {
+ if (state == ZOO_CONNECTED_STATE) {
+ } else if (state == ZOO_AUTH_FAILED_STATE) {
+ self->m_err= getMessage(ERR_CONN_ZKNOAUTH);
+ zookeeper_close(zzh);
+ self->m_zh=0;
+ } else if (state == ZOO_EXPIRED_SESSION_STATE) {
+ self->m_err= getMessage(ERR_CONN_ZKEXP);
+ zookeeper_close(zzh);
+ self->m_zh=0;
+ }
+ }
+ // signal the cond var
+ {
+ if (state == ZOO_CONNECTED_STATE){
+ BOOST_LOG_TRIVIAL(trace) << "Connected to Zookeeper." << std::endl;
+ }
+ boost::lock_guard<boost::mutex> bufferLock(self->m_cvMutex);
+ self->m_bConnecting=false;
+ }
+ self->m_cv.notify_one();
+}
+
+void ZookeeperImpl:: debugPrint(){
+ if(m_zh!=NULL && m_state==ZOO_CONNECTED_STATE){
+ BOOST_LOG_TRIVIAL(trace) << m_drillServiceInstance.DebugString();
+ }
+}
+
+} // namespace Drill
diff --git a/contrib/native/client/src/clientlib/drillClientImpl.hpp b/contrib/native/client/src/clientlib/drillClientImpl.hpp
new file mode 100644
index 000000000..0046b3e52
--- /dev/null
+++ b/contrib/native/client/src/clientlib/drillClientImpl.hpp
@@ -0,0 +1,316 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef DRILL_CLIENT_ASYNC_H
+#define DRILL_CLIENT_ASYNC_H
+
+#include <stdlib.h>
+#include <time.h>
+#include <queue>
+#include <vector>
+#include <boost/asio.hpp>
+#include <boost/thread.hpp>
+#include <zookeeper/zookeeper.h>
+
+#include "drill/common.hpp"
+#include "drill/drillClient.hpp"
+#include "rpcEncoder.hpp"
+#include "rpcDecoder.hpp"
+#include "User.pb.h"
+#include "UserBitShared.pb.h"
+
+namespace Drill {
+
+class DrillClientImpl;
+class InBoundRpcMessage;
+class OutBoundRpcMessage;
+class RecordBatch;
+class RpcEncoder;
+class RpcDecoder;
+//struct UserServerEndPoint;
+
+class DrillClientQueryResult{
+ friend class DrillClientImpl;
+ public:
+ DrillClientQueryResult(DrillClientImpl * pClient, uint64_t coordId):
+ m_pClient(pClient),
+ m_coordinationId(coordId),
+ m_bIsQueryPending(true),
+ m_bIsLastChunk(false),
+ m_bCancel(false),
+ m_bHasSchemaChanged(false),
+ m_bHasData(false),
+ m_bHasError(false),
+ m_pError(NULL),
+ m_pQueryId(NULL),
+ m_pResultsListener(NULL),
+ m_pListenerCtx(NULL)
+ {};
+
+ ~DrillClientQueryResult(){
+ this->clearAndDestroy();
+ };
+
+ // get data asynchronously
+ void registerListener(pfnQueryResultsListener listener, void* listenerCtx){
+ this->m_pResultsListener=listener;
+ this->m_pListenerCtx = listenerCtx;
+ }
+
+ // Synchronous call to get data. Caller assumes ownership of the recod batch
+ // returned and it is assumed to have been consumed.
+ RecordBatch* getNext();
+ // Synchronous call to get a look at the next Record Batch. This
+ // call does not move the current pointer forward. Repeatied calls
+ // to peekNext return the same value until getNext is called.
+ RecordBatch* peekNext();
+ // Blocks until data is available.
+ void waitForData();
+
+ // placeholder to return an empty col def vector when calls are made out of order.
+ static std::vector<Drill::FieldMetadata*> s_emptyColDefs;
+
+ std::vector<Drill::FieldMetadata*>& getColumnDefs(){
+ boost::lock_guard<boost::mutex> bufferLock(this->m_schemaMutex);
+ return this->m_columnDefs;
+ }
+
+ void cancel();
+ bool isCancelled(){return this->m_bCancel;};
+ bool hasSchemaChanged(){return this->m_bHasSchemaChanged;};
+ int32_t getCoordinationId(){ return this->m_coordinationId;}
+
+ void setQueryId(exec::shared::QueryId* q){this->m_pQueryId=q;}
+ void* getListenerContext() {return this->m_pListenerCtx;}
+ exec::shared::QueryId& getQueryId(){ return *(this->m_pQueryId); }
+ bool hasError(){ return m_bHasError;}
+ status_t getErrorStatus(){ return m_pError!=NULL?(status_t)m_pError->status:QRY_SUCCESS;}
+ DrillClientError* getError(){ return m_pError;}
+
+ private:
+ status_t setupColumnDefs(exec::user::QueryResult* pQueryResult);
+ status_t defaultQueryResultsListener(void* ctx, RecordBatch* b, DrillClientError* err);
+ // Construct a DrillClientError object, set the appropriate state and signal any listeners, condition variables.
+ void signalError(DrillClientError* pErr);
+ void clearAndDestroy();
+
+
+ DrillClientImpl* m_pClient;
+
+ int32_t m_coordinationId;
+
+ // Vector of Buffers holding data returned by the server
+ // Each data buffer is decoded into a RecordBatch
+ std::vector<ByteBuf_t> m_dataBuffers;
+ std::queue<RecordBatch*> m_recordBatches;
+ std::vector<Drill::FieldMetadata*> m_columnDefs;
+
+ // Mutex to protect schema definitions
+ boost::mutex m_schemaMutex;
+ // Mutex for Cond variable for read write to batch vector
+ boost::mutex m_cvMutex;
+ // Condition variable to signal arrival of more data. Condition variable is signaled
+ // if the recordBatches queue is not empty
+ boost::condition_variable m_cv;
+
+ // state
+ // if m_bIsQueryPending is true, we continue to wait for results
+ bool m_bIsQueryPending;
+ bool m_bIsLastChunk;
+ bool m_bCancel;
+ bool m_bHasSchemaChanged;
+ bool m_bHasData;
+ bool m_bHasError;
+
+ DrillClientError* m_pError;
+
+ exec::shared::QueryId* m_pQueryId;
+
+ // Results callback
+ pfnQueryResultsListener m_pResultsListener;
+
+ // Listener context
+ void * m_pListenerCtx;
+};
+
+class DrillClientImpl{
+ public:
+ DrillClientImpl():
+ m_coordinationId(1) ,
+ m_bIsConnected(false),
+ m_pendingRequests(0),
+ m_pError(NULL),
+ m_pListenerThread(NULL),
+ m_socket(m_io_service),
+ m_rbuf(1024),
+ m_wbuf(1024)
+ {
+ srand(time(NULL));
+ m_coordinationId=rand()%1729+1;
+ };
+
+ ~DrillClientImpl(){
+ //TODO: Cleanup.
+ //Free any record batches or buffers remaining
+ //Cancel any pending requests
+ //Clear and destroy DrillClientQueryResults vector?
+
+ //Terminate and free the listener thread
+ if(this->m_pListenerThread!=NULL){
+ this->m_pListenerThread->interrupt();
+ delete this->m_pListenerThread;
+ }
+ if(m_pError!=NULL){
+ delete m_pError; m_pError=NULL;
+ }
+ };
+
+ //Connect via Zookeeper or directly
+ connectionStatus_t connect(const char* connStr);
+ // test whether the client is active
+ bool Active();
+ void Close() ;
+ DrillClientError* getError(){ return m_pError;}
+ DrillClientQueryResult* SubmitQuery(exec::user::QueryType t, const std::string& plan, pfnQueryResultsListener listener, void* listenerCtx);
+ void waitForResults();
+ bool ValidateHandShake(); // throw expection if not valid
+
+
+ private:
+ friend class DrillClientQueryResult;
+
+ struct compareQueryId{
+ bool operator()(const exec::shared::QueryId* q1, const exec::shared::QueryId* q2) const {
+ return q1->part1()<q2->part1() || (q1->part1()==q2->part1() && q1->part2() < q2->part2());
+ }
+ };
+
+ //allocate memory for Record Batches
+ ByteBuf_t allocateBuffer(size_t len){
+ ByteBuf_t b = (ByteBuf_t)malloc(len); memset(b, 0, len); return b;
+ }
+ void freeBuffer(ByteBuf_t b){ free(b); }
+
+ // 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);
+ int32_t getNextCoordinationId(){ return ++m_coordinationId; };
+ void parseConnectStr(const char* connectStr, std::string& protocol, std::string& hostPortStr);
+ // end and receive synchronous messages
+ void recvSync(InBoundRpcMessage& msg);
+ void sendSync(OutBoundRpcMessage& msg);
+
+ void getNextResult();
+ status_t readMsg(ByteBuf_t _buf, InBoundRpcMessage& msg, boost::system::error_code& error);
+ status_t processQueryResult(InBoundRpcMessage& msg);
+ status_t processQueryId(InBoundRpcMessage& msg );
+ void handleRead(ByteBuf_t _buf, const boost::system::error_code & err, size_t bytes_transferred) ;
+ status_t validateMessage(InBoundRpcMessage& msg, exec::user::QueryResult& qr, std::string& valError);
+ connectionStatus_t handleConnError(connectionStatus_t status, std::string msg);
+ status_t handleQryError(status_t status, std::string msg, DrillClientQueryResult* pQueryResult);
+ status_t handleQryError(status_t status,
+ const exec::shared::DrillPBError& e,
+ DrillClientQueryResult* pQueryResult);
+ void broadcastError(DrillClientError* pErr);
+ void clearMapEntries(DrillClientQueryResult* pQueryResult);
+ void sendAck(InBoundRpcMessage& msg);
+ void sendCancel(InBoundRpcMessage& msg);
+
+
+ static RpcEncoder s_encoder;
+ static RpcDecoder s_decoder;
+
+ int32_t m_coordinationId;
+ bool m_bIsConnected;
+
+ // number of outstanding read requests.
+ // handleRead will keep asking for more results as long as this number is not zero.
+ size_t m_pendingRequests;
+
+ // Error Object. NULL if no error. Set if the error is valid for ALL running queries.
+ // All the query result objects will
+ // also have the error object set.
+ // If the error is query specific, only the query results object will have the error set.
+ DrillClientError* m_pError;
+
+ // for boost asio
+ boost::thread * m_pListenerThread;
+ boost::asio::io_service m_io_service;
+ boost::asio::ip::tcp::socket m_socket;
+
+ //for synchronous messages, like validate handshake
+ DataBuf m_rbuf; // buffer for receiving synchronous messages
+ DataBuf m_wbuf; // buffer for sending synchronous message
+
+ // Mutex to protect drill client operations
+ boost::mutex m_dcMutex;
+
+ // Map of coordination id to Query Ids.
+ std::map<int, DrillClientQueryResult*> m_queryIds;
+
+ // Map of query id to query result
+ std::map<exec::shared::QueryId*, DrillClientQueryResult*, compareQueryId> m_queryResults;
+
+};
+
+inline bool DrillClientImpl::Active() {
+ return this->m_bIsConnected;;
+}
+
+inline void DrillClientImpl::Close() {
+ //TODO: cancel pending query
+ if(this->m_bIsConnected){
+ m_socket.close();
+ m_bIsConnected=false;
+ }
+}
+
+class ZookeeperImpl{
+ public:
+ ZookeeperImpl();
+ ~ZookeeperImpl();
+ static ZooLogLevel getZkLogLevel();
+ // comma separated host:port pairs, each corresponding to a zk
+ // server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002
+ int connectToZookeeper(const char* connectStr);
+ void close();
+ static void watcher(zhandle_t *zzh, int type, int state, const char *path, void* context);
+ void debugPrint();
+ std::string& getError(){return m_err;}
+ const exec::DrillbitEndpoint& getEndPoint(){ return m_drillServiceInstance.endpoint();}
+
+ private:
+ static char s_drillRoot[];
+ zhandle_t* m_zh;
+ clientid_t m_id;
+ int m_state;
+ std::string m_err;
+
+ struct String_vector* m_pDrillbits;
+
+ boost::mutex m_cvMutex;
+ // Condition variable to signal connection callback has been processed
+ boost::condition_variable m_cv;
+ bool m_bConnecting;
+ exec::DrillServiceInstance m_drillServiceInstance;
+};
+
+} // namespace Drill
+
+#endif
diff --git a/contrib/native/client/src/clientlib/errmsgs.cpp b/contrib/native/client/src/clientlib/errmsgs.cpp
new file mode 100644
index 000000000..0b74225f0
--- /dev/null
+++ b/contrib/native/client/src/clientlib/errmsgs.cpp
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <assert.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <boost/lexical_cast.hpp>
+#include "errmsgs.hpp"
+
+namespace Drill{
+
+static Drill::ErrorMessages errorMessages[]={
+ {ERR_NONE, 0, 0, "No Error."},
+ {ERR_CONN_FAILURE, ERR_CATEGORY_CONN, 0, "Connection failure. Host:%s port:%s. Error: %s."},
+ {ERR_CONN_EXCEPT, ERR_CATEGORY_CONN, 0, "Socket connection failure with the following exception: %s."},
+ {ERR_CONN_UNKPROTO, ERR_CATEGORY_CONN, 0, "Unknown protocol: %s."},
+ {ERR_CONN_ZOOKEEPER, ERR_CATEGORY_CONN, 0, "Zookeeper error. %s"},
+ {ERR_CONN_NOHSHAKE, ERR_CATEGORY_CONN, 0, "Handshake failed: Expected RPC version %d, got %d."},
+ {ERR_CONN_ZKFAIL, ERR_CATEGORY_CONN, 0, "Failed to connect to Zookeeper."},
+ {ERR_CONN_ZKTIMOUT, ERR_CATEGORY_CONN, 0, "Timed out while waiting to connect."},
+ {ERR_CONN_ZKERR, ERR_CATEGORY_CONN, 0, "Error in reading from Zookeeper (error code: %d)."},
+ {ERR_CONN_ZKDBITERR, ERR_CATEGORY_CONN, 0, "Error in reading drillbit endpoint from Zookeeper (error code: %d)."},
+ {ERR_CONN_ZKNODBIT, ERR_CATEGORY_CONN, 0, "No drillbit found with this Zookeeper."},
+ {ERR_CONN_ZKNOAUTH, ERR_CATEGORY_CONN, 0, "Authentication failed."},
+ {ERR_CONN_ZKEXP, ERR_CATEGORY_CONN, 0, "Session expired."},
+ {ERR_QRY_OUTOFMEM, ERR_CATEGORY_QRY, 0, "Out of memory."},
+ {ERR_QRY_COMMERR, ERR_CATEGORY_QRY, 0, "Communication error. %s"},
+ {ERR_QRY_INVREADLEN, ERR_CATEGORY_QRY, 0, "Internal Error: Received a message with an invalid read length."},
+ {ERR_QRY_INVQUERYID, ERR_CATEGORY_QRY, 0, "Internal Error: Cannot find query Id in internal structure."},
+ {ERR_QRY_INVRPCTYPE, ERR_CATEGORY_QRY, 0, "Unknown rpc type received from server:%d."},
+ {ERR_QRY_OUTOFORDER, ERR_CATEGORY_QRY, 0, "Internal Error: Query result received before query id. Aborting ..."},
+ {ERR_QRY_INVRPC, ERR_CATEGORY_QRY, 0, "Rpc Error: %s."},
+ {ERR_QRY_8, ERR_CATEGORY_QRY, 0, "Query Failed."},
+ {ERR_QRY_FAILURE, ERR_CATEGORY_QRY, 0, "Query execution error. Details:[ \n%s\n]"},
+ {ERR_QRY_SELVEC2, ERR_CATEGORY_QRY, 0, "Receiving a selection_vector_2 from the server came as a complete surprise at this point"},
+ {ERR_QRY_RESPFAIL, ERR_CATEGORY_QRY, 0, "Got a RESPONSE_FAILURE from the server and don't know what to do"},
+ {ERR_QRY_12, ERR_CATEGORY_QRY, 0, "Query Failed."},
+ {ERR_QRY_UNKQRY, ERR_CATEGORY_QRY, 0, "The server didn't find this query"},
+ {ERR_QRY_CANCELED, ERR_CATEGORY_QRY, 0, "The server says this query has been cancelled"},
+ {ERR_QRY_15, ERR_CATEGORY_QRY, 0, "Query Failed."},
+ {ERR_QRY_16, ERR_CATEGORY_QRY, 0, "Query Failed."},
+ {ERR_QRY_17, ERR_CATEGORY_QRY, 0, "Query Failed."},
+ {ERR_QRY_18, ERR_CATEGORY_QRY, 0, "Query Failed."},
+ {ERR_QRY_19, ERR_CATEGORY_QRY, 0, "Query Failed."},
+ {ERR_QRY_20, ERR_CATEGORY_QRY, 0, "Query Failed."}
+};
+
+std::string getMessage(uint32_t msgId, ...){
+ char str[10240];
+ std::string s;
+ assert(msgId <= ERR_QRY_MAX);
+ va_list args;
+ va_start (args, msgId);
+ vsprintf (str, errorMessages[msgId].msgFormatStr, args);
+ va_end (args);
+ s=std::string("[")+boost::lexical_cast<std::string>(msgId)+std::string("]")+str;
+ return s;
+}
+
+}// namespace Drill
diff --git a/contrib/native/client/src/clientlib/errmsgs.hpp b/contrib/native/client/src/clientlib/errmsgs.hpp
new file mode 100644
index 000000000..e5ea3ce30
--- /dev/null
+++ b/contrib/native/client/src/clientlib/errmsgs.hpp
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ERRMSGS_H
+#define ERRMSGS_H
+
+#include <stdint.h>
+#include <string>
+
+namespace Drill{
+
+#define ERR_CATEGORY_CONN 10000
+#define ERR_CATEGORY_QRY 20000
+
+#define ERR_NONE 0
+
+#define ERR_CONN_FAILURE 1
+#define ERR_CONN_EXCEPT 2
+#define ERR_CONN_UNKPROTO 3
+#define ERR_CONN_ZOOKEEPER 4
+#define ERR_CONN_NOHSHAKE 5
+#define ERR_CONN_ZKFAIL 6
+#define ERR_CONN_ZKTIMOUT 7
+#define ERR_CONN_ZKERR 8
+#define ERR_CONN_ZKDBITERR 9
+#define ERR_CONN_ZKNODBIT 10
+#define ERR_CONN_ZKNOAUTH 11
+#define ERR_CONN_ZKEXP 12
+#define ERR_CONN_MAX 12
+
+#define ERR_QRY_OUTOFMEM ERR_CONN_MAX+1
+#define ERR_QRY_COMMERR ERR_CONN_MAX+2
+#define ERR_QRY_INVREADLEN ERR_CONN_MAX+3
+#define ERR_QRY_INVQUERYID ERR_CONN_MAX+4
+#define ERR_QRY_INVRPCTYPE ERR_CONN_MAX+5
+#define ERR_QRY_OUTOFORDER ERR_CONN_MAX+6
+#define ERR_QRY_INVRPC ERR_CONN_MAX+7
+#define ERR_QRY_8 ERR_CONN_MAX+8
+#define ERR_QRY_FAILURE ERR_CONN_MAX+9
+#define ERR_QRY_SELVEC2 ERR_CONN_MAX+10
+#define ERR_QRY_RESPFAIL ERR_CONN_MAX+11
+#define ERR_QRY_12 ERR_CONN_MAX+12
+#define ERR_QRY_UNKQRY ERR_CONN_MAX+13
+#define ERR_QRY_CANCELED ERR_CONN_MAX+14
+#define ERR_QRY_15 ERR_CONN_MAX+15
+#define ERR_QRY_16 ERR_CONN_MAX+16
+#define ERR_QRY_17 ERR_CONN_MAX+17
+#define ERR_QRY_18 ERR_CONN_MAX+18
+#define ERR_QRY_19 ERR_CONN_MAX+19
+#define ERR_QRY_20 ERR_CONN_MAX+20
+#define ERR_QRY_MAX ERR_QRY_20
+
+ // Use only Plain Old Data types in this struc. We will declare
+ // a global.
+ struct ErrorMessages{
+ uint32_t msgId;
+ uint32_t category;
+ uint32_t nArgs;
+ char msgFormatStr[2048+1];
+ };
+
+ //declared in errmsgs.cpp
+ //static ErrorMessages errorMessages[];
+
+
+ std::string getMessage(uint32_t msgId, ...);
+
+} // namespace Drill
+
+
+
+#endif
diff --git a/contrib/native/client/src/clientlib/recordBatch.cpp b/contrib/native/client/src/clientlib/recordBatch.cpp
new file mode 100644
index 000000000..066b89864
--- /dev/null
+++ b/contrib/native/client/src/clientlib/recordBatch.cpp
@@ -0,0 +1,464 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <boost/log/trivial.hpp>
+
+#include "drill/common.hpp"
+#include "drill/recordBatch.hpp"
+
+const uint32_t YEARS_TO_MONTHS=12;
+const uint32_t HOURS_TO_MILLIS=60*60*1000;
+const uint32_t MINUTES_TO_MILLIS=60*1000;
+const uint32_t SECONDS_TO_MILLIS=1000;
+
+namespace Drill{
+
+static char timezoneMap[][36]={
+ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera",
+ "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville",
+ "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar",
+ "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun",
+ "Africa/Freetown", "Africa/Gaborone",
+ "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali",
+ "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi",
+ "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu",
+ "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey",
+ "Africa/Nouakchott", "Africa/Ouagadougou",
+ "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli",
+ "Africa/Tunis", "Africa/Windhoek",
+ "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina",
+ "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia",
+ "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja",
+ "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta",
+ "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman",
+ "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka",
+ "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize",
+ "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires",
+ "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca",
+ "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Coral_Harbour",
+ "America/Cordoba", "America/Costa_Rica", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn",
+ "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica",
+ "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Wayne",
+ "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk",
+ "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana",
+ "America/Halifax", "America/Havana", "America/Hermosillo",
+ "America/Indiana/Indianapolis", "America/Indiana/Knox",
+ "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City",
+ "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac",
+ "America/Indianapolis", "America/Inuvik",
+ "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville",
+ "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima",
+ "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua",
+ "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan",
+ "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City",
+ "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal",
+ "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon",
+ "America/Nome", "America/Noronha",
+ "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem",
+ "America/Ojinaga", "America/Panama", "America/Pangnirtung",
+ "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince",
+ "America/Port_of_Spain", "America/Porto_Acre", "America/Porto_Velho",
+ "America/Puerto_Rico", "America/Rainy_River", "America/Rankin_Inlet",
+ "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco",
+ "America/Rosario", "America/Santa_Isabel",
+ "America/Santarem", "America/Santiago", "America/Santo_Domingo",
+ "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka",
+ "America/St_Barthelemy", "America/St_Johns",
+ "America/St_Kitts", "America/St_Lucia", "America/St_Thomas",
+ "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa",
+ "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto",
+ "America/Tortola", "America/Vancouver",
+ "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat",
+ "America/Yellowknife", "Antarctica/Casey",
+ "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie",
+ "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer",
+ "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa",
+ "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr",
+ "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Baghdad", "Asia/Bahrain",
+ "Asia/Baku", "Asia/Bangkok", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta",
+ "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus",
+ "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Gaza", "Asia/Harbin",
+ "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul",
+ "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi",
+ "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur",
+ "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar",
+ "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk",
+ "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qyzylorda",
+ "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul",
+ "Asia/Shanghai", "Asia/Singapore", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran",
+ "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar",
+ "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg",
+ "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary",
+ "Atlantic/Cape_Verde", "Atlantic/Faeroe",
+ "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira",
+ "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena",
+ "Atlantic/Stanley", "Australia/ACT", "Australia/Adelaide", "Australia/Brisbane",
+ "Australia/Broken_Hill", "Australia/Canberra",
+ "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart",
+ "Australia/LHI", "Australia/Lindeman",
+ "Australia/Lord_Howe", "Australia/Melbourne", "Australia/NSW", "Australia/North",
+ "Australia/Perth", "Australia/Queensland",
+ "Australia/South", "Australia/Sydney", "Australia/Tasmania", "Australia/Victoria",
+ "Australia/West", "Australia/Yancowinna",
+ "Brazil/Acre", "Brazil/DeNoronha", "Brazil/East", "Brazil/West", "CET", "CST6CDT",
+ "Canada/Atlantic", "Canada/Central", "Canada/East-Saskatchewan", "Canada/Eastern",
+ "Canada/Mountain", "Canada/Newfoundland",
+ "Canada/Pacific", "Canada/Saskatchewan", "Canada/Yukon", "Chile/Continental", "Chile/EasterIsland", "Cuba",
+ "EET", "EST", "EST5EDT", "Egypt", "Eire", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10",
+ "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6",
+ "Etc/GMT+7", "Etc/GMT+8",
+ "Etc/GMT+9", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12",
+ "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2",
+ "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8",
+ "Etc/GMT-9", "Etc/GMT0", "Etc/Greenwich",
+ "Etc/UCT", "Etc/UTC", "Etc/Universal", "Etc/Zulu", "Europe/Amsterdam", "Europe/Andorra",
+ "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels",
+ "Europe/Bucharest", "Europe/Budapest", "Europe/Chisinau",
+ "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey",
+ "Europe/Helsinki", "Europe/Isle_of_Man",
+ "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana",
+ "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk",
+ "Europe/Monaco", "Europe/Moscow", "Europe/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica",
+ "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo",
+ "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane",
+ "Europe/Tiraspol", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius",
+ "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "GB",
+ "GB-Eire", "GMT", "GMT+0", "GMT-0", "GMT0", "Greenwich", "HST", "Hongkong", "Iceland",
+ "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas",
+ "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius",
+ "Indian/Mayotte", "Indian/Reunion", "Iran", "Israel", "Jamaica", "Japan", "Kwajalein", "Libya", "MET",
+ "MST", "MST7MDT", "Mexico/BajaNorte", "Mexico/BajaSur", "Mexico/General", "NZ", "NZ-CHAT", "Navajo", "PRC",
+ "PST8PDT", "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter",
+ "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji",
+ "Pacific/Funafuti", "Pacific/Galapagos",
+ "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu",
+ "Pacific/Johnston", "Pacific/Kiritimati",
+ "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas",
+ "Pacific/Midway", "Pacific/Nauru",
+ "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago",
+ "Pacific/Palau", "Pacific/Pitcairn",
+ "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga",
+ "Pacific/Saipan", "Pacific/Samoa",
+ "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis",
+ "Pacific/Yap", "Poland", "Portugal", "ROC", "ROK", "Singapore", "Turkey", "UCT", "US/Alaska", "US/Aleutian",
+ "US/Arizona", "US/Central", "US/East-Indiana", "US/Eastern", "US/Hawaii", "US/Indiana-Starke",
+ "US/Michigan", "US/Mountain", "US/Pacific", "US/Pacific-New", "US/Samoa",
+ "UTC", "Universal", "W-SU", "WET", "Zulu"
+};
+
+ValueVectorBase* ValueVectorFactory::allocateValueVector(const Drill::FieldMetadata & f, SlicedByteBuf* b){
+ common::MinorType type = f.getMinorType();
+ common::DataMode mode = f.getDataMode();
+
+ switch (mode) {
+
+ case common::DM_REQUIRED:
+ switch (type) {
+ case common::TINYINT:
+ return new ValueVectorFixed<int8_t>(b,f.getValueCount());
+ case common::SMALLINT:
+ return new ValueVectorFixed<int16_t>(b,f.getValueCount());
+ case common::INT:
+ return new ValueVectorFixed<int32_t>(b,f.getValueCount());
+ case common::BIGINT:
+ return new ValueVectorFixed<int64_t>(b,f.getValueCount());
+ case common::FLOAT4:
+ return new ValueVectorFixed<float>(b,f.getValueCount());
+ case common::FLOAT8:
+ return new ValueVectorFixed<double>(b,f.getValueCount());
+ // Decimal digits, width, max precision is defined in
+ // /exec/java-exec/src/main/codegen/data/ValueVectorTypes.tdd
+ // Decimal Design Document: http://bit.ly/drilldecimal
+ case common::DECIMAL9:
+ return new ValueVectorDecimal9(b,f.getValueCount(), f.getScale());
+ case common::DECIMAL18:
+ return new ValueVectorDecimal18(b,f.getValueCount(), f.getScale());
+ case common::DECIMAL28DENSE:
+ return new ValueVectorDecimal28Dense(b,f.getValueCount(), f.getScale());
+ case common::DECIMAL38DENSE:
+ return new ValueVectorDecimal38Dense(b,f.getValueCount(), f.getScale());
+ case common::DECIMAL28SPARSE:
+ return new ValueVectorDecimal28Sparse(b,f.getValueCount(), f.getScale());
+ case common::DECIMAL38SPARSE:
+ return new ValueVectorDecimal38Sparse(b,f.getValueCount(), f.getScale());
+ case common::DATE:
+ return new ValueVectorTyped<DateHolder, uint64_t>(b,f.getValueCount());
+ case common::TIMESTAMP:
+ return new ValueVectorTyped<DateTimeHolder, uint64_t>(b,f.getValueCount());
+ case common::TIME:
+ return new ValueVectorTyped<TimeHolder, uint32_t>(b,f.getValueCount());
+ case common::TIMESTAMPTZ:
+ return new ValueVectorTypedComposite<DateTimeTZHolder>(b,f.getValueCount());
+ case common::INTERVAL:
+ return new ValueVectorTypedComposite<IntervalHolder>(b,f.getValueCount());
+ case common::INTERVALDAY:
+ return new ValueVectorTypedComposite<IntervalDayHolder>(b,f.getValueCount());
+ case common::INTERVALYEAR:
+ return new ValueVectorTypedComposite<IntervalYearHolder>(b,f.getValueCount());
+ case common::BIT:
+ return new ValueVectorBit(b,f.getValueCount());
+ case common::VARBINARY:
+ return new ValueVectorVarBinary(b, f.getValueCount());
+ case common::VARCHAR:
+ return new ValueVectorVarChar(b, f.getValueCount());
+ case common::MONEY:
+ default:
+ return new ValueVectorUnimplemented(b, f.getValueCount());
+ }
+ case common::DM_OPTIONAL:
+ switch (type) {
+ case common::TINYINT:
+ return new NullableValueVectorFixed<int8_t>(b,f.getValueCount());
+ case common::SMALLINT:
+ return new NullableValueVectorFixed<int16_t>(b,f.getValueCount());
+ case common::INT:
+ return new NullableValueVectorFixed<int32_t>(b,f.getValueCount());
+ case common::BIGINT:
+ return new NullableValueVectorFixed<int64_t>(b,f.getValueCount());
+ case common::FLOAT4:
+ return new NullableValueVectorFixed<float>(b,f.getValueCount());
+ case common::FLOAT8:
+ return new NullableValueVectorFixed<double>(b,f.getValueCount());
+ case common::DATE:
+ return new NullableValueVectorTyped<DateHolder,
+ ValueVectorTyped<DateHolder, uint64_t> >(b,f.getValueCount());
+ case common::TIMESTAMP:
+ return new NullableValueVectorTyped<DateTimeHolder,
+ ValueVectorTyped<DateTimeHolder, uint64_t> >(b,f.getValueCount());
+ case common::TIME:
+ return new NullableValueVectorTyped<TimeHolder,
+ ValueVectorTyped<TimeHolder, uint32_t> >(b,f.getValueCount());
+ case common::TIMESTAMPTZ:
+ return new NullableValueVectorTyped<DateTimeTZHolder,
+ ValueVectorTypedComposite<DateTimeTZHolder> >(b,f.getValueCount());
+ case common::INTERVAL:
+ return new NullableValueVectorTyped<IntervalHolder,
+ ValueVectorTypedComposite<IntervalHolder> >(b,f.getValueCount());
+ case common::INTERVALDAY:
+ return new NullableValueVectorTyped<IntervalDayHolder,
+ ValueVectorTypedComposite<IntervalDayHolder> >(b,f.getValueCount());
+ case common::INTERVALYEAR:
+ return new NullableValueVectorTyped<IntervalYearHolder,
+ ValueVectorTypedComposite<IntervalYearHolder> >(b,f.getValueCount());
+ case common::BIT:
+ return new NullableValueVectorTyped<uint8_t,
+ ValueVectorBit >(b,f.getValueCount());
+ case common::VARBINARY:
+ //TODO: Varbinary is untested
+ return new NullableValueVectorTyped<VarWidthHolder, ValueVectorVarBinary >(b,f.getValueCount());
+ case common::VARCHAR:
+ return new NullableValueVectorTyped<VarWidthHolder, ValueVectorVarChar >(b,f.getValueCount());
+ // not implemented yet
+ default:
+ return new ValueVectorUnimplemented(b, f.getValueCount());
+ }
+ case common::DM_REPEATED:
+ switch (type) {
+ // not implemented yet
+ default:
+ return new ValueVectorUnimplemented(b, f.getValueCount());
+ }
+ }
+ return new ValueVectorUnimplemented(b, f.getValueCount());
+}
+
+
+ret_t FieldBatch::load(){
+ const Drill::FieldMetadata& fmd = this->m_fieldMetadata;
+ this->m_pValueVector=ValueVectorFactory::allocateValueVector(fmd, this->m_pFieldData);
+ return RET_SUCCESS;
+}
+
+ret_t RecordBatch::build(){
+ // For every Field, get the corresponding SlicedByteBuf.
+ // Create a Materialized field. Set the Sliced Byted Buf to the correct slice.
+ // Set the Field Metadata.
+ // Load the vector.(Load creates a valuevector object of the correct type:
+ // Use ValueVectorFactory(type) to create the right type.
+ // Create a Value Vector of the Sliced Byte Buf.
+ // Add the field batch to vector
+ size_t startOffset=0;
+ //TODO: handle schema changes here. Call a client provided callback?
+ for(int i=0; i<this->m_numFields; i++){
+ const exec::shared::SerializedField f=this->m_pRecordBatchDef->field(i);
+ //TODO: free this??
+ Drill::FieldMetadata* pFmd = new Drill::FieldMetadata;
+ pFmd->set(f);
+ size_t len=pFmd->getBufferLength();
+ FieldBatch* pField = new FieldBatch(*pFmd, this->m_buffer, startOffset, len) ;
+ startOffset+=len;
+ pField->load(); // set up the value vectors
+ this->m_fields.push_back(pField);
+ this->m_fieldDefs.push_back(pFmd);
+ }
+ return RET_SUCCESS;
+}
+
+void RecordBatch::print(std::ostream& s, size_t num){
+ std::string nameList;
+ for(std::vector<FieldBatch*>::size_type i = 0; i != this->m_fields.size(); i++) {
+ Drill::FieldMetadata fmd=this->getFieldMetadata(i);
+ std::string name= fmd.getName();
+ nameList+=name;
+ nameList+=" ";
+ }
+ size_t numToPrint=this->m_numRecords;
+ if(num>0 && num<numToPrint)numToPrint=num;
+ s<<nameList<<std::endl;
+ std::string values;
+ for(size_t n=0; n<numToPrint; n++){
+ values="";
+ for(std::vector<FieldBatch*>::size_type i = 0; i != this->m_fields.size(); i++) {
+ const ValueVectorBase * v = m_fields[i]->getVector();
+ char valueBuf[1024+1];
+ memset(valueBuf, 0, sizeof(valueBuf)*sizeof(char));
+ if(v->isNull(n)){
+ strncpy(valueBuf,"null", (sizeof(valueBuf)-1)*sizeof(char));
+ } else{
+ v->getValueAt(n, valueBuf, (sizeof(valueBuf)-1)*sizeof(char));
+ }
+ values+=valueBuf;
+ values+=" ";
+ }
+ s<<values<<std::endl;
+ }
+}
+
+void DateHolder::load(){
+ m_year=1970;
+ m_month=1;
+ m_day=1;
+
+ time_t t= m_datetime/1000; // number of seconds since beginning of the Unix Epoch.
+ struct tm * tm = gmtime(&t);
+ m_year=tm->tm_year+1900;
+ m_month=tm->tm_mon+1;
+ m_day=tm->tm_mday;
+}
+
+std::string DateHolder::toString(){
+ std::stringstream sstr;
+ sstr << m_year << "-" << m_month << "-" << m_day;
+ return sstr.str();
+};
+
+void TimeHolder::load(){
+ m_hr=0;
+ m_min=0;
+ m_sec=0;
+ m_msec=0;
+
+ time_t t= m_datetime/1000; // number of seconds since beginning of the Unix Epoch.
+ struct tm * tm = gmtime(&t);
+ m_hr=tm->tm_hour;
+ m_min=tm->tm_min;
+ m_sec=tm->tm_sec;
+ m_msec=m_datetime%1000;
+}
+
+std::string TimeHolder::toString(){
+ std::stringstream sstr;
+ sstr << m_hr <<":" << m_min<<":"<<m_sec<<"."<<m_msec;
+ return sstr.str();
+};
+
+void DateTimeHolder::load(){
+ m_year=1970;
+ m_month=1;
+ m_day=1;
+ m_hr=0;
+ m_min=0;
+ m_sec=0;
+ m_msec=0;
+
+ time_t t= m_datetime/1000; // number of seconds since beginning of the Unix Epoch.
+ struct tm * tm = gmtime(&t);
+ m_year=tm->tm_year+1900;
+ m_month=tm->tm_mon+1;
+ m_day=tm->tm_mday;
+ m_hr=tm->tm_hour;
+ m_min=tm->tm_min;
+ m_sec=tm->tm_sec;
+ m_msec=m_datetime%1000;
+}
+
+std::string DateTimeHolder::toString(){
+ //TODO: Allow config flag to set delimiter
+ std::stringstream sstr;
+ sstr << m_year << "-" << m_month << "-" << m_day << " " << m_hr <<":" << m_min<<":"<<m_sec<<"."<<m_msec;
+ return sstr.str();
+};
+
+void DateTimeTZHolder::load(){
+ DateTimeHolder::load();
+}
+
+std::string DateTimeTZHolder::toString(){
+ std::stringstream sstr;
+ sstr << m_year << "-" << m_month << "-" << m_day << " " << m_hr <<":" << m_min<<":"<<m_sec<<"."<<m_msec;
+ sstr << "["<<timezoneMap[m_tzIndex]<<"]";
+ return sstr.str();
+};
+
+std::string IntervalYearHolder::toString(){
+ std::stringstream sstr;
+
+ uint32_t years = (m_month / YEARS_TO_MONTHS);
+ uint32_t months = (m_month % YEARS_TO_MONTHS);
+
+ sstr << years << "-" << months;
+ return sstr.str();
+};
+
+std::string IntervalDayHolder::toString(){
+ std::stringstream sstr;
+
+ uint32_t hours = m_ms / (HOURS_TO_MILLIS);
+ uint32_t millis = m_ms % (HOURS_TO_MILLIS);
+
+ uint32_t minutes = millis / (MINUTES_TO_MILLIS);
+ millis = millis % (MINUTES_TO_MILLIS);
+
+ uint32_t seconds = millis / (SECONDS_TO_MILLIS);
+ millis = millis % (SECONDS_TO_MILLIS);
+
+ sstr << m_day<< " " << hours << ":"<<minutes<<":"<<seconds<<"."<<millis;
+ return sstr.str();
+};
+
+std::string IntervalHolder::toString(){
+ std::stringstream sstr;
+
+ uint32_t years = (m_month / YEARS_TO_MONTHS);
+ uint32_t months = (m_month % YEARS_TO_MONTHS);
+
+ uint32_t hours = m_ms / (HOURS_TO_MILLIS);
+ uint32_t millis = m_ms % (HOURS_TO_MILLIS);
+
+ uint32_t minutes = millis / (MINUTES_TO_MILLIS);
+ millis = millis % (MINUTES_TO_MILLIS);
+
+ uint32_t seconds = millis / (SECONDS_TO_MILLIS);
+ millis = millis % (SECONDS_TO_MILLIS);
+
+ sstr << years << "-" << months<< "-" << m_day<< " " << hours << ":"<<minutes<<":"<<seconds<<"."<<millis;
+ return sstr.str();
+};
+
+}// namespace Drill
diff --git a/contrib/native/client/src/clientlib/rpcDecoder.cpp b/contrib/native/client/src/clientlib/rpcDecoder.cpp
new file mode 100644
index 000000000..6fb9c249d
--- /dev/null
+++ b/contrib/native/client/src/clientlib/rpcDecoder.cpp
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <iostream>
+#include <google/protobuf/io/coded_stream.h>
+#include "drill/common.hpp"
+#include "rpcEncoder.hpp"
+#include "rpcDecoder.hpp"
+#include "rpcMessage.hpp"
+
+namespace Drill{
+
+// return the number of bytes we have read
+int RpcDecoder::LengthDecode(const uint8_t* buf, uint32_t* p_length) {
+
+ using google::protobuf::io::CodedInputStream;
+
+ // read the frame to get the length of the message and then
+
+ CodedInputStream* cis = new CodedInputStream(buf, 5); // read 5 bytes at most
+
+ int pos0 = cis->CurrentPosition(); // for debugging
+ cis->ReadVarint32(p_length);
+
+ #ifdef CODER_DEBUG
+ cerr << "p_length = " << *p_length << endl;
+ #endif
+
+ int pos1 = cis->CurrentPosition();
+
+ #ifdef CODER_DEBUG
+ cerr << "Reading full length " << *p_length << endl;
+ #endif
+ assert( (pos1-pos0) == getRawVarintSize(*p_length));
+ return (pos1-pos0);
+}
+
+// TODO: error handling
+//
+// - assume that the entire message is in the buffer and the buffer is constrained to this message
+// - easy to handle with raw arry in C++
+int RpcDecoder::Decode(const uint8_t* buf, int length, InBoundRpcMessage& msg) {
+ using google::protobuf::io::CodedInputStream;
+
+ // if(!ctx.channel().isOpen()){ return; }
+
+ #ifdef EXTRA_DEBUGGING
+ std::cerr << "\nInbound rpc message received." << std::endl;
+ #endif
+
+ CodedInputStream* cis = new CodedInputStream(buf, length);
+
+
+ int pos0 = cis->CurrentPosition(); // for debugging
+
+ int len_limit = cis->PushLimit(length);
+
+ uint32_t header_length = 0;
+ cis->ExpectTag(RpcEncoder::HEADER_TAG);
+ cis->ReadVarint32(&header_length);
+
+ #ifdef CODER_DEBUG
+ cerr << "Reading header length " << header_length << ", post read index " << cis->CurrentPosition() << endl;
+ #endif
+
+ exec::rpc::RpcHeader header;
+ int header_limit = cis->PushLimit(header_length);
+ header.ParseFromCodedStream(cis);
+ cis->PopLimit(header_limit);
+ msg.m_mode = header.mode();
+ msg.m_coord_id = header.coordination_id();
+ msg.m_rpc_type = header.rpc_type();
+
+ //if(RpcConstants.EXTRA_DEBUGGING) logger.debug(" post header read index {}", buffer.readerIndex());
+
+ // read the protobuf body into a buffer.
+ cis->ExpectTag(RpcEncoder::PROTOBUF_BODY_TAG);
+ uint32_t p_body_length = 0;
+ cis->ReadVarint32(&p_body_length);
+
+ #ifdef CODER_DEBUG
+ cerr << "Reading protobuf body length " << p_body_length << ", post read index " << cis->CurrentPosition() << endl;
+ #endif
+
+ msg.m_pbody.resize(p_body_length);
+ cis->ReadRaw(msg.m_pbody.data(),p_body_length);
+
+
+ // read the data body.
+ if (cis->BytesUntilLimit() > 0 ) {
+ #ifdef CODER_DEBUG
+ cerr << "Reading raw body, buffer has "<< cis->BytesUntilLimit() << " bytes available, current possion "<< cis->CurrentPosition() << endl;
+ #endif
+ cis->ExpectTag(RpcEncoder::RAW_BODY_TAG);
+ uint32_t d_body_length = 0;
+ cis->ReadVarint32(&d_body_length);
+
+ if(cis->BytesUntilLimit() != d_body_length) {
+ #ifdef CODER_DEBUG
+ cerr << "Expected to receive a raw body of " << d_body_length << " bytes but received a buffer with " <<cis->BytesUntilLimit() << " bytes." << endl;
+ #endif
+ }
+ //msg.m_dbody.resize(d_body_length);
+ //cis->ReadRaw(msg.m_dbody.data(), d_body_length);
+ uint32_t currPos=cis->CurrentPosition();
+ cis->GetDirectBufferPointer((const void**)&msg.m_dbody, (int*)&d_body_length);
+ assert(msg.m_dbody==buf+currPos);
+ cis->Skip(d_body_length);
+ #ifdef CODER_DEBUG
+ cerr << "Read raw body of " << d_body_length << " bytes" << endl;
+ #endif
+ } else {
+ #ifdef CODER_DEBUG
+ cerr << "No need to read raw body, no readable bytes left." << endl;
+ #endif
+ }
+ cis->PopLimit(len_limit);
+
+
+ // return the rpc message.
+ // move the reader index forward so the next rpc call won't try to work with it.
+ // buffer.skipBytes(dBodyLength);
+ // messageCounter.incrementAndGet();
+ #ifdef CODER_DEBUG
+ cerr << "Inbound Rpc Message Decoded " << msg << endl;
+ #endif
+
+ int pos1 = cis->CurrentPosition();
+ assert((pos1-pos0) == length);
+ return (pos1-pos0);
+}
+
+}//namespace Drill
diff --git a/contrib/native/client/src/clientlib/rpcDecoder.hpp b/contrib/native/client/src/clientlib/rpcDecoder.hpp
new file mode 100644
index 000000000..dca49f7ed
--- /dev/null
+++ b/contrib/native/client/src/clientlib/rpcDecoder.hpp
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef RPC_DECODER_H
+#define RPC_DECODER_H
+
+#include "rpcMessage.hpp"
+
+namespace Drill {
+
+class RpcDecoder {
+ public:
+ RpcDecoder() { }
+ ~RpcDecoder() { }
+ // bool Decode(const DataBuf& buf);
+ // bool Decode(const DataBuf& buf, InBoundRpcMessage& msg);
+ static int LengthDecode(const uint8_t* buf, uint32_t* length); // read the length prefix (at most 4 bytes)
+ static int Decode(const uint8_t* buf, int length, InBoundRpcMessage& msg);
+};
+
+} // namespace Drill
+#endif
diff --git a/contrib/native/client/src/clientlib/rpcEncoder.cpp b/contrib/native/client/src/clientlib/rpcEncoder.cpp
new file mode 100644
index 000000000..5d28a339e
--- /dev/null
+++ b/contrib/native/client/src/clientlib/rpcEncoder.cpp
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
+#include <google/protobuf/message_lite.h>
+#include <google/protobuf/wire_format_lite.h>
+
+#include "drill/common.hpp"
+#include "rpcEncoder.hpp"
+#include "rpcMessage.hpp"
+
+namespace Drill{
+
+using google::protobuf::internal::WireFormatLite;
+using exec::rpc::CompleteRpcMessage;
+
+const uint32_t RpcEncoder::HEADER_TAG = WireFormatLite::MakeTag(CompleteRpcMessage::kHeaderFieldNumber, WireFormatLite::WIRETYPE_LENGTH_DELIMITED);
+const uint32_t RpcEncoder::PROTOBUF_BODY_TAG = WireFormatLite::MakeTag(CompleteRpcMessage::kProtobufBodyFieldNumber, WireFormatLite::WIRETYPE_LENGTH_DELIMITED);
+const uint32_t RpcEncoder::RAW_BODY_TAG = WireFormatLite::MakeTag(CompleteRpcMessage::kRawBodyFieldNumber, WireFormatLite::WIRETYPE_LENGTH_DELIMITED);
+const uint32_t RpcEncoder::HEADER_TAG_LENGTH = getRawVarintSize(HEADER_TAG);
+const uint32_t RpcEncoder::PROTOBUF_BODY_TAG_LENGTH = getRawVarintSize(PROTOBUF_BODY_TAG);
+const uint32_t RpcEncoder::RAW_BODY_TAG_LENGTH = getRawVarintSize(RAW_BODY_TAG);
+
+
+bool RpcEncoder::Encode(DataBuf& buf, OutBoundRpcMessage& msg) {
+ using exec::rpc::RpcHeader;
+ using google::protobuf::io::CodedOutputStream;
+ using google::protobuf::io::ArrayOutputStream;
+ // Todo:
+ //
+ // - let a context manager to allocate a buffer `ByteBuf buf = ctx.alloc().buffer();`
+ // - builder pattern
+ //
+ #ifdef CODER_DEBUG
+ cerr << "\nEncoding outbound message " << msg << endl;
+ #endif
+
+ RpcHeader header;
+ header.set_mode(msg.m_mode);
+ header.set_coordination_id(msg.m_coord_id);
+ header.set_rpc_type(msg.m_rpc_type);
+
+ // calcute the length of the message
+ int header_length = header.ByteSize();
+ int proto_body_length = msg.m_pbody->ByteSize();
+ int full_length = HEADER_TAG_LENGTH + getRawVarintSize(header_length) + header_length + \
+ PROTOBUF_BODY_TAG_LENGTH + getRawVarintSize(proto_body_length) + proto_body_length;
+
+ /*
+ if(raw_body_length > 0) {
+ full_length += (RAW_BODY_TAG_LENGTH + getRawVarintSize(raw_body_length) + raw_body_length);
+ }
+ */
+
+ buf.resize(full_length + getRawVarintSize(full_length));
+ ArrayOutputStream* os = new ArrayOutputStream(buf.data(), buf.size());
+ CodedOutputStream* cos = new CodedOutputStream(os);
+
+
+ #ifdef CODER_DEBUG
+ cerr << "Writing full length " << full_length << endl;
+ #endif
+
+ // write full length first (this is length delimited stream).
+ cos->WriteVarint32(full_length);
+
+ #ifdef CODER_DEBUG
+ cerr << "Writing header length " << header_length << endl;
+ #endif
+
+ cos->WriteVarint32(HEADER_TAG);
+ cos->WriteVarint32(header_length);
+
+ header.SerializeToCodedStream(cos);
+
+ // write protobuf body length and body
+ #ifdef CODER_DEBUG
+ cerr << "Writing protobuf body length " << proto_body_length << endl;
+ #endif
+
+ cos->WriteVarint32(PROTOBUF_BODY_TAG);
+ cos->WriteVarint32(proto_body_length);
+ msg.m_pbody->SerializeToCodedStream(cos);
+
+ // Done! no read to write data body for client
+ return true;
+}
+
+} // namespace Drill
diff --git a/contrib/native/client/src/clientlib/rpcEncoder.hpp b/contrib/native/client/src/clientlib/rpcEncoder.hpp
new file mode 100644
index 000000000..a4a721613
--- /dev/null
+++ b/contrib/native/client/src/clientlib/rpcEncoder.hpp
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef RPC_ENCODER_H
+#define RPC_ENCODER_H
+
+#include "rpcMessage.hpp"
+
+namespace Drill {
+
+class RpcEncoder {
+ public:
+ RpcEncoder() {}
+ ~RpcEncoder() { }
+ bool Encode(DataBuf& buf,OutBoundRpcMessage& msg);
+ static const uint32_t HEADER_TAG;
+ static const uint32_t PROTOBUF_BODY_TAG;
+ static const uint32_t RAW_BODY_TAG;
+ static const uint32_t HEADER_TAG_LENGTH;
+ static const uint32_t PROTOBUF_BODY_TAG_LENGTH;
+ static const uint32_t RAW_BODY_TAG_LENGTH;
+};
+
+// copy from java code
+inline int getRawVarintSize(uint32_t value) {
+ int count = 0;
+ while (true) {
+ if ((value & ~0x7F) == 0) {
+ count++;
+ return count;
+ } else {
+ count++;
+ value >>= 7;
+ }
+ }
+}
+
+} // namespace Drill
+#endif
diff --git a/contrib/native/client/src/clientlib/rpcMessage.hpp b/contrib/native/client/src/clientlib/rpcMessage.hpp
new file mode 100644
index 000000000..fa92c4236
--- /dev/null
+++ b/contrib/native/client/src/clientlib/rpcMessage.hpp
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef RPC_MESSAGE_H
+#define RPC_MESSAGE_H
+
+#include <ostream>
+#include <google/protobuf/message_lite.h>
+#include "GeneralRPC.pb.h"
+
+namespace Drill {
+
+class InBoundRpcMessage {
+ public:
+ exec::rpc::RpcMode m_mode;
+ int m_rpc_type;
+ int m_coord_id;
+ DataBuf m_pbody;
+ ByteBuf_t m_dbody;
+};
+
+class OutBoundRpcMessage {
+ public:
+ exec::rpc::RpcMode m_mode;
+ int m_rpc_type;
+ int m_coord_id;
+ const google::protobuf::MessageLite* m_pbody;
+ OutBoundRpcMessage(exec::rpc::RpcMode mode, int rpc_type, int coord_id, const google::protobuf::MessageLite* pbody):
+ m_mode(mode), m_rpc_type(rpc_type), m_coord_id(coord_id), m_pbody(pbody) { }
+};
+
+}
+
+#endif
diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp
new file mode 100644
index 000000000..436805861
--- /dev/null
+++ b/contrib/native/client/src/include/drill/common.hpp
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _COMMON_H_
+#define _COMMON_H_
+
+#include <stdint.h>
+#include <string>
+#include <vector>
+
+#define LENGTH_PREFIX_MAX_LENGTH 5
+#define LEN_PREFIX_BUFLEN LENGTH_PREFIX_MAX_LENGTH
+
+#ifdef _DEBUG
+#define EXTRA_DEBUGGING
+#define CODER_DEBUGGING
+#endif
+
+namespace Drill {
+
+typedef std::vector<uint8_t> DataBuf;
+
+typedef uint8_t Byte_t;
+typedef Byte_t * ByteBuf_t;
+
+typedef enum{
+ QRY_SUCCESS=0,
+ QRY_FAILURE=1,
+ QRY_SUCCESS_WITH_INFO=2,
+ QRY_NO_MORE_DATA=3,
+ QRY_CANCEL=4,
+ QRY_OUT_OF_BOUNDS=5,
+ QRY_CLIENT_OUTOFMEM=6,
+ QRY_INTERNAL_ERROR=7,
+ QRY_COMM_ERROR=8
+} status_t;
+
+typedef enum{
+ CONN_SUCCESS=0,
+ CONN_FAILURE=1,
+ CONN_HANDSHAKE_FAILED=2,
+ CONN_INVALID_INPUT=3,
+ CONN_ZOOKEEPER_ERROR=4
+} connectionStatus_t;
+
+typedef enum{
+ LOG_TRACE=0,
+ LOG_DEBUG=1,
+ LOG_INFO=2,
+ LOG_WARNING=3,
+ LOG_ERROR=4,
+ LOG_FATAL=5
+} logLevel_t;
+
+typedef enum{
+ CAT_CONN=0,
+ CAT_QUERY=1
+} errCategory_t;
+
+typedef enum{
+ RET_SUCCESS=0,
+ RET_FAILURE=1
+} ret_t;
+
+} // namespace Drill
+
+#endif
+
diff --git a/contrib/native/client/src/include/drill/decimalUtils.hpp b/contrib/native/client/src/include/drill/decimalUtils.hpp
new file mode 100644
index 000000000..5f56e4d46
--- /dev/null
+++ b/contrib/native/client/src/include/drill/decimalUtils.hpp
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _DECIMAL_UTILS_H
+#define _DECIMAL_UTILS_H
+
+#include <boost/multiprecision/cpp_int.hpp>
+
+namespace Drill {
+
+class SlicedByteBuf;
+
+struct DecimalValue
+{
+ DecimalValue() :
+ m_unscaledValue(0),
+ m_scale(0)
+ {
+ ;
+ }
+
+ DecimalValue(int32_t val, int32_t scale) : m_unscaledValue(val), m_scale(scale){ }
+ DecimalValue(int64_t val, int32_t scale) : m_unscaledValue(val), m_scale(scale){ }
+ boost::multiprecision::cpp_int m_unscaledValue;
+ int32_t m_scale;
+};
+
+// These functions need not be exported. They are used by the templates that return the DecimalValue class.
+DecimalValue getDecimalValueFromByteBuf(SlicedByteBuf& data, size_t startIndex, int nDecimalDigits, int scale, bool truncateScale);
+DecimalValue getDecimalValueFromDense(SlicedByteBuf& data, size_t startIndex, int nDecimalDigits, int scale, int maxPrecision, int width);
+
+inline DecimalValue getDecimalValueFromIntermediate(SlicedByteBuf& data, size_t startIndex, int nDecimalDigits, int scale)
+{
+ // In the intermediate representation, we don't pad the scale with zeros. Set truncate to false.
+ return getDecimalValueFromByteBuf(data, startIndex, nDecimalDigits, scale, false);
+}
+
+inline DecimalValue getDecimalValueFromSparse(SlicedByteBuf& data, size_t startIndex, int nDecimalDigits, int scale)
+{
+ // In the sparse representation, we pad the scale with zeroes for ease of arithmetic. Set truncate to true.
+ return getDecimalValueFromByteBuf(data, startIndex, nDecimalDigits, scale, true);
+}
+
+} // namespace Drill
+#endif
diff --git a/contrib/native/client/src/include/drill/drillClient.hpp b/contrib/native/client/src/include/drill/drillClient.hpp
new file mode 100644
index 000000000..0e85dcc93
--- /dev/null
+++ b/contrib/native/client/src/include/drill/drillClient.hpp
@@ -0,0 +1,230 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef DRILL_CLIENT_H
+#define DRILL_CLIENT_H
+
+#include <vector>
+#include <boost/log/core.hpp>
+#include <boost/log/trivial.hpp>
+#include <boost/thread.hpp>
+#include "drill/common.hpp"
+#include "drill/protobuf/User.pb.h"
+
+
+#if defined _WIN32 || defined __CYGWIN__
+ #ifdef DRILL_CLIENT_EXPORTS
+ #define DECLSPEC_DRILL_CLIENT __declspec(dllexport)
+ #else
+ #ifdef USE_STATIC_LIBDRILL
+ #define DECLSPEC_DRILL_CLIENT
+ #else
+ #define DECLSPEC_DRILL_CLIENT __declspec(dllimport)
+ #endif
+ #endif
+#else
+ #if __GNUC__ >= 4
+ #define DECLSPEC_DRILL_CLIENT __attribute__ ((visibility ("default")))
+ #else
+ #define DECLSPEC_DRILL_CLIENT
+ #endif
+#endif
+
+namespace Drill {
+
+//struct UserServerEndPoint;
+class DrillClientImpl;
+class DrillClientQueryResult;
+class FieldMetadata;
+class RecordBatch;
+class SchemaDef;
+
+class DECLSPEC_DRILL_CLIENT DrillClientError{
+ public:
+ static const uint32_t CONN_ERROR_START = 100;
+ static const uint32_t QRY_ERROR_START = 200;
+
+ DrillClientError(uint32_t s, uint32_t e, char* m){status=s; errnum=e; msg=m;};
+ DrillClientError(uint32_t s, uint32_t e, std::string m){status=s; errnum=e; msg=m;};
+
+ static DrillClientError* getErrorObject(const exec::shared::DrillPBError& e);
+
+ // To get the error number we add a error range start number to
+ // the status code returned (either status_t or connectionStatus_t)
+ uint32_t status; // could be either status_t or connectionStatus_t
+ uint32_t errnum;
+ std::string msg;
+};
+
+// Only one instance of this class exists. A static member of DrillClientImpl;
+class DECLSPEC_DRILL_CLIENT DrillClientInitializer{
+ public:
+ DrillClientInitializer();
+ ~DrillClientInitializer();
+};
+
+// Only one instance of this class exists. A static member of DrillClientImpl;
+class DECLSPEC_DRILL_CLIENT DrillClientConfig{
+ public:
+ DrillClientConfig();
+ static void initLogging(const char* path);
+ static void setLogLevel(logLevel_t l);
+ static void setBufferLimit(uint64_t l);
+ static uint64_t getBufferLimit();
+ static logLevel_t getLogLevel();
+ private:
+ // The logging level
+ static logLevel_t s_logLevel;
+ // The total amount of memory to be allocated by an instance of DrillClient.
+ // For future use. Currently, not enforced.
+ static uint64_t s_bufferLimit;
+ static boost::mutex s_mutex;
+};
+
+
+/*
+ * Handle to the Query submitted for execution.
+ * */
+typedef void* QueryHandle_t;
+
+/*
+ * Query Results listener callback. This function is called for every record batch after it has
+ * been received and decoded. The listener function should return a status.
+ * If the listener returns failure, the query will be canceled.
+ *
+ * DrillClientQueryResult will hold a listener & listener contxt for the call back function
+ */
+typedef status_t (*pfnQueryResultsListener)(QueryHandle_t ctx, RecordBatch* b, DrillClientError* err);
+
+/*
+ * The schema change listener callback. This function is called if the record batch detects a
+ * change in the schema. The client application can call getColDefs in the RecordIterator or
+ * get the field information from the RecordBatch itself and handle the change appropriately.
+ */
+typedef uint32_t (*pfnSchemaListener)(void* ctx, SchemaDef* s, DrillClientError* err);
+
+/*
+ * A Record Iterator instance is returned by the SubmitQuery class. Calls block until some data
+ * is available, or until all data has been returned.
+ */
+
+class DECLSPEC_DRILL_CLIENT RecordIterator{
+ friend class DrillClient;
+ public:
+
+ ~RecordIterator();
+ /*
+ * Returns a vector of column(i.e. field) definitions. The returned reference is guaranteed to be valid till the
+ * end of the query or until a schema change event is received. If a schema change event is received by the
+ * application, the application should discard the reference it currently holds and call this function again.
+ */
+ std::vector<Drill::FieldMetadata*>& getColDefs();
+
+ /* Move the current pointer to the next record. */
+ status_t next();
+
+ /* Gets the ith column in the current record. */
+ status_t getCol(size_t i, void** b, size_t* sz);
+
+ /* true if ith column in the current record is NULL */
+ bool isNull(size_t i);
+
+ /* Cancels the query. */
+ status_t cancel();
+
+ void registerSchemaChangeListener(pfnSchemaListener* l);
+
+ /*
+ * Returns the last error message
+ */
+ std::string& getError();
+
+ private:
+ RecordIterator(DrillClientQueryResult* pResult){
+ this->m_currentRecord=-1;
+ this->m_pCurrentRecordBatch=NULL;
+ this->m_pQueryResult=pResult;
+ m_pColDefs=NULL;
+ }
+
+ DrillClientQueryResult* m_pQueryResult;
+ size_t m_currentRecord;
+ RecordBatch* m_pCurrentRecordBatch;
+ boost::mutex m_recordBatchMutex;
+ std::vector<Drill::FieldMetadata*>* m_pColDefs; // Copy of the latest column defs made from the
+ // first record batch with this definition
+};
+
+class DECLSPEC_DRILL_CLIENT DrillClient{
+ public:
+ DrillClient();
+ ~DrillClient();
+
+ // change the logging level
+ static void initLogging(const char* path, logLevel_t l);
+
+ /* connects the client to a Drillbit UserServer. */
+ connectionStatus_t connect(const char* connectStr);
+
+ /* test whether the client is active */
+ bool isActive();
+
+ /* close the connection. cancel any pending requests. */
+ void close() ;
+
+ /*
+ * Submit a query asynchronously and wait for results to be returned thru a callback. A query context handle is passed
+ * back. The listener callback will return the handle in the ctx parameter.
+ */
+ status_t submitQuery(exec::user::QueryType t, const std::string& plan, pfnQueryResultsListener listener, void* listenerCtx, QueryHandle_t* qHandle);
+
+ /*
+ * Submit a query asynchronously and wait for results to be returned thru an iterator that returns
+ * results synchronously. The client app needs to call delete on the iterator when done.
+ */
+ RecordIterator* submitQuery(exec::user::QueryType t, const std::string& plan, DrillClientError* err);
+
+ /*
+ * The client application should call this function to wait for results if it has registered a
+ * listener.
+ */
+ void waitForResults();
+
+ /*
+ * Returns the last error message
+ */
+ std::string& getError();
+
+ /*
+ * Applications using the async query submit method should call freeQueryResources to free up resources
+ * once the query is no longer being processed.
+ * */
+ void freeQueryResources(QueryHandle_t* handle);
+ void freeQueryIterator(RecordIterator** pIter){ delete *pIter; *pIter=NULL;};
+
+ private:
+ static DrillClientInitializer s_init;
+ static DrillClientConfig s_config;
+
+ DrillClientImpl * m_pImpl;
+};
+
+} // namespace Drill
+
+#endif
diff --git a/contrib/native/client/src/include/drill/drillc.hpp b/contrib/native/client/src/include/drill/drillc.hpp
new file mode 100644
index 000000000..e5a0d33de
--- /dev/null
+++ b/contrib/native/client/src/include/drill/drillc.hpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DRILL_CLIENT__ALL_H
+#define DRILL_CLIENT_ALL_H
+
+#include "drill/common.hpp"
+#include "drill/drillClient.hpp"
+#include "drill/recordBatch.hpp"
+#include "Types.pb.h"
+#include "User.pb.h"
+
+#endif
+
diff --git a/contrib/native/client/src/include/drill/protobuf/Types.pb.h b/contrib/native/client/src/include/drill/protobuf/Types.pb.h
new file mode 100644
index 000000000..853415317
--- /dev/null
+++ b/contrib/native/client/src/include/drill/protobuf/Types.pb.h
@@ -0,0 +1,409 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Types.proto
+
+#ifndef PROTOBUF_Types_2eproto__INCLUDED
+#define PROTOBUF_Types_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace common {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_Types_2eproto();
+void protobuf_AssignDesc_Types_2eproto();
+void protobuf_ShutdownFile_Types_2eproto();
+
+class MajorType;
+
+enum MinorType {
+ LATE = 0,
+ MAP = 1,
+ TINYINT = 3,
+ SMALLINT = 4,
+ INT = 5,
+ BIGINT = 6,
+ DECIMAL9 = 7,
+ DECIMAL18 = 8,
+ DECIMAL28SPARSE = 9,
+ DECIMAL38SPARSE = 10,
+ MONEY = 11,
+ DATE = 12,
+ TIME = 13,
+ TIMETZ = 14,
+ TIMESTAMPTZ = 15,
+ TIMESTAMP = 16,
+ INTERVAL = 17,
+ FLOAT4 = 18,
+ FLOAT8 = 19,
+ BIT = 20,
+ FIXEDCHAR = 21,
+ FIXED16CHAR = 22,
+ FIXEDBINARY = 23,
+ VARCHAR = 24,
+ VAR16CHAR = 25,
+ VARBINARY = 26,
+ UINT1 = 29,
+ UINT2 = 30,
+ UINT4 = 31,
+ UINT8 = 32,
+ DECIMAL28DENSE = 33,
+ DECIMAL38DENSE = 34,
+ DM_UNKNOWN = 37,
+ INTERVALYEAR = 38,
+ INTERVALDAY = 39,
+ LIST = 40
+};
+bool MinorType_IsValid(int value);
+const MinorType MinorType_MIN = LATE;
+const MinorType MinorType_MAX = LIST;
+const int MinorType_ARRAYSIZE = MinorType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* MinorType_descriptor();
+inline const ::std::string& MinorType_Name(MinorType value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ MinorType_descriptor(), value);
+}
+inline bool MinorType_Parse(
+ const ::std::string& name, MinorType* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<MinorType>(
+ MinorType_descriptor(), name, value);
+}
+enum DataMode {
+ DM_OPTIONAL = 0,
+ DM_REQUIRED = 1,
+ DM_REPEATED = 2
+};
+bool DataMode_IsValid(int value);
+const DataMode DataMode_MIN = DM_OPTIONAL;
+const DataMode DataMode_MAX = DM_REPEATED;
+const int DataMode_ARRAYSIZE = DataMode_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* DataMode_descriptor();
+inline const ::std::string& DataMode_Name(DataMode value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ DataMode_descriptor(), value);
+}
+inline bool DataMode_Parse(
+ const ::std::string& name, DataMode* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<DataMode>(
+ DataMode_descriptor(), name, value);
+}
+// ===================================================================
+
+class MajorType : public ::google::protobuf::Message {
+ public:
+ MajorType();
+ virtual ~MajorType();
+
+ MajorType(const MajorType& from);
+
+ inline MajorType& operator=(const MajorType& 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 MajorType& default_instance();
+
+ void Swap(MajorType* other);
+
+ // implements Message ----------------------------------------------
+
+ MajorType* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const MajorType& from);
+ void MergeFrom(const MajorType& 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 .common.MinorType minor_type = 1;
+ inline bool has_minor_type() const;
+ inline void clear_minor_type();
+ static const int kMinorTypeFieldNumber = 1;
+ inline ::common::MinorType minor_type() const;
+ inline void set_minor_type(::common::MinorType value);
+
+ // optional .common.DataMode mode = 2;
+ inline bool has_mode() const;
+ inline void clear_mode();
+ static const int kModeFieldNumber = 2;
+ inline ::common::DataMode mode() const;
+ inline void set_mode(::common::DataMode value);
+
+ // optional int32 width = 3;
+ inline bool has_width() const;
+ inline void clear_width();
+ static const int kWidthFieldNumber = 3;
+ inline ::google::protobuf::int32 width() const;
+ inline void set_width(::google::protobuf::int32 value);
+
+ // optional int32 precision = 4;
+ inline bool has_precision() const;
+ inline void clear_precision();
+ static const int kPrecisionFieldNumber = 4;
+ inline ::google::protobuf::int32 precision() const;
+ inline void set_precision(::google::protobuf::int32 value);
+
+ // optional int32 scale = 5;
+ inline bool has_scale() const;
+ inline void clear_scale();
+ static const int kScaleFieldNumber = 5;
+ inline ::google::protobuf::int32 scale() const;
+ inline void set_scale(::google::protobuf::int32 value);
+
+ // optional int32 timeZone = 6;
+ inline bool has_timezone() const;
+ inline void clear_timezone();
+ static const int kTimeZoneFieldNumber = 6;
+ inline ::google::protobuf::int32 timezone() const;
+ inline void set_timezone(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:common.MajorType)
+ private:
+ inline void set_has_minor_type();
+ inline void clear_has_minor_type();
+ inline void set_has_mode();
+ inline void clear_has_mode();
+ inline void set_has_width();
+ inline void clear_has_width();
+ inline void set_has_precision();
+ inline void clear_has_precision();
+ inline void set_has_scale();
+ inline void clear_has_scale();
+ inline void set_has_timezone();
+ inline void clear_has_timezone();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ int minor_type_;
+ int mode_;
+ ::google::protobuf::int32 width_;
+ ::google::protobuf::int32 precision_;
+ ::google::protobuf::int32 scale_;
+ ::google::protobuf::int32 timezone_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
+
+ friend void protobuf_AddDesc_Types_2eproto();
+ friend void protobuf_AssignDesc_Types_2eproto();
+ friend void protobuf_ShutdownFile_Types_2eproto();
+
+ void InitAsDefaultInstance();
+ static MajorType* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// MajorType
+
+// optional .common.MinorType minor_type = 1;
+inline bool MajorType::has_minor_type() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void MajorType::set_has_minor_type() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void MajorType::clear_has_minor_type() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void MajorType::clear_minor_type() {
+ minor_type_ = 0;
+ clear_has_minor_type();
+}
+inline ::common::MinorType MajorType::minor_type() const {
+ return static_cast< ::common::MinorType >(minor_type_);
+}
+inline void MajorType::set_minor_type(::common::MinorType value) {
+ assert(::common::MinorType_IsValid(value));
+ set_has_minor_type();
+ minor_type_ = value;
+}
+
+// optional .common.DataMode mode = 2;
+inline bool MajorType::has_mode() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void MajorType::set_has_mode() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void MajorType::clear_has_mode() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void MajorType::clear_mode() {
+ mode_ = 0;
+ clear_has_mode();
+}
+inline ::common::DataMode MajorType::mode() const {
+ return static_cast< ::common::DataMode >(mode_);
+}
+inline void MajorType::set_mode(::common::DataMode value) {
+ assert(::common::DataMode_IsValid(value));
+ set_has_mode();
+ mode_ = value;
+}
+
+// optional int32 width = 3;
+inline bool MajorType::has_width() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void MajorType::set_has_width() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void MajorType::clear_has_width() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void MajorType::clear_width() {
+ width_ = 0;
+ clear_has_width();
+}
+inline ::google::protobuf::int32 MajorType::width() const {
+ return width_;
+}
+inline void MajorType::set_width(::google::protobuf::int32 value) {
+ set_has_width();
+ width_ = value;
+}
+
+// optional int32 precision = 4;
+inline bool MajorType::has_precision() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void MajorType::set_has_precision() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void MajorType::clear_has_precision() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void MajorType::clear_precision() {
+ precision_ = 0;
+ clear_has_precision();
+}
+inline ::google::protobuf::int32 MajorType::precision() const {
+ return precision_;
+}
+inline void MajorType::set_precision(::google::protobuf::int32 value) {
+ set_has_precision();
+ precision_ = value;
+}
+
+// optional int32 scale = 5;
+inline bool MajorType::has_scale() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void MajorType::set_has_scale() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void MajorType::clear_has_scale() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void MajorType::clear_scale() {
+ scale_ = 0;
+ clear_has_scale();
+}
+inline ::google::protobuf::int32 MajorType::scale() const {
+ return scale_;
+}
+inline void MajorType::set_scale(::google::protobuf::int32 value) {
+ set_has_scale();
+ scale_ = value;
+}
+
+// optional int32 timeZone = 6;
+inline bool MajorType::has_timezone() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void MajorType::set_has_timezone() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void MajorType::clear_has_timezone() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void MajorType::clear_timezone() {
+ timezone_ = 0;
+ clear_has_timezone();
+}
+inline ::google::protobuf::int32 MajorType::timezone() const {
+ return timezone_;
+}
+inline void MajorType::set_timezone(::google::protobuf::int32 value) {
+ set_has_timezone();
+ timezone_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace common
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::common::MinorType>() {
+ return ::common::MinorType_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::common::DataMode>() {
+ return ::common::DataMode_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_Types_2eproto__INCLUDED
diff --git a/contrib/native/client/src/include/drill/protobuf/User.pb.h b/contrib/native/client/src/include/drill/protobuf/User.pb.h
new file mode 100644
index 000000000..3ed024963
--- /dev/null
+++ b/contrib/native/client/src/include/drill/protobuf/User.pb.h
@@ -0,0 +1,1944 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: User.proto
+
+#ifndef PROTOBUF_User_2eproto__INCLUDED
+#define PROTOBUF_User_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "SchemaDef.pb.h"
+#include "UserBitShared.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace user {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_User_2eproto();
+void protobuf_AssignDesc_User_2eproto();
+void protobuf_ShutdownFile_User_2eproto();
+
+class Property;
+class UserProperties;
+class UserToBitHandshake;
+class RequestResults;
+class RunQuery;
+class BitToUserHandshake;
+class NodeStatus;
+class QueryResult;
+
+enum QueryResult_QueryState {
+ QueryResult_QueryState_PENDING = 0,
+ QueryResult_QueryState_RUNNING = 1,
+ QueryResult_QueryState_COMPLETED = 2,
+ QueryResult_QueryState_CANCELED = 3,
+ QueryResult_QueryState_FAILED = 4,
+ QueryResult_QueryState_UNKNOWN_QUERY = 5
+};
+bool QueryResult_QueryState_IsValid(int value);
+const QueryResult_QueryState QueryResult_QueryState_QueryState_MIN = QueryResult_QueryState_PENDING;
+const QueryResult_QueryState QueryResult_QueryState_QueryState_MAX = QueryResult_QueryState_UNKNOWN_QUERY;
+const int QueryResult_QueryState_QueryState_ARRAYSIZE = QueryResult_QueryState_QueryState_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* QueryResult_QueryState_descriptor();
+inline const ::std::string& QueryResult_QueryState_Name(QueryResult_QueryState value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ QueryResult_QueryState_descriptor(), value);
+}
+inline bool QueryResult_QueryState_Parse(
+ const ::std::string& name, QueryResult_QueryState* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<QueryResult_QueryState>(
+ QueryResult_QueryState_descriptor(), name, value);
+}
+enum RpcType {
+ HANDSHAKE = 0,
+ ACK = 1,
+ GOODBYE = 2,
+ RUN_QUERY = 3,
+ CANCEL_QUERY = 4,
+ REQUEST_RESULTS = 5,
+ QUERY_RESULT = 6,
+ QUERY_HANDLE = 7,
+ REQ_META_FUNCTIONS = 8,
+ RESP_FUNCTION_LIST = 9
+};
+bool RpcType_IsValid(int value);
+const RpcType RpcType_MIN = HANDSHAKE;
+const RpcType RpcType_MAX = RESP_FUNCTION_LIST;
+const int RpcType_ARRAYSIZE = RpcType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor();
+inline const ::std::string& RpcType_Name(RpcType value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ RpcType_descriptor(), value);
+}
+inline bool RpcType_Parse(
+ const ::std::string& name, RpcType* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<RpcType>(
+ RpcType_descriptor(), name, value);
+}
+enum QueryType {
+ SQL = 1,
+ LOGICAL = 2,
+ PHYSICAL = 3
+};
+bool QueryType_IsValid(int value);
+const QueryType QueryType_MIN = SQL;
+const QueryType QueryType_MAX = PHYSICAL;
+const int QueryType_ARRAYSIZE = QueryType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* QueryType_descriptor();
+inline const ::std::string& QueryType_Name(QueryType value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ QueryType_descriptor(), value);
+}
+inline bool QueryType_Parse(
+ const ::std::string& name, QueryType* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<QueryType>(
+ QueryType_descriptor(), name, value);
+}
+enum QueryResultsMode {
+ STREAM_FULL = 1
+};
+bool QueryResultsMode_IsValid(int value);
+const QueryResultsMode QueryResultsMode_MIN = STREAM_FULL;
+const QueryResultsMode QueryResultsMode_MAX = STREAM_FULL;
+const int QueryResultsMode_ARRAYSIZE = QueryResultsMode_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* QueryResultsMode_descriptor();
+inline const ::std::string& QueryResultsMode_Name(QueryResultsMode value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ QueryResultsMode_descriptor(), value);
+}
+inline bool QueryResultsMode_Parse(
+ const ::std::string& name, QueryResultsMode* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<QueryResultsMode>(
+ QueryResultsMode_descriptor(), name, value);
+}
+// ===================================================================
+
+class Property : public ::google::protobuf::Message {
+ public:
+ Property();
+ virtual ~Property();
+
+ Property(const Property& from);
+
+ inline Property& operator=(const Property& 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 Property& default_instance();
+
+ void Swap(Property* other);
+
+ // implements Message ----------------------------------------------
+
+ Property* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Property& from);
+ void MergeFrom(const Property& 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 -------------------------------------------------------
+
+ // required string key = 1;
+ inline bool has_key() const;
+ inline void clear_key();
+ static const int kKeyFieldNumber = 1;
+ inline const ::std::string& key() const;
+ inline void set_key(const ::std::string& value);
+ inline void set_key(const char* value);
+ inline void set_key(const char* value, size_t size);
+ inline ::std::string* mutable_key();
+ inline ::std::string* release_key();
+ inline void set_allocated_key(::std::string* key);
+
+ // required string value = 2;
+ inline bool has_value() const;
+ inline void clear_value();
+ static const int kValueFieldNumber = 2;
+ inline const ::std::string& value() const;
+ inline void set_value(const ::std::string& value);
+ inline void set_value(const char* value);
+ inline void set_value(const char* value, size_t size);
+ inline ::std::string* mutable_value();
+ inline ::std::string* release_value();
+ inline void set_allocated_value(::std::string* value);
+
+ // @@protoc_insertion_point(class_scope:exec.user.Property)
+ private:
+ inline void set_has_key();
+ inline void clear_has_key();
+ inline void set_has_value();
+ inline void clear_has_value();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::std::string* key_;
+ ::std::string* value_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static Property* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class UserProperties : public ::google::protobuf::Message {
+ public:
+ UserProperties();
+ virtual ~UserProperties();
+
+ UserProperties(const UserProperties& from);
+
+ inline UserProperties& operator=(const UserProperties& 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 UserProperties& default_instance();
+
+ void Swap(UserProperties* other);
+
+ // implements Message ----------------------------------------------
+
+ UserProperties* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const UserProperties& from);
+ void MergeFrom(const UserProperties& 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 -------------------------------------------------------
+
+ // repeated .exec.user.Property properties = 1;
+ inline int properties_size() const;
+ inline void clear_properties();
+ static const int kPropertiesFieldNumber = 1;
+ inline const ::exec::user::Property& properties(int index) const;
+ inline ::exec::user::Property* mutable_properties(int index);
+ inline ::exec::user::Property* add_properties();
+ inline const ::google::protobuf::RepeatedPtrField< ::exec::user::Property >&
+ properties() const;
+ inline ::google::protobuf::RepeatedPtrField< ::exec::user::Property >*
+ mutable_properties();
+
+ // @@protoc_insertion_point(class_scope:exec.user.UserProperties)
+ private:
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::RepeatedPtrField< ::exec::user::Property > properties_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static UserProperties* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class UserToBitHandshake : public ::google::protobuf::Message {
+ public:
+ UserToBitHandshake();
+ virtual ~UserToBitHandshake();
+
+ UserToBitHandshake(const UserToBitHandshake& from);
+
+ inline UserToBitHandshake& operator=(const UserToBitHandshake& 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 UserToBitHandshake& default_instance();
+
+ void Swap(UserToBitHandshake* other);
+
+ // implements Message ----------------------------------------------
+
+ UserToBitHandshake* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const UserToBitHandshake& from);
+ void MergeFrom(const UserToBitHandshake& 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 .exec.shared.RpcChannel channel = 1 [default = USER];
+ inline bool has_channel() const;
+ inline void clear_channel();
+ static const int kChannelFieldNumber = 1;
+ inline ::exec::shared::RpcChannel channel() const;
+ inline void set_channel(::exec::shared::RpcChannel value);
+
+ // optional bool support_listening = 2;
+ inline bool has_support_listening() const;
+ inline void clear_support_listening();
+ static const int kSupportListeningFieldNumber = 2;
+ inline bool support_listening() const;
+ inline void set_support_listening(bool value);
+
+ // optional int32 rpc_version = 3;
+ inline bool has_rpc_version() const;
+ inline void clear_rpc_version();
+ static const int kRpcVersionFieldNumber = 3;
+ inline ::google::protobuf::int32 rpc_version() const;
+ inline void set_rpc_version(::google::protobuf::int32 value);
+
+ // optional .exec.shared.UserCredentials credentials = 4;
+ inline bool has_credentials() const;
+ inline void clear_credentials();
+ static const int kCredentialsFieldNumber = 4;
+ 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 .exec.user.UserProperties properties = 5;
+ inline bool has_properties() const;
+ inline void clear_properties();
+ static const int kPropertiesFieldNumber = 5;
+ inline const ::exec::user::UserProperties& properties() const;
+ inline ::exec::user::UserProperties* mutable_properties();
+ inline ::exec::user::UserProperties* release_properties();
+ inline void set_allocated_properties(::exec::user::UserProperties* properties);
+
+ // @@protoc_insertion_point(class_scope:exec.user.UserToBitHandshake)
+ private:
+ inline void set_has_channel();
+ inline void clear_has_channel();
+ inline void set_has_support_listening();
+ inline void clear_has_support_listening();
+ inline void set_has_rpc_version();
+ inline void clear_has_rpc_version();
+ inline void set_has_credentials();
+ inline void clear_has_credentials();
+ inline void set_has_properties();
+ inline void clear_has_properties();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ int channel_;
+ bool support_listening_;
+ ::exec::shared::UserCredentials* credentials_;
+ ::exec::user::UserProperties* properties_;
+ ::google::protobuf::int32 rpc_version_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static UserToBitHandshake* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class RequestResults : public ::google::protobuf::Message {
+ public:
+ RequestResults();
+ virtual ~RequestResults();
+
+ RequestResults(const RequestResults& from);
+
+ inline RequestResults& operator=(const RequestResults& 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 RequestResults& default_instance();
+
+ void Swap(RequestResults* other);
+
+ // implements Message ----------------------------------------------
+
+ RequestResults* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const RequestResults& from);
+ void MergeFrom(const RequestResults& 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 .exec.shared.QueryId query_id = 1;
+ inline bool has_query_id() const;
+ inline void clear_query_id();
+ static const int kQueryIdFieldNumber = 1;
+ inline const ::exec::shared::QueryId& query_id() const;
+ inline ::exec::shared::QueryId* mutable_query_id();
+ inline ::exec::shared::QueryId* release_query_id();
+ inline void set_allocated_query_id(::exec::shared::QueryId* query_id);
+
+ // optional int32 maximum_responses = 2;
+ inline bool has_maximum_responses() const;
+ inline void clear_maximum_responses();
+ static const int kMaximumResponsesFieldNumber = 2;
+ inline ::google::protobuf::int32 maximum_responses() const;
+ inline void set_maximum_responses(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:exec.user.RequestResults)
+ private:
+ inline void set_has_query_id();
+ inline void clear_has_query_id();
+ inline void set_has_maximum_responses();
+ inline void clear_has_maximum_responses();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::exec::shared::QueryId* query_id_;
+ ::google::protobuf::int32 maximum_responses_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static RequestResults* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class RunQuery : public ::google::protobuf::Message {
+ public:
+ RunQuery();
+ virtual ~RunQuery();
+
+ RunQuery(const RunQuery& from);
+
+ inline RunQuery& operator=(const RunQuery& 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 RunQuery& default_instance();
+
+ void Swap(RunQuery* other);
+
+ // implements Message ----------------------------------------------
+
+ RunQuery* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const RunQuery& from);
+ void MergeFrom(const RunQuery& 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 .exec.user.QueryResultsMode results_mode = 1;
+ inline bool has_results_mode() const;
+ inline void clear_results_mode();
+ static const int kResultsModeFieldNumber = 1;
+ inline ::exec::user::QueryResultsMode results_mode() const;
+ inline void set_results_mode(::exec::user::QueryResultsMode value);
+
+ // optional .exec.user.QueryType type = 2;
+ inline bool has_type() const;
+ inline void clear_type();
+ static const int kTypeFieldNumber = 2;
+ inline ::exec::user::QueryType type() const;
+ inline void set_type(::exec::user::QueryType value);
+
+ // optional string plan = 3;
+ inline bool has_plan() const;
+ inline void clear_plan();
+ static const int kPlanFieldNumber = 3;
+ inline const ::std::string& plan() const;
+ inline void set_plan(const ::std::string& value);
+ inline void set_plan(const char* value);
+ inline void set_plan(const char* value, size_t size);
+ inline ::std::string* mutable_plan();
+ inline ::std::string* release_plan();
+ inline void set_allocated_plan(::std::string* plan);
+
+ // @@protoc_insertion_point(class_scope:exec.user.RunQuery)
+ private:
+ inline void set_has_results_mode();
+ inline void clear_has_results_mode();
+ inline void set_has_type();
+ inline void clear_has_type();
+ inline void set_has_plan();
+ inline void clear_has_plan();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ int results_mode_;
+ int type_;
+ ::std::string* plan_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static RunQuery* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class BitToUserHandshake : public ::google::protobuf::Message {
+ public:
+ BitToUserHandshake();
+ virtual ~BitToUserHandshake();
+
+ BitToUserHandshake(const BitToUserHandshake& from);
+
+ inline BitToUserHandshake& operator=(const BitToUserHandshake& 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 BitToUserHandshake& default_instance();
+
+ void Swap(BitToUserHandshake* other);
+
+ // implements Message ----------------------------------------------
+
+ BitToUserHandshake* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const BitToUserHandshake& from);
+ void MergeFrom(const BitToUserHandshake& 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 int32 rpc_version = 2;
+ inline bool has_rpc_version() const;
+ inline void clear_rpc_version();
+ static const int kRpcVersionFieldNumber = 2;
+ inline ::google::protobuf::int32 rpc_version() const;
+ inline void set_rpc_version(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:exec.user.BitToUserHandshake)
+ private:
+ inline void set_has_rpc_version();
+ inline void clear_has_rpc_version();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int32 rpc_version_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static BitToUserHandshake* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class NodeStatus : public ::google::protobuf::Message {
+ public:
+ NodeStatus();
+ virtual ~NodeStatus();
+
+ NodeStatus(const NodeStatus& from);
+
+ inline NodeStatus& operator=(const NodeStatus& 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 NodeStatus& default_instance();
+
+ void Swap(NodeStatus* other);
+
+ // implements Message ----------------------------------------------
+
+ NodeStatus* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const NodeStatus& from);
+ void MergeFrom(const NodeStatus& 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 int32 node_id = 1;
+ inline bool has_node_id() const;
+ inline void clear_node_id();
+ static const int kNodeIdFieldNumber = 1;
+ inline ::google::protobuf::int32 node_id() const;
+ inline void set_node_id(::google::protobuf::int32 value);
+
+ // optional int64 memory_footprint = 2;
+ inline bool has_memory_footprint() const;
+ inline void clear_memory_footprint();
+ static const int kMemoryFootprintFieldNumber = 2;
+ inline ::google::protobuf::int64 memory_footprint() const;
+ inline void set_memory_footprint(::google::protobuf::int64 value);
+
+ // @@protoc_insertion_point(class_scope:exec.user.NodeStatus)
+ private:
+ inline void set_has_node_id();
+ inline void clear_has_node_id();
+ inline void set_has_memory_footprint();
+ inline void clear_has_memory_footprint();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int64 memory_footprint_;
+ ::google::protobuf::int32 node_id_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static NodeStatus* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class QueryResult : public ::google::protobuf::Message {
+ public:
+ QueryResult();
+ virtual ~QueryResult();
+
+ QueryResult(const QueryResult& from);
+
+ inline QueryResult& operator=(const QueryResult& 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 QueryResult& default_instance();
+
+ void Swap(QueryResult* other);
+
+ // implements Message ----------------------------------------------
+
+ QueryResult* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const QueryResult& from);
+ void MergeFrom(const QueryResult& 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 ----------------------------------------------------
+
+ typedef QueryResult_QueryState QueryState;
+ static const QueryState PENDING = QueryResult_QueryState_PENDING;
+ static const QueryState RUNNING = QueryResult_QueryState_RUNNING;
+ static const QueryState COMPLETED = QueryResult_QueryState_COMPLETED;
+ static const QueryState CANCELED = QueryResult_QueryState_CANCELED;
+ static const QueryState FAILED = QueryResult_QueryState_FAILED;
+ static const QueryState UNKNOWN_QUERY = QueryResult_QueryState_UNKNOWN_QUERY;
+ static inline bool QueryState_IsValid(int value) {
+ return QueryResult_QueryState_IsValid(value);
+ }
+ static const QueryState QueryState_MIN =
+ QueryResult_QueryState_QueryState_MIN;
+ static const QueryState QueryState_MAX =
+ QueryResult_QueryState_QueryState_MAX;
+ static const int QueryState_ARRAYSIZE =
+ QueryResult_QueryState_QueryState_ARRAYSIZE;
+ static inline const ::google::protobuf::EnumDescriptor*
+ QueryState_descriptor() {
+ return QueryResult_QueryState_descriptor();
+ }
+ static inline const ::std::string& QueryState_Name(QueryState value) {
+ return QueryResult_QueryState_Name(value);
+ }
+ static inline bool QueryState_Parse(const ::std::string& name,
+ QueryState* value) {
+ return QueryResult_QueryState_Parse(name, value);
+ }
+
+ // accessors -------------------------------------------------------
+
+ // optional .exec.user.QueryResult.QueryState query_state = 1;
+ inline bool has_query_state() const;
+ inline void clear_query_state();
+ static const int kQueryStateFieldNumber = 1;
+ inline ::exec::user::QueryResult_QueryState query_state() const;
+ inline void set_query_state(::exec::user::QueryResult_QueryState value);
+
+ // optional .exec.shared.QueryId query_id = 2;
+ inline bool has_query_id() const;
+ inline void clear_query_id();
+ static const int kQueryIdFieldNumber = 2;
+ inline const ::exec::shared::QueryId& query_id() const;
+ inline ::exec::shared::QueryId* mutable_query_id();
+ inline ::exec::shared::QueryId* release_query_id();
+ inline void set_allocated_query_id(::exec::shared::QueryId* query_id);
+
+ // optional bool is_last_chunk = 3;
+ inline bool has_is_last_chunk() const;
+ inline void clear_is_last_chunk();
+ static const int kIsLastChunkFieldNumber = 3;
+ inline bool is_last_chunk() const;
+ inline void set_is_last_chunk(bool value);
+
+ // optional int32 row_count = 4;
+ inline bool has_row_count() const;
+ inline void clear_row_count();
+ static const int kRowCountFieldNumber = 4;
+ inline ::google::protobuf::int32 row_count() const;
+ inline void set_row_count(::google::protobuf::int32 value);
+
+ // optional int64 records_scan = 5;
+ inline bool has_records_scan() const;
+ inline void clear_records_scan();
+ static const int kRecordsScanFieldNumber = 5;
+ inline ::google::protobuf::int64 records_scan() const;
+ inline void set_records_scan(::google::protobuf::int64 value);
+
+ // optional int64 records_error = 6;
+ inline bool has_records_error() const;
+ inline void clear_records_error();
+ static const int kRecordsErrorFieldNumber = 6;
+ inline ::google::protobuf::int64 records_error() const;
+ inline void set_records_error(::google::protobuf::int64 value);
+
+ // optional int64 submission_time = 7;
+ inline bool has_submission_time() const;
+ inline void clear_submission_time();
+ static const int kSubmissionTimeFieldNumber = 7;
+ inline ::google::protobuf::int64 submission_time() const;
+ inline void set_submission_time(::google::protobuf::int64 value);
+
+ // repeated .exec.user.NodeStatus node_status = 8;
+ inline int node_status_size() const;
+ inline void clear_node_status();
+ static const int kNodeStatusFieldNumber = 8;
+ inline const ::exec::user::NodeStatus& node_status(int index) const;
+ inline ::exec::user::NodeStatus* mutable_node_status(int index);
+ inline ::exec::user::NodeStatus* add_node_status();
+ inline const ::google::protobuf::RepeatedPtrField< ::exec::user::NodeStatus >&
+ node_status() const;
+ inline ::google::protobuf::RepeatedPtrField< ::exec::user::NodeStatus >*
+ mutable_node_status();
+
+ // repeated .exec.shared.DrillPBError error = 9;
+ inline int error_size() const;
+ inline void clear_error();
+ static const int kErrorFieldNumber = 9;
+ inline const ::exec::shared::DrillPBError& error(int index) const;
+ inline ::exec::shared::DrillPBError* mutable_error(int index);
+ inline ::exec::shared::DrillPBError* add_error();
+ inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::DrillPBError >&
+ error() const;
+ inline ::google::protobuf::RepeatedPtrField< ::exec::shared::DrillPBError >*
+ mutable_error();
+
+ // optional .exec.shared.RecordBatchDef def = 10;
+ inline bool has_def() const;
+ inline void clear_def();
+ static const int kDefFieldNumber = 10;
+ inline const ::exec::shared::RecordBatchDef& def() const;
+ inline ::exec::shared::RecordBatchDef* mutable_def();
+ inline ::exec::shared::RecordBatchDef* release_def();
+ inline void set_allocated_def(::exec::shared::RecordBatchDef* def);
+
+ // optional bool schema_changed = 11;
+ inline bool has_schema_changed() const;
+ inline void clear_schema_changed();
+ static const int kSchemaChangedFieldNumber = 11;
+ inline bool schema_changed() const;
+ inline void set_schema_changed(bool value);
+
+ // @@protoc_insertion_point(class_scope:exec.user.QueryResult)
+ private:
+ inline void set_has_query_state();
+ inline void clear_has_query_state();
+ inline void set_has_query_id();
+ inline void clear_has_query_id();
+ inline void set_has_is_last_chunk();
+ inline void clear_has_is_last_chunk();
+ inline void set_has_row_count();
+ inline void clear_has_row_count();
+ inline void set_has_records_scan();
+ inline void clear_has_records_scan();
+ inline void set_has_records_error();
+ inline void clear_has_records_error();
+ inline void set_has_submission_time();
+ inline void clear_has_submission_time();
+ inline void set_has_def();
+ inline void clear_has_def();
+ inline void set_has_schema_changed();
+ inline void clear_has_schema_changed();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::exec::shared::QueryId* query_id_;
+ int query_state_;
+ ::google::protobuf::int32 row_count_;
+ ::google::protobuf::int64 records_scan_;
+ ::google::protobuf::int64 records_error_;
+ ::google::protobuf::int64 submission_time_;
+ ::google::protobuf::RepeatedPtrField< ::exec::user::NodeStatus > node_status_;
+ ::google::protobuf::RepeatedPtrField< ::exec::shared::DrillPBError > error_;
+ ::exec::shared::RecordBatchDef* def_;
+ bool is_last_chunk_;
+ bool schema_changed_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32];
+
+ friend void protobuf_AddDesc_User_2eproto();
+ friend void protobuf_AssignDesc_User_2eproto();
+ friend void protobuf_ShutdownFile_User_2eproto();
+
+ void InitAsDefaultInstance();
+ static QueryResult* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// Property
+
+// required string key = 1;
+inline bool Property::has_key() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Property::set_has_key() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void Property::clear_has_key() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void Property::clear_key() {
+ if (key_ != &::google::protobuf::internal::kEmptyString) {
+ key_->clear();
+ }
+ clear_has_key();
+}
+inline const ::std::string& Property::key() const {
+ return *key_;
+}
+inline void Property::set_key(const ::std::string& value) {
+ set_has_key();
+ if (key_ == &::google::protobuf::internal::kEmptyString) {
+ key_ = new ::std::string;
+ }
+ key_->assign(value);
+}
+inline void Property::set_key(const char* value) {
+ set_has_key();
+ if (key_ == &::google::protobuf::internal::kEmptyString) {
+ key_ = new ::std::string;
+ }
+ key_->assign(value);
+}
+inline void Property::set_key(const char* value, size_t size) {
+ set_has_key();
+ if (key_ == &::google::protobuf::internal::kEmptyString) {
+ key_ = new ::std::string;
+ }
+ key_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* Property::mutable_key() {
+ set_has_key();
+ if (key_ == &::google::protobuf::internal::kEmptyString) {
+ key_ = new ::std::string;
+ }
+ return key_;
+}
+inline ::std::string* Property::release_key() {
+ clear_has_key();
+ if (key_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = key_;
+ key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void Property::set_allocated_key(::std::string* key) {
+ if (key_ != &::google::protobuf::internal::kEmptyString) {
+ delete key_;
+ }
+ if (key) {
+ set_has_key();
+ key_ = key;
+ } else {
+ clear_has_key();
+ key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// required string value = 2;
+inline bool Property::has_value() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Property::set_has_value() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void Property::clear_has_value() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void Property::clear_value() {
+ if (value_ != &::google::protobuf::internal::kEmptyString) {
+ value_->clear();
+ }
+ clear_has_value();
+}
+inline const ::std::string& Property::value() const {
+ return *value_;
+}
+inline void Property::set_value(const ::std::string& value) {
+ set_has_value();
+ if (value_ == &::google::protobuf::internal::kEmptyString) {
+ value_ = new ::std::string;
+ }
+ value_->assign(value);
+}
+inline void Property::set_value(const char* value) {
+ set_has_value();
+ if (value_ == &::google::protobuf::internal::kEmptyString) {
+ value_ = new ::std::string;
+ }
+ value_->assign(value);
+}
+inline void Property::set_value(const char* value, size_t size) {
+ set_has_value();
+ if (value_ == &::google::protobuf::internal::kEmptyString) {
+ value_ = new ::std::string;
+ }
+ value_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* Property::mutable_value() {
+ set_has_value();
+ if (value_ == &::google::protobuf::internal::kEmptyString) {
+ value_ = new ::std::string;
+ }
+ return value_;
+}
+inline ::std::string* Property::release_value() {
+ clear_has_value();
+ if (value_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = value_;
+ value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void Property::set_allocated_value(::std::string* value) {
+ if (value_ != &::google::protobuf::internal::kEmptyString) {
+ delete value_;
+ }
+ if (value) {
+ set_has_value();
+ value_ = value;
+ } else {
+ clear_has_value();
+ value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// -------------------------------------------------------------------
+
+// UserProperties
+
+// repeated .exec.user.Property properties = 1;
+inline int UserProperties::properties_size() const {
+ return properties_.size();
+}
+inline void UserProperties::clear_properties() {
+ properties_.Clear();
+}
+inline const ::exec::user::Property& UserProperties::properties(int index) const {
+ return properties_.Get(index);
+}
+inline ::exec::user::Property* UserProperties::mutable_properties(int index) {
+ return properties_.Mutable(index);
+}
+inline ::exec::user::Property* UserProperties::add_properties() {
+ return properties_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::exec::user::Property >&
+UserProperties::properties() const {
+ return properties_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::exec::user::Property >*
+UserProperties::mutable_properties() {
+ return &properties_;
+}
+
+// -------------------------------------------------------------------
+
+// UserToBitHandshake
+
+// optional .exec.shared.RpcChannel channel = 1 [default = USER];
+inline bool UserToBitHandshake::has_channel() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void UserToBitHandshake::set_has_channel() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void UserToBitHandshake::clear_has_channel() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void UserToBitHandshake::clear_channel() {
+ channel_ = 2;
+ clear_has_channel();
+}
+inline ::exec::shared::RpcChannel UserToBitHandshake::channel() const {
+ return static_cast< ::exec::shared::RpcChannel >(channel_);
+}
+inline void UserToBitHandshake::set_channel(::exec::shared::RpcChannel value) {
+ assert(::exec::shared::RpcChannel_IsValid(value));
+ set_has_channel();
+ channel_ = value;
+}
+
+// optional bool support_listening = 2;
+inline bool UserToBitHandshake::has_support_listening() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void UserToBitHandshake::set_has_support_listening() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void UserToBitHandshake::clear_has_support_listening() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void UserToBitHandshake::clear_support_listening() {
+ support_listening_ = false;
+ clear_has_support_listening();
+}
+inline bool UserToBitHandshake::support_listening() const {
+ return support_listening_;
+}
+inline void UserToBitHandshake::set_support_listening(bool value) {
+ set_has_support_listening();
+ support_listening_ = value;
+}
+
+// optional int32 rpc_version = 3;
+inline bool UserToBitHandshake::has_rpc_version() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void UserToBitHandshake::set_has_rpc_version() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void UserToBitHandshake::clear_has_rpc_version() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void UserToBitHandshake::clear_rpc_version() {
+ rpc_version_ = 0;
+ clear_has_rpc_version();
+}
+inline ::google::protobuf::int32 UserToBitHandshake::rpc_version() const {
+ return rpc_version_;
+}
+inline void UserToBitHandshake::set_rpc_version(::google::protobuf::int32 value) {
+ set_has_rpc_version();
+ rpc_version_ = value;
+}
+
+// optional .exec.shared.UserCredentials credentials = 4;
+inline bool UserToBitHandshake::has_credentials() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void UserToBitHandshake::set_has_credentials() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void UserToBitHandshake::clear_has_credentials() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void UserToBitHandshake::clear_credentials() {
+ if (credentials_ != NULL) credentials_->::exec::shared::UserCredentials::Clear();
+ clear_has_credentials();
+}
+inline const ::exec::shared::UserCredentials& UserToBitHandshake::credentials() const {
+ return credentials_ != NULL ? *credentials_ : *default_instance_->credentials_;
+}
+inline ::exec::shared::UserCredentials* UserToBitHandshake::mutable_credentials() {
+ set_has_credentials();
+ if (credentials_ == NULL) credentials_ = new ::exec::shared::UserCredentials;
+ return credentials_;
+}
+inline ::exec::shared::UserCredentials* UserToBitHandshake::release_credentials() {
+ clear_has_credentials();
+ ::exec::shared::UserCredentials* temp = credentials_;
+ credentials_ = NULL;
+ return temp;
+}
+inline void UserToBitHandshake::set_allocated_credentials(::exec::shared::UserCredentials* credentials) {
+ delete credentials_;
+ credentials_ = credentials;
+ if (credentials) {
+ set_has_credentials();
+ } else {
+ clear_has_credentials();
+ }
+}
+
+// optional .exec.user.UserProperties properties = 5;
+inline bool UserToBitHandshake::has_properties() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void UserToBitHandshake::set_has_properties() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void UserToBitHandshake::clear_has_properties() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void UserToBitHandshake::clear_properties() {
+ if (properties_ != NULL) properties_->::exec::user::UserProperties::Clear();
+ clear_has_properties();
+}
+inline const ::exec::user::UserProperties& UserToBitHandshake::properties() const {
+ return properties_ != NULL ? *properties_ : *default_instance_->properties_;
+}
+inline ::exec::user::UserProperties* UserToBitHandshake::mutable_properties() {
+ set_has_properties();
+ if (properties_ == NULL) properties_ = new ::exec::user::UserProperties;
+ return properties_;
+}
+inline ::exec::user::UserProperties* UserToBitHandshake::release_properties() {
+ clear_has_properties();
+ ::exec::user::UserProperties* temp = properties_;
+ properties_ = NULL;
+ return temp;
+}
+inline void UserToBitHandshake::set_allocated_properties(::exec::user::UserProperties* properties) {
+ delete properties_;
+ properties_ = properties;
+ if (properties) {
+ set_has_properties();
+ } else {
+ clear_has_properties();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// RequestResults
+
+// optional .exec.shared.QueryId query_id = 1;
+inline bool RequestResults::has_query_id() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void RequestResults::set_has_query_id() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void RequestResults::clear_has_query_id() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void RequestResults::clear_query_id() {
+ if (query_id_ != NULL) query_id_->::exec::shared::QueryId::Clear();
+ clear_has_query_id();
+}
+inline const ::exec::shared::QueryId& RequestResults::query_id() const {
+ return query_id_ != NULL ? *query_id_ : *default_instance_->query_id_;
+}
+inline ::exec::shared::QueryId* RequestResults::mutable_query_id() {
+ set_has_query_id();
+ if (query_id_ == NULL) query_id_ = new ::exec::shared::QueryId;
+ return query_id_;
+}
+inline ::exec::shared::QueryId* RequestResults::release_query_id() {
+ clear_has_query_id();
+ ::exec::shared::QueryId* temp = query_id_;
+ query_id_ = NULL;
+ return temp;
+}
+inline void RequestResults::set_allocated_query_id(::exec::shared::QueryId* query_id) {
+ delete query_id_;
+ query_id_ = query_id;
+ if (query_id) {
+ set_has_query_id();
+ } else {
+ clear_has_query_id();
+ }
+}
+
+// optional int32 maximum_responses = 2;
+inline bool RequestResults::has_maximum_responses() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void RequestResults::set_has_maximum_responses() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void RequestResults::clear_has_maximum_responses() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void RequestResults::clear_maximum_responses() {
+ maximum_responses_ = 0;
+ clear_has_maximum_responses();
+}
+inline ::google::protobuf::int32 RequestResults::maximum_responses() const {
+ return maximum_responses_;
+}
+inline void RequestResults::set_maximum_responses(::google::protobuf::int32 value) {
+ set_has_maximum_responses();
+ maximum_responses_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// RunQuery
+
+// optional .exec.user.QueryResultsMode results_mode = 1;
+inline bool RunQuery::has_results_mode() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void RunQuery::set_has_results_mode() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void RunQuery::clear_has_results_mode() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void RunQuery::clear_results_mode() {
+ results_mode_ = 1;
+ clear_has_results_mode();
+}
+inline ::exec::user::QueryResultsMode RunQuery::results_mode() const {
+ return static_cast< ::exec::user::QueryResultsMode >(results_mode_);
+}
+inline void RunQuery::set_results_mode(::exec::user::QueryResultsMode value) {
+ assert(::exec::user::QueryResultsMode_IsValid(value));
+ set_has_results_mode();
+ results_mode_ = value;
+}
+
+// optional .exec.user.QueryType type = 2;
+inline bool RunQuery::has_type() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void RunQuery::set_has_type() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void RunQuery::clear_has_type() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void RunQuery::clear_type() {
+ type_ = 1;
+ clear_has_type();
+}
+inline ::exec::user::QueryType RunQuery::type() const {
+ return static_cast< ::exec::user::QueryType >(type_);
+}
+inline void RunQuery::set_type(::exec::user::QueryType value) {
+ assert(::exec::user::QueryType_IsValid(value));
+ set_has_type();
+ type_ = value;
+}
+
+// optional string plan = 3;
+inline bool RunQuery::has_plan() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void RunQuery::set_has_plan() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void RunQuery::clear_has_plan() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void RunQuery::clear_plan() {
+ if (plan_ != &::google::protobuf::internal::kEmptyString) {
+ plan_->clear();
+ }
+ clear_has_plan();
+}
+inline const ::std::string& RunQuery::plan() const {
+ return *plan_;
+}
+inline void RunQuery::set_plan(const ::std::string& value) {
+ set_has_plan();
+ if (plan_ == &::google::protobuf::internal::kEmptyString) {
+ plan_ = new ::std::string;
+ }
+ plan_->assign(value);
+}
+inline void RunQuery::set_plan(const char* value) {
+ set_has_plan();
+ if (plan_ == &::google::protobuf::internal::kEmptyString) {
+ plan_ = new ::std::string;
+ }
+ plan_->assign(value);
+}
+inline void RunQuery::set_plan(const char* value, size_t size) {
+ set_has_plan();
+ if (plan_ == &::google::protobuf::internal::kEmptyString) {
+ plan_ = new ::std::string;
+ }
+ plan_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* RunQuery::mutable_plan() {
+ set_has_plan();
+ if (plan_ == &::google::protobuf::internal::kEmptyString) {
+ plan_ = new ::std::string;
+ }
+ return plan_;
+}
+inline ::std::string* RunQuery::release_plan() {
+ clear_has_plan();
+ if (plan_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = plan_;
+ plan_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void RunQuery::set_allocated_plan(::std::string* plan) {
+ if (plan_ != &::google::protobuf::internal::kEmptyString) {
+ delete plan_;
+ }
+ if (plan) {
+ set_has_plan();
+ plan_ = plan;
+ } else {
+ clear_has_plan();
+ plan_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// -------------------------------------------------------------------
+
+// BitToUserHandshake
+
+// optional int32 rpc_version = 2;
+inline bool BitToUserHandshake::has_rpc_version() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void BitToUserHandshake::set_has_rpc_version() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void BitToUserHandshake::clear_has_rpc_version() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void BitToUserHandshake::clear_rpc_version() {
+ rpc_version_ = 0;
+ clear_has_rpc_version();
+}
+inline ::google::protobuf::int32 BitToUserHandshake::rpc_version() const {
+ return rpc_version_;
+}
+inline void BitToUserHandshake::set_rpc_version(::google::protobuf::int32 value) {
+ set_has_rpc_version();
+ rpc_version_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// NodeStatus
+
+// optional int32 node_id = 1;
+inline bool NodeStatus::has_node_id() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void NodeStatus::set_has_node_id() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void NodeStatus::clear_has_node_id() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void NodeStatus::clear_node_id() {
+ node_id_ = 0;
+ clear_has_node_id();
+}
+inline ::google::protobuf::int32 NodeStatus::node_id() const {
+ return node_id_;
+}
+inline void NodeStatus::set_node_id(::google::protobuf::int32 value) {
+ set_has_node_id();
+ node_id_ = value;
+}
+
+// optional int64 memory_footprint = 2;
+inline bool NodeStatus::has_memory_footprint() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void NodeStatus::set_has_memory_footprint() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void NodeStatus::clear_has_memory_footprint() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void NodeStatus::clear_memory_footprint() {
+ memory_footprint_ = GOOGLE_LONGLONG(0);
+ clear_has_memory_footprint();
+}
+inline ::google::protobuf::int64 NodeStatus::memory_footprint() const {
+ return memory_footprint_;
+}
+inline void NodeStatus::set_memory_footprint(::google::protobuf::int64 value) {
+ set_has_memory_footprint();
+ memory_footprint_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// QueryResult
+
+// optional .exec.user.QueryResult.QueryState query_state = 1;
+inline bool QueryResult::has_query_state() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void QueryResult::set_has_query_state() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void QueryResult::clear_has_query_state() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void QueryResult::clear_query_state() {
+ query_state_ = 0;
+ clear_has_query_state();
+}
+inline ::exec::user::QueryResult_QueryState QueryResult::query_state() const {
+ return static_cast< ::exec::user::QueryResult_QueryState >(query_state_);
+}
+inline void QueryResult::set_query_state(::exec::user::QueryResult_QueryState value) {
+ assert(::exec::user::QueryResult_QueryState_IsValid(value));
+ set_has_query_state();
+ query_state_ = value;
+}
+
+// optional .exec.shared.QueryId query_id = 2;
+inline bool QueryResult::has_query_id() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void QueryResult::set_has_query_id() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void QueryResult::clear_has_query_id() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void QueryResult::clear_query_id() {
+ if (query_id_ != NULL) query_id_->::exec::shared::QueryId::Clear();
+ clear_has_query_id();
+}
+inline const ::exec::shared::QueryId& QueryResult::query_id() const {
+ return query_id_ != NULL ? *query_id_ : *default_instance_->query_id_;
+}
+inline ::exec::shared::QueryId* QueryResult::mutable_query_id() {
+ set_has_query_id();
+ if (query_id_ == NULL) query_id_ = new ::exec::shared::QueryId;
+ return query_id_;
+}
+inline ::exec::shared::QueryId* QueryResult::release_query_id() {
+ clear_has_query_id();
+ ::exec::shared::QueryId* temp = query_id_;
+ query_id_ = NULL;
+ return temp;
+}
+inline void QueryResult::set_allocated_query_id(::exec::shared::QueryId* query_id) {
+ delete query_id_;
+ query_id_ = query_id;
+ if (query_id) {
+ set_has_query_id();
+ } else {
+ clear_has_query_id();
+ }
+}
+
+// optional bool is_last_chunk = 3;
+inline bool QueryResult::has_is_last_chunk() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void QueryResult::set_has_is_last_chunk() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void QueryResult::clear_has_is_last_chunk() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void QueryResult::clear_is_last_chunk() {
+ is_last_chunk_ = false;
+ clear_has_is_last_chunk();
+}
+inline bool QueryResult::is_last_chunk() const {
+ return is_last_chunk_;
+}
+inline void QueryResult::set_is_last_chunk(bool value) {
+ set_has_is_last_chunk();
+ is_last_chunk_ = value;
+}
+
+// optional int32 row_count = 4;
+inline bool QueryResult::has_row_count() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void QueryResult::set_has_row_count() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void QueryResult::clear_has_row_count() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void QueryResult::clear_row_count() {
+ row_count_ = 0;
+ clear_has_row_count();
+}
+inline ::google::protobuf::int32 QueryResult::row_count() const {
+ return row_count_;
+}
+inline void QueryResult::set_row_count(::google::protobuf::int32 value) {
+ set_has_row_count();
+ row_count_ = value;
+}
+
+// optional int64 records_scan = 5;
+inline bool QueryResult::has_records_scan() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void QueryResult::set_has_records_scan() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void QueryResult::clear_has_records_scan() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void QueryResult::clear_records_scan() {
+ records_scan_ = GOOGLE_LONGLONG(0);
+ clear_has_records_scan();
+}
+inline ::google::protobuf::int64 QueryResult::records_scan() const {
+ return records_scan_;
+}
+inline void QueryResult::set_records_scan(::google::protobuf::int64 value) {
+ set_has_records_scan();
+ records_scan_ = value;
+}
+
+// optional int64 records_error = 6;
+inline bool QueryResult::has_records_error() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void QueryResult::set_has_records_error() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void QueryResult::clear_has_records_error() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void QueryResult::clear_records_error() {
+ records_error_ = GOOGLE_LONGLONG(0);
+ clear_has_records_error();
+}
+inline ::google::protobuf::int64 QueryResult::records_error() const {
+ return records_error_;
+}
+inline void QueryResult::set_records_error(::google::protobuf::int64 value) {
+ set_has_records_error();
+ records_error_ = value;
+}
+
+// optional int64 submission_time = 7;
+inline bool QueryResult::has_submission_time() const {
+ return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void QueryResult::set_has_submission_time() {
+ _has_bits_[0] |= 0x00000040u;
+}
+inline void QueryResult::clear_has_submission_time() {
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline void QueryResult::clear_submission_time() {
+ submission_time_ = GOOGLE_LONGLONG(0);
+ clear_has_submission_time();
+}
+inline ::google::protobuf::int64 QueryResult::submission_time() const {
+ return submission_time_;
+}
+inline void QueryResult::set_submission_time(::google::protobuf::int64 value) {
+ set_has_submission_time();
+ submission_time_ = value;
+}
+
+// repeated .exec.user.NodeStatus node_status = 8;
+inline int QueryResult::node_status_size() const {
+ return node_status_.size();
+}
+inline void QueryResult::clear_node_status() {
+ node_status_.Clear();
+}
+inline const ::exec::user::NodeStatus& QueryResult::node_status(int index) const {
+ return node_status_.Get(index);
+}
+inline ::exec::user::NodeStatus* QueryResult::mutable_node_status(int index) {
+ return node_status_.Mutable(index);
+}
+inline ::exec::user::NodeStatus* QueryResult::add_node_status() {
+ return node_status_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::exec::user::NodeStatus >&
+QueryResult::node_status() const {
+ return node_status_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::exec::user::NodeStatus >*
+QueryResult::mutable_node_status() {
+ return &node_status_;
+}
+
+// repeated .exec.shared.DrillPBError error = 9;
+inline int QueryResult::error_size() const {
+ return error_.size();
+}
+inline void QueryResult::clear_error() {
+ error_.Clear();
+}
+inline const ::exec::shared::DrillPBError& QueryResult::error(int index) const {
+ return error_.Get(index);
+}
+inline ::exec::shared::DrillPBError* QueryResult::mutable_error(int index) {
+ return error_.Mutable(index);
+}
+inline ::exec::shared::DrillPBError* QueryResult::add_error() {
+ return error_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::DrillPBError >&
+QueryResult::error() const {
+ return error_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::exec::shared::DrillPBError >*
+QueryResult::mutable_error() {
+ return &error_;
+}
+
+// optional .exec.shared.RecordBatchDef def = 10;
+inline bool QueryResult::has_def() const {
+ return (_has_bits_[0] & 0x00000200u) != 0;
+}
+inline void QueryResult::set_has_def() {
+ _has_bits_[0] |= 0x00000200u;
+}
+inline void QueryResult::clear_has_def() {
+ _has_bits_[0] &= ~0x00000200u;
+}
+inline void QueryResult::clear_def() {
+ if (def_ != NULL) def_->::exec::shared::RecordBatchDef::Clear();
+ clear_has_def();
+}
+inline const ::exec::shared::RecordBatchDef& QueryResult::def() const {
+ return def_ != NULL ? *def_ : *default_instance_->def_;
+}
+inline ::exec::shared::RecordBatchDef* QueryResult::mutable_def() {
+ set_has_def();
+ if (def_ == NULL) def_ = new ::exec::shared::RecordBatchDef;
+ return def_;
+}
+inline ::exec::shared::RecordBatchDef* QueryResult::release_def() {
+ clear_has_def();
+ ::exec::shared::RecordBatchDef* temp = def_;
+ def_ = NULL;
+ return temp;
+}
+inline void QueryResult::set_allocated_def(::exec::shared::RecordBatchDef* def) {
+ delete def_;
+ def_ = def;
+ if (def) {
+ set_has_def();
+ } else {
+ clear_has_def();
+ }
+}
+
+// optional bool schema_changed = 11;
+inline bool QueryResult::has_schema_changed() const {
+ return (_has_bits_[0] & 0x00000400u) != 0;
+}
+inline void QueryResult::set_has_schema_changed() {
+ _has_bits_[0] |= 0x00000400u;
+}
+inline void QueryResult::clear_has_schema_changed() {
+ _has_bits_[0] &= ~0x00000400u;
+}
+inline void QueryResult::clear_schema_changed() {
+ schema_changed_ = false;
+ clear_has_schema_changed();
+}
+inline bool QueryResult::schema_changed() const {
+ return schema_changed_;
+}
+inline void QueryResult::set_schema_changed(bool value) {
+ set_has_schema_changed();
+ schema_changed_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace user
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::user::QueryResult_QueryState>() {
+ return ::exec::user::QueryResult_QueryState_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::user::RpcType>() {
+ return ::exec::user::RpcType_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::user::QueryType>() {
+ return ::exec::user::QueryType_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::user::QueryResultsMode>() {
+ return ::exec::user::QueryResultsMode_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_User_2eproto__INCLUDED
diff --git a/contrib/native/client/src/include/drill/recordBatch.hpp b/contrib/native/client/src/include/drill/recordBatch.hpp
new file mode 100644
index 000000000..c40327bfd
--- /dev/null
+++ b/contrib/native/client/src/include/drill/recordBatch.hpp
@@ -0,0 +1,873 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RECORDBATCH_H
+#define RECORDBATCH_H
+
+
+#include <assert.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <ostream>
+#include <sstream>
+#include <vector>
+#include <boost/lexical_cast.hpp>
+#include "drill/common.hpp"
+#include "drill/decimalUtils.hpp"
+#include "drill/protobuf/User.pb.h"
+
+#if defined _WIN32 || defined __CYGWIN__
+ #ifdef DRILL_CLIENT_EXPORTS
+ #define DECLSPEC_DRILL_CLIENT __declspec(dllexport)
+ #else
+ #ifdef USE_STATIC_LIBDRILL
+ #define DECLSPEC_DRILL_CLIENT
+ #else
+ #define DECLSPEC_DRILL_CLIENT __declspec(dllimport)
+ #endif
+ #endif
+#else
+ #if __GNUC__ >= 4
+ #define DECLSPEC_DRILL_CLIENT __attribute__ ((visibility ("default")))
+ #else
+ #define DECLSPEC_DRILL_CLIENT
+ #endif
+#endif
+
+
+namespace Drill {
+
+class FieldBatch;
+class ValueVectorBase;
+
+//TODO: The base classes for value vectors should have abstract functions instead of implementations
+//that return 'NOT IMPLEMENTED YET'
+
+// A Read Only Sliced byte buffer
+class SlicedByteBuf{
+ public:
+ //TODO: check the size and offset parameters. What is the largest they can be?
+ SlicedByteBuf(const ByteBuf_t b, size_t offset, size_t length){
+ this->m_buffer=b;
+ this->m_start=offset;
+ this->m_end=offset+length-1;
+ this->m_length=length;
+ }
+
+ // Carve a sliced buffer out of another sliced buffer
+ SlicedByteBuf(const SlicedByteBuf& sb, size_t offset, size_t length){
+ this->m_buffer=sb.m_buffer;
+ this->m_start=sb.m_start+offset;
+ this->m_end=sb.m_start+offset+length;
+ this->m_length=length;
+ }
+
+ //Copy ctor
+ SlicedByteBuf(const SlicedByteBuf& other ){
+ if(this!=&other){
+ this->m_buffer=other.m_buffer;
+ this->m_start=other.m_start;
+ this->m_end=other.m_end;
+ this->m_length=other.m_length;
+ }
+ }
+
+ SlicedByteBuf& operator=( const SlicedByteBuf& rhs ){
+ if(this!=&rhs){
+ this->m_buffer=rhs.m_buffer;
+ this->m_start=rhs.m_start;
+ this->m_end=rhs.m_end;
+ this->m_length=rhs.m_length;
+ }
+ return *this;
+ }
+
+ size_t getStart(){
+ return this->m_start;
+ }
+ size_t getEnd(){
+ return this->m_end;
+ }
+ size_t getLength(){
+ return this->m_length;
+ }
+
+ // ByteBuf_t getBuffer(){ return m_buffer;}
+ ByteBuf_t getSliceStart(){ return this->m_buffer+this->m_start;}
+
+ // accessor functions
+ //
+ // TYPE getTYPE(size_t index){
+ // if(index>=m_length) return 0;
+ // return (TYPE) m_buffer[offset+index];
+ // }
+
+
+ template <typename T> T readAt(size_t index) const {
+ // Type T can only be an integer type
+ // Type T cannot be a struct of fixed size
+ // Because struct alignment is compiler dependent
+ // we can end up with a struct size that is larger
+ // than the buffer in the sliced buf.
+ assert((index + sizeof(T) <= this->m_length));
+ if(index + sizeof(T) <= this->m_length)
+ return *((T*)(this->m_buffer+this->m_start+index));
+ return 0;
+
+ }
+
+ uint8_t getByte(size_t index){
+ return readAt<uint8_t>(index);
+ }
+
+ uint32_t getUint32(size_t index){
+ return readAt<uint32_t>(index);
+ }
+
+ uint64_t getUint64(size_t index){
+ return readAt<uint64_t>(index);
+ }
+
+ ByteBuf_t getAt(size_t index){
+ return this->m_buffer+m_start+index;
+ }
+
+ bool getBit(size_t index){
+ // refer to BitVector.java http://bit.ly/Py1jof
+ return ((this->m_buffer[m_start+index/8] & ( 1 << (index % 8) )) !=0);
+ }
+ private:
+ ByteBuf_t m_buffer; // the backing store
+ size_t m_start; //offset within the backing store where this slice begins
+ size_t m_end; //offset within the backing store where this slice ends
+ size_t m_length; //length
+};
+
+class DECLSPEC_DRILL_CLIENT ValueVectorBase{
+ public:
+ ValueVectorBase(SlicedByteBuf *b, size_t rowCount){
+ m_pBuffer=b;
+ m_rowCount=rowCount;
+ }
+
+ virtual ~ValueVectorBase(){
+ }
+
+ // test whether the value is null in the position index
+ virtual bool isNull(size_t index) const {
+ return false;
+ }
+
+
+ const char* get(size_t index) const { return 0;}
+ virtual void getValueAt(size_t index, char* buf, size_t nChars) const =0;
+
+ virtual const ByteBuf_t getRaw(size_t index) const {
+ return (ByteBuf_t)m_pBuffer->getSliceStart() ;
+ }
+
+ virtual uint32_t getSize(size_t index) const=0;
+ //virtual uint32_t getSize(size_t index) const {
+ // return 0;
+ //}
+
+ protected:
+ SlicedByteBuf* m_pBuffer;
+ size_t m_rowCount;
+};
+
+class DECLSPEC_DRILL_CLIENT ValueVectorUnimplemented:public ValueVectorBase{
+ public:
+ ValueVectorUnimplemented(SlicedByteBuf *b, size_t rowCount):ValueVectorBase(b,rowCount){
+ }
+
+ virtual ~ValueVectorUnimplemented(){
+ }
+
+ const char* get(size_t index) const { return 0;};
+ virtual void getValueAt(size_t index, char* buf, size_t nChars) const{
+ *buf=0; return;
+ }
+
+ virtual uint32_t getSize(size_t index) const{ return 0;};
+
+ protected:
+ SlicedByteBuf* m_pBuffer;
+ size_t m_rowCount;
+};
+
+class DECLSPEC_DRILL_CLIENT ValueVectorFixedWidth:public ValueVectorBase{
+ public:
+ ValueVectorFixedWidth(SlicedByteBuf *b, size_t rowCount):ValueVectorBase(b, rowCount){
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ strncpy(buf, "NOT IMPLEMENTED YET", nChars);
+ return;
+ }
+
+ const ByteBuf_t getRaw(size_t index) const {
+ return this->m_pBuffer->getSliceStart()+index*this->getSize(index);
+ }
+
+ uint32_t getSize(size_t index) const {
+ return 0;
+ }
+};
+
+template <typename VALUE_TYPE>
+ class ValueVectorFixed : public ValueVectorFixedWidth {
+ public:
+ ValueVectorFixed(SlicedByteBuf *b, size_t rowCount) :
+ ValueVectorFixedWidth(b, rowCount) {}
+
+ VALUE_TYPE get(size_t index) const {
+ return m_pBuffer->readAt<VALUE_TYPE>(index * sizeof(VALUE_TYPE));
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ std::stringstream sstr;
+ VALUE_TYPE value = this->get(index);
+ sstr << value;
+ strncpy(buf, sstr.str().c_str(), nChars);
+ }
+
+ uint32_t getSize(size_t index) const {
+ return sizeof(VALUE_TYPE);
+ }
+ };
+
+
+class DECLSPEC_DRILL_CLIENT ValueVectorBit:public ValueVectorFixedWidth{
+ public:
+ ValueVectorBit(SlicedByteBuf *b, size_t rowCount):ValueVectorFixedWidth(b, rowCount){
+ }
+ bool get(size_t index) const {
+ #ifdef DEBUG
+ uint8_t b = m_pBuffer->getByte((index)/8);
+ uint8_t bitOffset = index%8;
+ uint8_t setBit = (1<<bitOffset); // sets the Nth bit.
+ uint8_t isSet = (b&setBit);
+ return isSet;
+ #else
+ return (bool)((m_pBuffer->getByte((index)/8)) & (1<< (index%8) ));
+ #endif
+
+ }
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ char str[64]; // Can't have more than 64 digits of precision
+ //could use itoa instead of sprintf which is slow, but it is not portable
+ sprintf(str, "%s", this->get(index)?"true":"false");
+ strncpy(buf, str, nChars);
+ return;
+ }
+ uint32_t getSize(size_t index) const {
+ return sizeof(uint8_t);
+ }
+};
+
+template <int DECIMAL_DIGITS, int WIDTH_IN_BYTES, bool IS_SPARSE, int MAX_PRECISION = 0 >
+ class ValueVectorDecimal: public ValueVectorFixedWidth {
+ public:
+ ValueVectorDecimal(SlicedByteBuf* b, size_t rowCount, int32_t scale):
+ ValueVectorFixedWidth(b, rowCount),
+ m_scale(scale)
+ {
+ ; // Do nothing
+ }
+
+ DecimalValue get(size_t index) const {
+ if (IS_SPARSE)
+ {
+ return getDecimalValueFromSparse(*m_pBuffer, index * WIDTH_IN_BYTES, DECIMAL_DIGITS, m_scale);
+ }
+ return getDecimalValueFromDense(*m_pBuffer, index * WIDTH_IN_BYTES, DECIMAL_DIGITS, m_scale, MAX_PRECISION, WIDTH_IN_BYTES);
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ const DecimalValue& val = this->get(index);
+ const std::string& str = boost::lexical_cast<std::string>(val.m_unscaledValue);
+ size_t idxDecimalMark = str.length() - m_scale;
+ const std::string& decStr= str.substr(0, idxDecimalMark) + "." + str.substr(idxDecimalMark, m_scale);
+ strncpy(buf, decStr.c_str(), nChars);
+ return;
+ }
+
+ uint32_t getSize(size_t index) const {
+ return WIDTH_IN_BYTES;
+ }
+
+ private:
+ int32_t m_scale;
+ };
+
+template<typename VALUE_TYPE>
+ class ValueVectorDecimalTrivial: public ValueVectorFixedWidth {
+ public:
+ ValueVectorDecimalTrivial(SlicedByteBuf* b, size_t rowCount, int32_t scale):
+ ValueVectorFixedWidth(b, rowCount),
+ m_scale(scale)
+ {
+ ; // Do nothing
+ }
+
+ DecimalValue get(size_t index) const {
+ return DecimalValue(
+ m_pBuffer->readAt<VALUE_TYPE>(index * sizeof(VALUE_TYPE)),
+ m_scale);
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ VALUE_TYPE value = m_pBuffer->readAt<VALUE_TYPE>(index * sizeof(VALUE_TYPE));
+ const std::string& str = boost::lexical_cast<std::string>(value);
+ size_t idxDecimalMark = str.length() - m_scale;
+ const std::string& decStr= str.substr(0, idxDecimalMark) + "." + str.substr(idxDecimalMark, m_scale);
+ strncpy(buf, decStr.c_str(), nChars);
+ return;
+ }
+
+ uint32_t getSize(size_t index) const {
+ return sizeof(VALUE_TYPE);
+ }
+
+ private:
+ int32_t m_scale;
+ };
+
+
+template <typename VALUE_TYPE>
+ class NullableValueVectorFixed : public ValueVectorBase
+{
+ public:
+ NullableValueVectorFixed(SlicedByteBuf *b, size_t rowCount):ValueVectorBase(b, rowCount){
+ size_t offsetEnd = rowCount/8 + 1;
+ this->m_pBitmap= new SlicedByteBuf(*b, 0, offsetEnd);
+ this->m_pData= new SlicedByteBuf(*b, offsetEnd, b->getLength());
+ // TODO: testing boundary case(null columns)
+ }
+
+ ~NullableValueVectorFixed(){
+ delete this->m_pBitmap;
+ delete this->m_pData;
+ }
+
+ // test whether the value is null in the position index
+ bool isNull(size_t index) const {
+ return (m_pBitmap->getBit(index)==0);
+ }
+
+ VALUE_TYPE get(size_t index) const {
+ // it should not be called if the value is null
+ assert( "value is null" && !isNull(index));
+ return m_pData->readAt<VALUE_TYPE>(index * sizeof(VALUE_TYPE));
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ assert( "value is null" && !isNull(index));
+ std::stringstream sstr;
+ VALUE_TYPE value = this->get(index);
+ sstr << value;
+ strncpy(buf, sstr.str().c_str(), nChars);
+ }
+
+ uint32_t getSize(size_t index) const {
+ assert("value is null" && !isNull(index));
+ return sizeof(VALUE_TYPE);
+ }
+ private:
+ SlicedByteBuf* m_pBitmap;
+ SlicedByteBuf* m_pData;
+};
+
+// The 'holder' classes are (by contract) simple structs with primitive members and no dynamic allocations.
+// The template classes create an instance of the class and return it to the caller in the 'get' routines.
+// The compiler will create a copy and return it to the caller. If the object is more complex than a struct of
+// primitives, the class _must_ provide a copy constructor.
+// We don't really need a destructor here, but we declare a virtual dtor in the base class in case we ever get
+// more complex and start doing dynamic allocations in these classes.
+
+struct DateTimeBase{
+ DateTimeBase(){m_datetime=0;}
+ virtual ~DateTimeBase(){}
+ uint64_t m_datetime;
+ virtual void load() =0;
+ virtual std::string toString()=0;
+};
+
+struct DateHolder: public virtual DateTimeBase{
+ DateHolder(){};
+ DateHolder(uint64_t d){m_datetime=d; load();}
+ uint32_t m_year;
+ uint32_t m_month;
+ uint32_t m_day;
+ void load();
+ std::string toString();
+};
+
+struct TimeHolder: public virtual DateTimeBase{
+ TimeHolder(){};
+ TimeHolder(uint32_t d){m_datetime=d; load();}
+ uint32_t m_hr;
+ uint32_t m_min;
+ uint32_t m_sec;
+ uint32_t m_msec;
+ void load();
+ std::string toString();
+};
+
+struct DateTimeHolder: public DateHolder, public TimeHolder{
+ DateTimeHolder(){};
+ DateTimeHolder(uint64_t d){m_datetime=d; load();}
+ void load();
+ std::string toString();
+};
+
+struct DateTimeTZHolder: public DateTimeHolder{
+ DateTimeTZHolder(ByteBuf_t b){
+ m_datetime=*(uint64_t*)b;
+ m_tzIndex=*(uint32_t*)(b+sizeof(uint64_t));
+ load();
+ }
+ void load();
+ std::string toString();
+ int32_t m_tzIndex;
+ static uint32_t size(){ return sizeof(uint64_t)+sizeof(uint32_t); }
+
+};
+
+struct IntervalYearHolder{
+ IntervalYearHolder(ByteBuf_t b){
+ m_month=*(uint32_t*)b;
+ load();
+ }
+ void load(){};
+ std::string toString();
+ uint32_t m_month;
+ static uint32_t size(){ return sizeof(uint32_t); }
+};
+
+struct IntervalDayHolder{
+ IntervalDayHolder(ByteBuf_t b){
+ m_day=*(uint32_t*)(b);
+ m_ms=*(uint32_t*)(b+sizeof(uint32_t));
+ load();
+ }
+ void load(){};
+ std::string toString();
+ uint32_t m_day;
+ uint32_t m_ms;
+ static uint32_t size(){ return 2*sizeof(uint32_t)+4; }
+};
+
+struct IntervalHolder{
+ IntervalHolder(ByteBuf_t b){
+ m_month=*(uint32_t*)b;
+ m_day=*(uint32_t*)(b+sizeof(uint32_t));
+ m_ms=*(uint32_t*)(b+2*sizeof(uint32_t));
+ load();
+ }
+ void load(){};
+ std::string toString();
+ uint32_t m_month;
+ uint32_t m_day;
+ uint32_t m_ms;
+ static uint32_t size(){ return 3*sizeof(uint32_t)+4; }
+};
+
+/*
+ * VALUEHOLDER_CLASS_TYPE is a struct with a constructor that takes a parameter of type VALUE_VECTOR_TYPE
+ * (a primitive type)
+ * VALUEHOLDER_CLASS_TYPE implements a toString function
+ * Note that VALUEHOLDER_CLASS_TYPE is created on the stack and the copy returned in the get function.
+ * So the class needs to have the appropriate copy constructor or the default bitwise copy should work
+ * correctly.
+ */
+template <class VALUEHOLDER_CLASS_TYPE, typename VALUE_TYPE>
+ class ValueVectorTyped:public ValueVectorFixedWidth{
+ public:
+ ValueVectorTyped(SlicedByteBuf *b, size_t rowCount) :
+ ValueVectorFixedWidth(b, rowCount) {}
+
+
+ VALUEHOLDER_CLASS_TYPE get(size_t index) const {
+ VALUE_TYPE v= m_pBuffer->readAt<VALUE_TYPE>(index * sizeof(VALUE_TYPE));
+ VALUEHOLDER_CLASS_TYPE r(v);
+ return r;
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ std::stringstream sstr;
+ VALUEHOLDER_CLASS_TYPE value = this->get(index);
+ sstr << value.toString();
+ strncpy(buf, sstr.str().c_str(), nChars);
+ }
+
+ uint32_t getSize(size_t index) const {
+ return sizeof(VALUE_TYPE);
+ }
+ };
+
+template <class VALUEHOLDER_CLASS_TYPE>
+ class ValueVectorTypedComposite:public ValueVectorFixedWidth{
+ public:
+ ValueVectorTypedComposite(SlicedByteBuf *b, size_t rowCount) :
+ ValueVectorFixedWidth(b, rowCount) {}
+
+
+ VALUEHOLDER_CLASS_TYPE get(size_t index) const {
+ ByteBuf_t b= m_pBuffer->getAt(index * getSize(index));
+ VALUEHOLDER_CLASS_TYPE r(b);
+ return r;
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ std::stringstream sstr;
+ VALUEHOLDER_CLASS_TYPE value = this->get(index);
+ sstr << value.toString();
+ strncpy(buf, sstr.str().c_str(), nChars);
+ }
+
+ uint32_t getSize(size_t index) const {
+ return VALUEHOLDER_CLASS_TYPE::size();
+ }
+ };
+
+template <class VALUEHOLDER_CLASS_TYPE, class VALUE_VECTOR_TYPE>
+ class NullableValueVectorTyped : public ValueVectorBase {
+ public:
+
+ NullableValueVectorTyped(SlicedByteBuf *b, size_t rowCount):ValueVectorBase(b, rowCount){
+ size_t offsetEnd = rowCount/8 + 1;
+ this->m_pBitmap= new SlicedByteBuf(*b, 0, offsetEnd);
+ this->m_pData= new SlicedByteBuf(*b, offsetEnd, b->getLength()-offsetEnd);
+ this->m_pVector= new VALUE_VECTOR_TYPE(m_pData, rowCount);
+ }
+
+ ~NullableValueVectorTyped(){
+ delete this->m_pBitmap;
+ delete this->m_pData;
+ delete this->m_pVector;
+ }
+
+ bool isNull(size_t index) const{
+ return (m_pBitmap->getBit(index)==0);
+ }
+
+ VALUEHOLDER_CLASS_TYPE get(size_t index) const {
+ assert(!isNull(index));
+ return m_pVector->get(index);
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const{
+ std::stringstream sstr;
+ if(this->isNull(index)){
+ sstr<<"NULL";
+ strncpy(buf, sstr.str().c_str(), nChars);
+ }else{
+ return m_pVector->getValueAt(index, buf, nChars);
+ }
+ }
+
+ uint32_t getSize(size_t index) const {
+ assert(!isNull(index));
+ return this->m_pVector->getSize(index);
+ }
+
+ private:
+ SlicedByteBuf* m_pBitmap;
+ SlicedByteBuf* m_pData;
+ VALUE_VECTOR_TYPE* m_pVector;
+ };
+
+class DECLSPEC_DRILL_CLIENT VarWidthHolder{
+ public:
+ ByteBuf_t data;
+ size_t size;
+};
+
+class DECLSPEC_DRILL_CLIENT ValueVectorVarWidth:public ValueVectorBase{
+ public:
+ ValueVectorVarWidth(SlicedByteBuf *b, size_t rowCount):ValueVectorBase(b, rowCount){
+ size_t offsetEnd = (rowCount+1)*sizeof(uint32_t);
+ this->m_pOffsetArray= new SlicedByteBuf(*b, 0, offsetEnd);
+ this->m_pData= new SlicedByteBuf(*b, offsetEnd, b->getLength());
+ }
+ ~ValueVectorVarWidth(){
+ delete this->m_pOffsetArray;
+ delete this->m_pData;
+ }
+
+ VarWidthHolder get(size_t index) const {
+ size_t startIdx = this->m_pOffsetArray->getUint32(index*sizeof(uint32_t));
+ size_t endIdx = this->m_pOffsetArray->getUint32((index+1)*sizeof(uint32_t));
+ size_t length = endIdx - startIdx;
+ assert(length >= 0);
+ // Return an object created on the stack. The compiler will return a
+ // copy and destroy the stack object. The optimizer will hopefully
+ // elide this so we can return an object with no extra memory allocation
+ // and no copies.(SEE: http://en.wikipedia.org/wiki/Return_value_optimization)
+ VarWidthHolder dst;
+ dst.data=this->m_pData->getSliceStart()+startIdx;
+ dst.size=length;
+ return dst;
+ }
+
+ void getValueAt(size_t index, char* buf, size_t nChars) const {
+ size_t startIdx = this->m_pOffsetArray->getUint32(index*sizeof(uint32_t));
+ size_t endIdx = this->m_pOffsetArray->getUint32((index+1)*sizeof(uint32_t));
+ size_t length = endIdx - startIdx;
+ size_t copyChars=0;
+ assert(length >= 0);
+ copyChars=nChars<=length?nChars:length;
+ memcpy(buf, this->m_pData->getSliceStart()+startIdx, copyChars);
+ return;
+ }
+
+ const ByteBuf_t getRaw(size_t index) const {
+ size_t startIdx = this->m_pOffsetArray->getUint32(index*sizeof(uint32_t));
+ size_t endIdx = this->m_pOffsetArray->getUint32((index+1)*sizeof(uint32_t));
+ size_t length = endIdx - startIdx;
+ assert(length >= 0);
+ return this->m_pData->getSliceStart()+startIdx;
+ }
+
+ uint32_t getSize(size_t index) const {
+ size_t startIdx = this->m_pOffsetArray->getUint32(index*sizeof(uint32_t));
+ size_t endIdx = this->m_pOffsetArray->getUint32((index+1)*sizeof(uint32_t));
+ size_t length = endIdx - startIdx;
+ assert(length >= 0);
+ return length;
+ }
+ private:
+ SlicedByteBuf* m_pOffsetArray;
+ SlicedByteBuf* m_pData;
+};
+
+class DECLSPEC_DRILL_CLIENT ValueVectorVarChar:public ValueVectorVarWidth{
+ public:
+ ValueVectorVarChar(SlicedByteBuf *b, size_t rowCount):ValueVectorVarWidth(b, rowCount){
+ }
+ VarWidthHolder get(size_t index) const {
+ return ValueVectorVarWidth::get(index);
+ }
+};
+
+class DECLSPEC_DRILL_CLIENT ValueVectorVarBinary:public ValueVectorVarWidth{
+ public:
+ ValueVectorVarBinary(SlicedByteBuf *b, size_t rowCount):ValueVectorVarWidth(b, rowCount){
+ }
+};
+//
+//TODO: For windows, we have to export instantiations of the template class.
+//see: http://msdn.microsoft.com/en-us/library/twa2aw10.aspx
+//for example:
+//template class __declspec(dllexport) B<int>;
+//class __declspec(dllexport) D : public B<int> { }
+//
+// --------------------------------------------------------------------------------------
+// TODO: alias for all value vector types
+// --------------------------------------------------------------------------------------
+typedef NullableValueVectorTyped<int, ValueVectorBit > NullableValueVectorBit;
+// Aliases for Decimal Types:
+// The definitions for decimal digits, width, max precision are defined in
+// /exec/java-exec/src/main/codegen/data/ValueVectorTypes.tdd
+//
+// Decimal9 and Decimal18 could be optimized, maybe write seperate classes?
+typedef ValueVectorDecimalTrivial<int32_t> ValueVectorDecimal9;
+typedef ValueVectorDecimalTrivial<int64_t> ValueVectorDecimal18;
+typedef ValueVectorDecimal<3, 12, false, 28> ValueVectorDecimal28Dense;
+typedef ValueVectorDecimal<4, 16, false, 38> ValueVectorDecimal38Dense;
+typedef ValueVectorDecimal<5, 20, true, 28> ValueVectorDecimal28Sparse;
+typedef ValueVectorDecimal<6, 24, true, 38> ValueVectorDecimal38Sparse;
+
+typedef NullableValueVectorTyped<int32_t, ValueVectorDecimal9> NullableValueVectorDecimal9;
+typedef NullableValueVectorTyped<int64_t, ValueVectorDecimal18> NullableValueVectorDecimal18;
+typedef NullableValueVectorTyped<DecimalValue , ValueVectorDecimal28Dense> NullableValueVectorDecimal28Dense;
+typedef NullableValueVectorTyped<DecimalValue , ValueVectorDecimal38Dense> NullableValueVectorDecimal38Dense;
+typedef NullableValueVectorTyped<DecimalValue , ValueVectorDecimal28Sparse> NullableValueVectorDecimal28Sparse;
+typedef NullableValueVectorTyped<DecimalValue , ValueVectorDecimal38Sparse> NullableValueVectorDecimal38Sparse;
+
+typedef ValueVectorTyped<DateHolder, uint64_t> ValueVectorDate;
+typedef ValueVectorTyped<DateTimeHolder, uint64_t> ValueVectorTimestamp;
+typedef ValueVectorTyped<TimeHolder, uint32_t> ValueVectorTime;
+typedef ValueVectorTypedComposite<DateTimeTZHolder> ValueVectorTimestampTZ;
+typedef ValueVectorTypedComposite<IntervalHolder> ValueVectorInterval;
+typedef ValueVectorTypedComposite<IntervalDayHolder> ValueVectorIntervalDay;
+typedef ValueVectorTypedComposite<IntervalYearHolder> ValueVectorIntervalYear;
+
+typedef NullableValueVectorTyped<DateHolder, ValueVectorDate> NullableValueVectorDate;
+typedef NullableValueVectorTyped<DateTimeHolder, ValueVectorTimestamp> NullableValueVectorTimestamp;
+typedef NullableValueVectorTyped<TimeHolder, ValueVectorTime> NullableValueVectorTime;
+typedef NullableValueVectorTyped<DateTimeTZHolder, ValueVectorTimestampTZ> NullableValueVectorTimestampTZ;
+typedef NullableValueVectorTyped<IntervalHolder, ValueVectorInterval> NullableValueVectorInterval;
+typedef NullableValueVectorTyped<IntervalDayHolder, ValueVectorIntervalDay> NullableValueVectorIntervalDay;
+typedef NullableValueVectorTyped<IntervalYearHolder, ValueVectorIntervalYear> NullableValueVectorIntervalYear;
+
+class DECLSPEC_DRILL_CLIENT FieldMetadata{
+ public:
+ FieldMetadata(){};
+ void set(const exec::shared::SerializedField& f){
+ m_name=f.name_part().name();
+ m_minorType=f.major_type().minor_type();
+ m_dataMode=f.major_type().mode();
+ m_valueCount=f.value_count();
+ m_scale=f.major_type().scale();
+ m_precision=f.major_type().precision();
+ m_bufferLength=f.buffer_length();
+ }
+ const std::string& getName(){ return m_name;}
+ common::MinorType getMinorType() const{ return m_minorType;}
+ common::DataMode getDataMode() const{return m_dataMode;}
+ uint32_t getValueCount() const{return m_valueCount;}
+ uint32_t getScale() const{return m_scale;}
+ uint32_t getBufferLength() const{return m_bufferLength;}
+ void copy(Drill::FieldMetadata& f){
+ m_name=f.m_name;
+ m_minorType=f.m_minorType;
+ m_dataMode=f.m_dataMode;
+ m_valueCount=f.m_valueCount;
+ m_scale=f.m_scale;
+ m_precision=f.m_precision;
+ m_bufferLength=f.m_bufferLength;
+ }
+
+ private:
+ //exec::shared::FieldMetadata* m_pFieldMetadata;
+ std::string m_name;
+ common::MinorType m_minorType;
+ common::DataMode m_dataMode;
+ uint32_t m_valueCount;
+ uint32_t m_scale;
+ uint32_t m_precision;
+ uint32_t m_bufferLength;
+};
+
+class FieldBatch{
+ public:
+ FieldBatch(const Drill::FieldMetadata& fmd, const ByteBuf_t data, size_t start, size_t length):
+ m_fieldMetadata(fmd){
+ m_pValueVector=NULL;
+ m_pFieldData=new SlicedByteBuf(data, start, length);
+ }
+
+ ~FieldBatch(){
+ if(m_pFieldData!=NULL){
+ delete m_pFieldData; m_pFieldData=NULL;
+ }
+ if(m_pValueVector!=NULL){
+ delete m_pValueVector; m_pValueVector=NULL;
+ }
+ }
+
+ // Loads the data into a Value Vector ofappropriate type
+ ret_t load();
+
+ const ValueVectorBase * getVector(){
+ return m_pValueVector;
+ }
+
+ private:
+ const Drill::FieldMetadata& m_fieldMetadata;
+ ValueVectorBase * m_pValueVector;
+ SlicedByteBuf * m_pFieldData;
+
+};
+
+class ValueVectorFactory{
+ public:
+ static ValueVectorBase* allocateValueVector(const Drill::FieldMetadata & fmd, SlicedByteBuf *b);
+};
+
+class DECLSPEC_DRILL_CLIENT RecordBatch{
+ public:
+ RecordBatch(exec::user::QueryResult* pResult, ByteBuf_t b){
+ m_pQueryResult=pResult;
+ m_pRecordBatchDef=&pResult->def();
+ m_numRecords=pResult->row_count();
+ m_buffer=b;
+ m_numFields=pResult->def().field_size();
+ m_bHasSchemaChanged=false;
+ }
+
+ ~RecordBatch(){
+ m_buffer=NULL;
+ //free memory allocated for FieldBatch objects saved in m_fields;
+ for(std::vector<FieldBatch*>::iterator it = m_fields.begin(); it != m_fields.end(); ++it){
+ delete *it;
+ }
+ m_fields.clear();
+ for(std::vector<Drill::FieldMetadata*>::iterator it = m_fieldDefs.begin(); it != m_fieldDefs.end(); ++it){
+ delete *it;
+ }
+ m_fieldDefs.clear();
+ delete m_pQueryResult;
+ }
+
+ // get the ith field metadata
+ const Drill::FieldMetadata& getFieldMetadata(size_t index){
+ //return this->m_pRecordBatchDef->field(index);
+ return *(m_fieldDefs[index]);
+ }
+
+ size_t getNumRecords(){ return m_numRecords;}
+ std::vector<FieldBatch*>& getFields(){ return m_fields;}
+ size_t getNumFields() { return m_pRecordBatchDef->field_size(); }
+ bool isLastChunk() { return m_pQueryResult->is_last_chunk(); }
+
+ std::vector<Drill::FieldMetadata*>& getColumnDefs(){ return m_fieldDefs;}
+
+ //
+ // build the record batch: i.e. fill up the value vectors from the buffer.
+ // On fetching the data from the server, the caller creates a RecordBatch
+ // object then calls build() to build the value vectors.The caller saves the
+ // Record Batch and is responsible for freeing both the RecordBatch and the
+ // raw buffer memory
+ //
+ ret_t build();
+
+ void print(std::ostream& s, size_t num);
+
+ const ValueVectorBase * getVector(size_t index){
+ return m_fields[index]->getVector();
+ }
+
+ void schemaChanged(bool b){
+ this->m_bHasSchemaChanged=b;
+ }
+
+ bool hasSchemaChanged(){ return m_bHasSchemaChanged;}
+
+ #ifdef DEBUG
+ const exec::user::QueryResult* getQueryResult(){ return this->m_pQueryResult;}
+ #endif
+ private:
+ const exec::user::QueryResult* m_pQueryResult;
+ const exec::shared::RecordBatchDef* m_pRecordBatchDef;
+ ByteBuf_t m_buffer;
+ //build the current schema out of the field metadata
+ std::vector<Drill::FieldMetadata*> m_fieldDefs;
+ std::vector<FieldBatch*> m_fields;
+ size_t m_numFields;
+ size_t m_numRecords;
+ bool m_bHasSchemaChanged;
+
+}; // RecordBatch
+
+} // namespace
+
+#endif
diff --git a/contrib/native/client/src/protobuf/BitControl.pb.cc b/contrib/native/client/src/protobuf/BitControl.pb.cc
new file mode 100644
index 000000000..6e0e325a2
--- /dev/null
+++ b/contrib/native/client/src/protobuf/BitControl.pb.cc
@@ -0,0 +1,2486 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: BitControl.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "BitControl.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace bit {
+namespace control {
+
+namespace {
+
+const ::google::protobuf::Descriptor* BitControlHandshake_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ BitControlHandshake_reflection_ = NULL;
+const ::google::protobuf::Descriptor* BitStatus_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ BitStatus_reflection_ = NULL;
+const ::google::protobuf::Descriptor* FragmentStatus_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ FragmentStatus_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* FragmentStatus_FragmentState_descriptor_ = NULL;
+const ::google::protobuf::Descriptor* PlanFragment_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ PlanFragment_reflection_ = NULL;
+const ::google::protobuf::Descriptor* WorkQueueStatus_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ WorkQueueStatus_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_BitControl_2eproto() {
+ protobuf_AddDesc_BitControl_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "BitControl.proto");
+ GOOGLE_CHECK(file != NULL);
+ BitControlHandshake_descriptor_ = file->message_type(0);
+ static const int BitControlHandshake_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitControlHandshake, rpc_version_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitControlHandshake, channel_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitControlHandshake, endpoint_),
+ };
+ BitControlHandshake_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ BitControlHandshake_descriptor_,
+ BitControlHandshake::default_instance_,
+ BitControlHandshake_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitControlHandshake, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitControlHandshake, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(BitControlHandshake));
+ BitStatus_descriptor_ = file->message_type(1);
+ static const int BitStatus_offsets_[1] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitStatus, fragment_status_),
+ };
+ BitStatus_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ BitStatus_descriptor_,
+ BitStatus::default_instance_,
+ BitStatus_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitStatus, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitStatus, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(BitStatus));
+ FragmentStatus_descriptor_ = file->message_type(2);
+ static const int FragmentStatus_offsets_[9] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, memory_use_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, batches_completed_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, records_completed_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, estimated_completion_percentage_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, state_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, data_processed_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, handle_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, error_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, running_time_),
+ };
+ FragmentStatus_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ FragmentStatus_descriptor_,
+ FragmentStatus::default_instance_,
+ FragmentStatus_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentStatus, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(FragmentStatus));
+ FragmentStatus_FragmentState_descriptor_ = FragmentStatus_descriptor_->enum_type(0);
+ PlanFragment_descriptor_ = file->message_type(3);
+ static const int PlanFragment_offsets_[15] = {
+ 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, 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_),
+ };
+ PlanFragment_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ PlanFragment_descriptor_,
+ PlanFragment::default_instance_,
+ PlanFragment_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(PlanFragment));
+ WorkQueueStatus_descriptor_ = file->message_type(4);
+ static const int WorkQueueStatus_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, endpoint_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, queue_length_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, report_time_),
+ };
+ WorkQueueStatus_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ WorkQueueStatus_descriptor_,
+ WorkQueueStatus::default_instance_,
+ WorkQueueStatus_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(WorkQueueStatus));
+ RpcType_descriptor_ = file->enum_type(0);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_BitControl_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ BitControlHandshake_descriptor_, &BitControlHandshake::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ BitStatus_descriptor_, &BitStatus::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ FragmentStatus_descriptor_, &FragmentStatus::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ PlanFragment_descriptor_, &PlanFragment::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ WorkQueueStatus_descriptor_, &WorkQueueStatus::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_BitControl_2eproto() {
+ delete BitControlHandshake::default_instance_;
+ delete BitControlHandshake_reflection_;
+ delete BitStatus::default_instance_;
+ delete BitStatus_reflection_;
+ delete FragmentStatus::default_instance_;
+ delete FragmentStatus_reflection_;
+ delete PlanFragment::default_instance_;
+ delete PlanFragment_reflection_;
+ delete WorkQueueStatus::default_instance_;
+ delete WorkQueueStatus_reflection_;
+}
+
+void protobuf_AddDesc_BitControl_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::exec::bit::protobuf_AddDesc_ExecutionProtos_2eproto();
+ ::exec::protobuf_AddDesc_Coordination_2eproto();
+ ::exec::shared::protobuf_AddDesc_UserBitShared_2eproto();
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\020BitControl.proto\022\020exec.bit.control\032\025Ex"
+ "ecutionProtos.proto\032\022Coordination.proto\032"
+ "\023UserBitShared.proto\"\213\001\n\023BitControlHands"
+ "hake\022\023\n\013rpc_version\030\001 \001(\005\0225\n\007channel\030\002 \001"
+ "(\0162\027.exec.shared.RpcChannel:\013BIT_CONTROL"
+ "\022(\n\010endpoint\030\003 \001(\0132\026.exec.DrillbitEndpoi"
+ "nt\"F\n\tBitStatus\0229\n\017fragment_status\030\001 \003(\013"
+ "2 .exec.bit.control.FragmentStatus\"\261\003\n\016F"
+ "ragmentStatus\022\022\n\nmemory_use\030\001 \001(\003\022\031\n\021bat"
+ "ches_completed\030\002 \001(\003\022\031\n\021records_complete"
+ "d\030\003 \001(\003\022\'\n\037estimated_completion_percenta"
+ "ge\030\004 \001(\005\022=\n\005state\030\005 \001(\0162..exec.bit.contr"
+ "ol.FragmentStatus.FragmentState\022\026\n\016data_"
+ "processed\030\006 \001(\003\022(\n\006handle\030\007 \001(\0132\030.exec.b"
+ "it.FragmentHandle\022(\n\005error\030\010 \001(\0132\031.exec."
+ "shared.DrillPBError\022\024\n\014running_time\030\t \001("
+ "\003\"k\n\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023AWAIT"
+ "ING_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FINISHE"
+ "D\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\"\276\003\n\014PlanF"
+ "ragment\022(\n\006handle\030\001 \001(\0132\030.exec.bit.Fragm"
+ "entHandle\022\024\n\014network_cost\030\004 \001(\002\022\020\n\010cpu_c"
+ "ost\030\005 \001(\002\022\021\n\tdisk_cost\030\006 \001(\002\022\023\n\013memory_c"
+ "ost\030\007 \001(\002\022\025\n\rfragment_json\030\010 \001(\t\022*\n\nassi"
+ "gnment\030\n \001(\0132\026.exec.DrillbitEndpoint\022\025\n\r"
+ "leaf_fragment\030\t \001(\010\022\'\n\007foreman\030\013 \001(\0132\026.e"
+ "xec.DrillbitEndpoint\022\035\n\013mem_initial\030\014 \001("
+ "\003:\01020000000\022\034\n\007mem_max\030\r \001(\003:\0132000000000"
+ "0\022\030\n\020query_start_time\030\016 \001(\003\0221\n\013credentia"
+ "ls\030\017 \001(\0132\034.exec.shared.UserCredentials\022\021"
+ "\n\ttime_zone\030\020 \001(\005\022\024\n\014options_json\030\021 \001(\t\""
+ "f\n\017WorkQueueStatus\022(\n\010endpoint\030\001 \001(\0132\026.e"
+ "xec.DrillbitEndpoint\022\024\n\014queue_length\030\002 \001"
+ "(\005\022\023\n\013report_time\030\003 \001(\003*\332\001\n\007RpcType\022\r\n\tH"
+ "ANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\033\n\027REQ_"
+ "INIATILIZE_FRAGMENT\020\003\022\027\n\023REQ_CANCEL_FRAG"
+ "MENT\020\006\022\027\n\023REQ_FRAGMENT_STATUS\020\007\022\022\n\016REQ_B"
+ "IT_STATUS\020\010\022\030\n\024RESP_FRAGMENT_HANDLE\020\t\022\030\n"
+ "\024RESP_FRAGMENT_STATUS\020\n\022\023\n\017RESP_BIT_STAT"
+ "US\020\013B+\n\033org.apache.drill.exec.protoB\nBit"
+ "ControlH\001", 1569);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "BitControl.proto", &protobuf_RegisterTypes);
+ BitControlHandshake::default_instance_ = new BitControlHandshake();
+ BitStatus::default_instance_ = new BitStatus();
+ FragmentStatus::default_instance_ = new FragmentStatus();
+ PlanFragment::default_instance_ = new PlanFragment();
+ WorkQueueStatus::default_instance_ = new WorkQueueStatus();
+ BitControlHandshake::default_instance_->InitAsDefaultInstance();
+ BitStatus::default_instance_->InitAsDefaultInstance();
+ FragmentStatus::default_instance_->InitAsDefaultInstance();
+ PlanFragment::default_instance_->InitAsDefaultInstance();
+ WorkQueueStatus::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_BitControl_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_BitControl_2eproto {
+ StaticDescriptorInitializer_BitControl_2eproto() {
+ protobuf_AddDesc_BitControl_2eproto();
+ }
+} static_descriptor_initializer_BitControl_2eproto_;
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RpcType_descriptor_;
+}
+bool RpcType_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int BitControlHandshake::kRpcVersionFieldNumber;
+const int BitControlHandshake::kChannelFieldNumber;
+const int BitControlHandshake::kEndpointFieldNumber;
+#endif // !_MSC_VER
+
+BitControlHandshake::BitControlHandshake()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void BitControlHandshake::InitAsDefaultInstance() {
+ endpoint_ = const_cast< ::exec::DrillbitEndpoint*>(&::exec::DrillbitEndpoint::default_instance());
+}
+
+BitControlHandshake::BitControlHandshake(const BitControlHandshake& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void BitControlHandshake::SharedCtor() {
+ _cached_size_ = 0;
+ rpc_version_ = 0;
+ channel_ = 0;
+ endpoint_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+BitControlHandshake::~BitControlHandshake() {
+ SharedDtor();
+}
+
+void BitControlHandshake::SharedDtor() {
+ if (this != default_instance_) {
+ delete endpoint_;
+ }
+}
+
+void BitControlHandshake::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* BitControlHandshake::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return BitControlHandshake_descriptor_;
+}
+
+const BitControlHandshake& BitControlHandshake::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitControl_2eproto();
+ return *default_instance_;
+}
+
+BitControlHandshake* BitControlHandshake::default_instance_ = NULL;
+
+BitControlHandshake* BitControlHandshake::New() const {
+ return new BitControlHandshake;
+}
+
+void BitControlHandshake::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ rpc_version_ = 0;
+ channel_ = 0;
+ if (has_endpoint()) {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool BitControlHandshake::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 int32 rpc_version = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &rpc_version_)));
+ set_has_rpc_version();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_channel;
+ break;
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_CONTROL];
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_channel:
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::shared::RpcChannel_IsValid(value)) {
+ set_channel(static_cast< ::exec::shared::RpcChannel >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(2, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_endpoint;
+ break;
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_endpoint:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_endpoint()));
+ } 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 BitControlHandshake::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->rpc_version(), output);
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_CONTROL];
+ if (has_channel()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 2, this->channel(), output);
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ if (has_endpoint()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, this->endpoint(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* BitControlHandshake::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->rpc_version(), target);
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_CONTROL];
+ if (has_channel()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 2, this->channel(), target);
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ if (has_endpoint()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 3, this->endpoint(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int BitControlHandshake::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->rpc_version());
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_CONTROL];
+ if (has_channel()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->channel());
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ if (has_endpoint()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->endpoint());
+ }
+
+ }
+ 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 BitControlHandshake::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const BitControlHandshake* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const BitControlHandshake*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void BitControlHandshake::MergeFrom(const BitControlHandshake& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_rpc_version()) {
+ set_rpc_version(from.rpc_version());
+ }
+ if (from.has_channel()) {
+ set_channel(from.channel());
+ }
+ if (from.has_endpoint()) {
+ mutable_endpoint()->::exec::DrillbitEndpoint::MergeFrom(from.endpoint());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void BitControlHandshake::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void BitControlHandshake::CopyFrom(const BitControlHandshake& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool BitControlHandshake::IsInitialized() const {
+
+ return true;
+}
+
+void BitControlHandshake::Swap(BitControlHandshake* other) {
+ if (other != this) {
+ std::swap(rpc_version_, other->rpc_version_);
+ std::swap(channel_, other->channel_);
+ std::swap(endpoint_, other->endpoint_);
+ 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 BitControlHandshake::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = BitControlHandshake_descriptor_;
+ metadata.reflection = BitControlHandshake_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int BitStatus::kFragmentStatusFieldNumber;
+#endif // !_MSC_VER
+
+BitStatus::BitStatus()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void BitStatus::InitAsDefaultInstance() {
+}
+
+BitStatus::BitStatus(const BitStatus& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void BitStatus::SharedCtor() {
+ _cached_size_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+BitStatus::~BitStatus() {
+ SharedDtor();
+}
+
+void BitStatus::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void BitStatus::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* BitStatus::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return BitStatus_descriptor_;
+}
+
+const BitStatus& BitStatus::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitControl_2eproto();
+ return *default_instance_;
+}
+
+BitStatus* BitStatus::default_instance_ = NULL;
+
+BitStatus* BitStatus::New() const {
+ return new BitStatus;
+}
+
+void BitStatus::Clear() {
+ fragment_status_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool BitStatus::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)) {
+ // repeated .exec.bit.control.FragmentStatus fragment_status = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_fragment_status:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_fragment_status()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(10)) goto parse_fragment_status;
+ 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 BitStatus::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // repeated .exec.bit.control.FragmentStatus fragment_status = 1;
+ for (int i = 0; i < this->fragment_status_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->fragment_status(i), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* BitStatus::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .exec.bit.control.FragmentStatus fragment_status = 1;
+ for (int i = 0; i < this->fragment_status_size(); i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->fragment_status(i), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int BitStatus::ByteSize() const {
+ int total_size = 0;
+
+ // repeated .exec.bit.control.FragmentStatus fragment_status = 1;
+ total_size += 1 * this->fragment_status_size();
+ for (int i = 0; i < this->fragment_status_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->fragment_status(i));
+ }
+
+ 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 BitStatus::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const BitStatus* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const BitStatus*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void BitStatus::MergeFrom(const BitStatus& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ fragment_status_.MergeFrom(from.fragment_status_);
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void BitStatus::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void BitStatus::CopyFrom(const BitStatus& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool BitStatus::IsInitialized() const {
+
+ return true;
+}
+
+void BitStatus::Swap(BitStatus* other) {
+ if (other != this) {
+ fragment_status_.Swap(&other->fragment_status_);
+ 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 BitStatus::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = BitStatus_descriptor_;
+ metadata.reflection = BitStatus_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+const ::google::protobuf::EnumDescriptor* FragmentStatus_FragmentState_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return FragmentStatus_FragmentState_descriptor_;
+}
+bool FragmentStatus_FragmentState_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#ifndef _MSC_VER
+const FragmentStatus_FragmentState FragmentStatus::SENDING;
+const FragmentStatus_FragmentState FragmentStatus::AWAITING_ALLOCATION;
+const FragmentStatus_FragmentState FragmentStatus::RUNNING;
+const FragmentStatus_FragmentState FragmentStatus::FINISHED;
+const FragmentStatus_FragmentState FragmentStatus::CANCELLED;
+const FragmentStatus_FragmentState FragmentStatus::FAILED;
+const FragmentStatus_FragmentState FragmentStatus::FragmentState_MIN;
+const FragmentStatus_FragmentState FragmentStatus::FragmentState_MAX;
+const int FragmentStatus::FragmentState_ARRAYSIZE;
+#endif // _MSC_VER
+#ifndef _MSC_VER
+const int FragmentStatus::kMemoryUseFieldNumber;
+const int FragmentStatus::kBatchesCompletedFieldNumber;
+const int FragmentStatus::kRecordsCompletedFieldNumber;
+const int FragmentStatus::kEstimatedCompletionPercentageFieldNumber;
+const int FragmentStatus::kStateFieldNumber;
+const int FragmentStatus::kDataProcessedFieldNumber;
+const int FragmentStatus::kHandleFieldNumber;
+const int FragmentStatus::kErrorFieldNumber;
+const int FragmentStatus::kRunningTimeFieldNumber;
+#endif // !_MSC_VER
+
+FragmentStatus::FragmentStatus()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void FragmentStatus::InitAsDefaultInstance() {
+ handle_ = const_cast< ::exec::bit::FragmentHandle*>(&::exec::bit::FragmentHandle::default_instance());
+ error_ = const_cast< ::exec::shared::DrillPBError*>(&::exec::shared::DrillPBError::default_instance());
+}
+
+FragmentStatus::FragmentStatus(const FragmentStatus& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void FragmentStatus::SharedCtor() {
+ _cached_size_ = 0;
+ memory_use_ = GOOGLE_LONGLONG(0);
+ batches_completed_ = GOOGLE_LONGLONG(0);
+ records_completed_ = GOOGLE_LONGLONG(0);
+ estimated_completion_percentage_ = 0;
+ state_ = 0;
+ data_processed_ = GOOGLE_LONGLONG(0);
+ handle_ = NULL;
+ error_ = NULL;
+ running_time_ = GOOGLE_LONGLONG(0);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+FragmentStatus::~FragmentStatus() {
+ SharedDtor();
+}
+
+void FragmentStatus::SharedDtor() {
+ if (this != default_instance_) {
+ delete handle_;
+ delete error_;
+ }
+}
+
+void FragmentStatus::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* FragmentStatus::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return FragmentStatus_descriptor_;
+}
+
+const FragmentStatus& FragmentStatus::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitControl_2eproto();
+ return *default_instance_;
+}
+
+FragmentStatus* FragmentStatus::default_instance_ = NULL;
+
+FragmentStatus* FragmentStatus::New() const {
+ return new FragmentStatus;
+}
+
+void FragmentStatus::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ memory_use_ = GOOGLE_LONGLONG(0);
+ batches_completed_ = GOOGLE_LONGLONG(0);
+ records_completed_ = GOOGLE_LONGLONG(0);
+ estimated_completion_percentage_ = 0;
+ state_ = 0;
+ data_processed_ = GOOGLE_LONGLONG(0);
+ if (has_handle()) {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ }
+ if (has_error()) {
+ if (error_ != NULL) error_->::exec::shared::DrillPBError::Clear();
+ }
+ }
+ if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
+ running_time_ = GOOGLE_LONGLONG(0);
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool FragmentStatus::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 memory_use = 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, &memory_use_)));
+ set_has_memory_use();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_batches_completed;
+ break;
+ }
+
+ // optional int64 batches_completed = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_batches_completed:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &batches_completed_)));
+ set_has_batches_completed();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_records_completed;
+ break;
+ }
+
+ // optional int64 records_completed = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_records_completed:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &records_completed_)));
+ set_has_records_completed();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(32)) goto parse_estimated_completion_percentage;
+ break;
+ }
+
+ // optional int32 estimated_completion_percentage = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_estimated_completion_percentage:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &estimated_completion_percentage_)));
+ set_has_estimated_completion_percentage();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(40)) goto parse_state;
+ break;
+ }
+
+ // optional .exec.bit.control.FragmentStatus.FragmentState state = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_state:
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::bit::control::FragmentStatus_FragmentState_IsValid(value)) {
+ set_state(static_cast< ::exec::bit::control::FragmentStatus_FragmentState >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(5, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(48)) goto parse_data_processed;
+ break;
+ }
+
+ // optional int64 data_processed = 6;
+ case 6: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_data_processed:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &data_processed_)));
+ set_has_data_processed();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(58)) goto parse_handle;
+ break;
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 7;
+ case 7: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_handle:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_handle()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(66)) goto parse_error;
+ break;
+ }
+
+ // optional .exec.shared.DrillPBError error = 8;
+ case 8: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_error:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_error()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(72)) goto parse_running_time;
+ break;
+ }
+
+ // optional int64 running_time = 9;
+ case 9: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_running_time:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &running_time_)));
+ set_has_running_time();
+ } 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 FragmentStatus::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int64 memory_use = 1;
+ if (has_memory_use()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->memory_use(), output);
+ }
+
+ // optional int64 batches_completed = 2;
+ if (has_batches_completed()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->batches_completed(), output);
+ }
+
+ // optional int64 records_completed = 3;
+ if (has_records_completed()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->records_completed(), output);
+ }
+
+ // optional int32 estimated_completion_percentage = 4;
+ if (has_estimated_completion_percentage()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->estimated_completion_percentage(), output);
+ }
+
+ // optional .exec.bit.control.FragmentStatus.FragmentState state = 5;
+ if (has_state()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 5, this->state(), output);
+ }
+
+ // optional int64 data_processed = 6;
+ if (has_data_processed()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->data_processed(), output);
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 7;
+ if (has_handle()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 7, this->handle(), output);
+ }
+
+ // optional .exec.shared.DrillPBError error = 8;
+ if (has_error()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 8, this->error(), output);
+ }
+
+ // optional int64 running_time = 9;
+ if (has_running_time()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(9, this->running_time(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* FragmentStatus::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int64 memory_use = 1;
+ if (has_memory_use()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->memory_use(), target);
+ }
+
+ // optional int64 batches_completed = 2;
+ if (has_batches_completed()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->batches_completed(), target);
+ }
+
+ // optional int64 records_completed = 3;
+ if (has_records_completed()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->records_completed(), target);
+ }
+
+ // optional int32 estimated_completion_percentage = 4;
+ if (has_estimated_completion_percentage()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->estimated_completion_percentage(), target);
+ }
+
+ // optional .exec.bit.control.FragmentStatus.FragmentState state = 5;
+ if (has_state()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 5, this->state(), target);
+ }
+
+ // optional int64 data_processed = 6;
+ if (has_data_processed()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->data_processed(), target);
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 7;
+ if (has_handle()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 7, this->handle(), target);
+ }
+
+ // optional .exec.shared.DrillPBError error = 8;
+ if (has_error()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 8, this->error(), target);
+ }
+
+ // optional int64 running_time = 9;
+ if (has_running_time()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(9, this->running_time(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int FragmentStatus::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int64 memory_use = 1;
+ if (has_memory_use()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->memory_use());
+ }
+
+ // optional int64 batches_completed = 2;
+ if (has_batches_completed()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->batches_completed());
+ }
+
+ // optional int64 records_completed = 3;
+ if (has_records_completed()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->records_completed());
+ }
+
+ // optional int32 estimated_completion_percentage = 4;
+ if (has_estimated_completion_percentage()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->estimated_completion_percentage());
+ }
+
+ // optional .exec.bit.control.FragmentStatus.FragmentState state = 5;
+ if (has_state()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
+ }
+
+ // optional int64 data_processed = 6;
+ if (has_data_processed()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->data_processed());
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 7;
+ if (has_handle()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->handle());
+ }
+
+ // optional .exec.shared.DrillPBError error = 8;
+ if (has_error()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->error());
+ }
+
+ }
+ if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
+ // optional int64 running_time = 9;
+ if (has_running_time()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->running_time());
+ }
+
+ }
+ 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 FragmentStatus::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const FragmentStatus* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const FragmentStatus*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void FragmentStatus::MergeFrom(const FragmentStatus& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_memory_use()) {
+ set_memory_use(from.memory_use());
+ }
+ if (from.has_batches_completed()) {
+ set_batches_completed(from.batches_completed());
+ }
+ if (from.has_records_completed()) {
+ set_records_completed(from.records_completed());
+ }
+ if (from.has_estimated_completion_percentage()) {
+ set_estimated_completion_percentage(from.estimated_completion_percentage());
+ }
+ if (from.has_state()) {
+ set_state(from.state());
+ }
+ if (from.has_data_processed()) {
+ set_data_processed(from.data_processed());
+ }
+ if (from.has_handle()) {
+ mutable_handle()->::exec::bit::FragmentHandle::MergeFrom(from.handle());
+ }
+ if (from.has_error()) {
+ mutable_error()->::exec::shared::DrillPBError::MergeFrom(from.error());
+ }
+ }
+ if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
+ if (from.has_running_time()) {
+ set_running_time(from.running_time());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void FragmentStatus::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void FragmentStatus::CopyFrom(const FragmentStatus& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool FragmentStatus::IsInitialized() const {
+
+ return true;
+}
+
+void FragmentStatus::Swap(FragmentStatus* other) {
+ if (other != this) {
+ std::swap(memory_use_, other->memory_use_);
+ std::swap(batches_completed_, other->batches_completed_);
+ std::swap(records_completed_, other->records_completed_);
+ std::swap(estimated_completion_percentage_, other->estimated_completion_percentage_);
+ std::swap(state_, other->state_);
+ std::swap(data_processed_, other->data_processed_);
+ std::swap(handle_, other->handle_);
+ std::swap(error_, other->error_);
+ std::swap(running_time_, other->running_time_);
+ 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 FragmentStatus::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = FragmentStatus_descriptor_;
+ metadata.reflection = FragmentStatus_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int PlanFragment::kHandleFieldNumber;
+const int PlanFragment::kNetworkCostFieldNumber;
+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::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;
+#endif // !_MSC_VER
+
+PlanFragment::PlanFragment()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void PlanFragment::InitAsDefaultInstance() {
+ handle_ = const_cast< ::exec::bit::FragmentHandle*>(&::exec::bit::FragmentHandle::default_instance());
+ 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());
+}
+
+PlanFragment::PlanFragment(const PlanFragment& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void PlanFragment::SharedCtor() {
+ _cached_size_ = 0;
+ handle_ = NULL;
+ network_cost_ = 0;
+ cpu_cost_ = 0;
+ disk_cost_ = 0;
+ memory_cost_ = 0;
+ fragment_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ assignment_ = NULL;
+ leaf_fragment_ = false;
+ foreman_ = NULL;
+ mem_initial_ = GOOGLE_LONGLONG(20000000);
+ mem_max_ = GOOGLE_LONGLONG(20000000000);
+ query_start_time_ = GOOGLE_LONGLONG(0);
+ credentials_ = NULL;
+ time_zone_ = 0;
+ options_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+PlanFragment::~PlanFragment() {
+ SharedDtor();
+}
+
+void PlanFragment::SharedDtor() {
+ if (fragment_json_ != &::google::protobuf::internal::kEmptyString) {
+ delete fragment_json_;
+ }
+ if (options_json_ != &::google::protobuf::internal::kEmptyString) {
+ delete options_json_;
+ }
+ if (this != default_instance_) {
+ delete handle_;
+ delete assignment_;
+ delete foreman_;
+ delete credentials_;
+ }
+}
+
+void PlanFragment::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* PlanFragment::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return PlanFragment_descriptor_;
+}
+
+const PlanFragment& PlanFragment::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitControl_2eproto();
+ return *default_instance_;
+}
+
+PlanFragment* PlanFragment::default_instance_ = NULL;
+
+PlanFragment* PlanFragment::New() const {
+ return new PlanFragment;
+}
+
+void PlanFragment::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_handle()) {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ }
+ network_cost_ = 0;
+ cpu_cost_ = 0;
+ disk_cost_ = 0;
+ memory_cost_ = 0;
+ if (has_fragment_json()) {
+ if (fragment_json_ != &::google::protobuf::internal::kEmptyString) {
+ fragment_json_->clear();
+ }
+ }
+ if (has_assignment()) {
+ if (assignment_ != NULL) assignment_->::exec::DrillbitEndpoint::Clear();
+ }
+ leaf_fragment_ = false;
+ }
+ if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
+ if (has_foreman()) {
+ if (foreman_ != NULL) foreman_->::exec::DrillbitEndpoint::Clear();
+ }
+ mem_initial_ = GOOGLE_LONGLONG(20000000);
+ mem_max_ = GOOGLE_LONGLONG(20000000000);
+ 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();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool PlanFragment::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 .exec.bit.FragmentHandle handle = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_handle()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(37)) goto parse_network_cost;
+ break;
+ }
+
+ // optional float network_cost = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
+ parse_network_cost:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+ input, &network_cost_)));
+ set_has_network_cost();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(45)) goto parse_cpu_cost;
+ break;
+ }
+
+ // optional float cpu_cost = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
+ parse_cpu_cost:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+ input, &cpu_cost_)));
+ set_has_cpu_cost();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(53)) goto parse_disk_cost;
+ break;
+ }
+
+ // optional float disk_cost = 6;
+ case 6: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
+ parse_disk_cost:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+ input, &disk_cost_)));
+ set_has_disk_cost();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(61)) goto parse_memory_cost;
+ break;
+ }
+
+ // optional float memory_cost = 7;
+ case 7: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
+ parse_memory_cost:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+ input, &memory_cost_)));
+ set_has_memory_cost();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(66)) goto parse_fragment_json;
+ break;
+ }
+
+ // optional string fragment_json = 8;
+ case 8: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_fragment_json:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_fragment_json()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->fragment_json().data(), this->fragment_json().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(72)) goto parse_leaf_fragment;
+ break;
+ }
+
+ // optional bool leaf_fragment = 9;
+ case 9: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_leaf_fragment:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &leaf_fragment_)));
+ set_has_leaf_fragment();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(82)) goto parse_assignment;
+ break;
+ }
+
+ // optional .exec.DrillbitEndpoint assignment = 10;
+ case 10: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_assignment:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_assignment()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(90)) goto parse_foreman;
+ break;
+ }
+
+ // optional .exec.DrillbitEndpoint foreman = 11;
+ case 11: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_foreman:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_foreman()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(96)) goto parse_mem_initial;
+ break;
+ }
+
+ // optional int64 mem_initial = 12 [default = 20000000];
+ case 12: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_mem_initial:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &mem_initial_)));
+ set_has_mem_initial();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(104)) goto parse_mem_max;
+ break;
+ }
+
+ // optional int64 mem_max = 13 [default = 20000000000];
+ case 13: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_mem_max:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &mem_max_)));
+ set_has_mem_max();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(112)) goto parse_query_start_time;
+ break;
+ }
+
+ // optional int64 query_start_time = 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(
+ input, mutable_credentials()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(128)) goto parse_time_zone;
+ break;
+ }
+
+ // optional int32 time_zone = 16;
+ case 16: {
+ 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(138)) goto parse_options_json;
+ break;
+ }
+
+ // optional string options_json = 17;
+ case 17: {
+ 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);
+ } 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 PlanFragment::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.bit.FragmentHandle handle = 1;
+ if (has_handle()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->handle(), output);
+ }
+
+ // optional float network_cost = 4;
+ if (has_network_cost()) {
+ ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->network_cost(), output);
+ }
+
+ // optional float cpu_cost = 5;
+ if (has_cpu_cost()) {
+ ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->cpu_cost(), output);
+ }
+
+ // optional float disk_cost = 6;
+ if (has_disk_cost()) {
+ ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->disk_cost(), output);
+ }
+
+ // optional float memory_cost = 7;
+ if (has_memory_cost()) {
+ ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->memory_cost(), output);
+ }
+
+ // optional string fragment_json = 8;
+ if (has_fragment_json()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->fragment_json().data(), this->fragment_json().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 8, this->fragment_json(), output);
+ }
+
+ // optional bool leaf_fragment = 9;
+ if (has_leaf_fragment()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(9, this->leaf_fragment(), output);
+ }
+
+ // optional .exec.DrillbitEndpoint assignment = 10;
+ if (has_assignment()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 10, this->assignment(), output);
+ }
+
+ // optional .exec.DrillbitEndpoint foreman = 11;
+ if (has_foreman()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 11, this->foreman(), output);
+ }
+
+ // optional int64 mem_initial = 12 [default = 20000000];
+ if (has_mem_initial()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(12, this->mem_initial(), output);
+ }
+
+ // optional int64 mem_max = 13 [default = 20000000000];
+ if (has_mem_max()) {
+ ::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;
+ 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);
+ }
+
+ // optional string options_json = 17;
+ 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);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* PlanFragment::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.bit.FragmentHandle handle = 1;
+ if (has_handle()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->handle(), target);
+ }
+
+ // optional float network_cost = 4;
+ if (has_network_cost()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->network_cost(), target);
+ }
+
+ // optional float cpu_cost = 5;
+ if (has_cpu_cost()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->cpu_cost(), target);
+ }
+
+ // optional float disk_cost = 6;
+ if (has_disk_cost()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->disk_cost(), target);
+ }
+
+ // optional float memory_cost = 7;
+ if (has_memory_cost()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->memory_cost(), target);
+ }
+
+ // optional string fragment_json = 8;
+ if (has_fragment_json()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->fragment_json().data(), this->fragment_json().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 8, this->fragment_json(), target);
+ }
+
+ // optional bool leaf_fragment = 9;
+ if (has_leaf_fragment()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(9, this->leaf_fragment(), target);
+ }
+
+ // optional .exec.DrillbitEndpoint assignment = 10;
+ if (has_assignment()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 10, this->assignment(), target);
+ }
+
+ // optional .exec.DrillbitEndpoint foreman = 11;
+ if (has_foreman()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 11, this->foreman(), target);
+ }
+
+ // optional int64 mem_initial = 12 [default = 20000000];
+ if (has_mem_initial()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(12, this->mem_initial(), target);
+ }
+
+ // optional int64 mem_max = 13 [default = 20000000000];
+ if (has_mem_max()) {
+ 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;
+ 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);
+ }
+
+ // optional string options_json = 17;
+ 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);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int PlanFragment::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.bit.FragmentHandle handle = 1;
+ if (has_handle()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->handle());
+ }
+
+ // optional float network_cost = 4;
+ if (has_network_cost()) {
+ total_size += 1 + 4;
+ }
+
+ // optional float cpu_cost = 5;
+ if (has_cpu_cost()) {
+ total_size += 1 + 4;
+ }
+
+ // optional float disk_cost = 6;
+ if (has_disk_cost()) {
+ total_size += 1 + 4;
+ }
+
+ // optional float memory_cost = 7;
+ if (has_memory_cost()) {
+ total_size += 1 + 4;
+ }
+
+ // optional string fragment_json = 8;
+ if (has_fragment_json()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->fragment_json());
+ }
+
+ // optional .exec.DrillbitEndpoint assignment = 10;
+ if (has_assignment()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ 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;
+ if (has_foreman()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->foreman());
+ }
+
+ // optional int64 mem_initial = 12 [default = 20000000];
+ if (has_mem_initial()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->mem_initial());
+ }
+
+ // optional int64 mem_max = 13 [default = 20000000000];
+ if (has_mem_max()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ 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;
+ 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;
+ if (has_options_json()) {
+ total_size += 2 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->options_json());
+ }
+
+ }
+ 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 PlanFragment::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const PlanFragment* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const PlanFragment*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void PlanFragment::MergeFrom(const PlanFragment& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_handle()) {
+ mutable_handle()->::exec::bit::FragmentHandle::MergeFrom(from.handle());
+ }
+ if (from.has_network_cost()) {
+ set_network_cost(from.network_cost());
+ }
+ if (from.has_cpu_cost()) {
+ set_cpu_cost(from.cpu_cost());
+ }
+ if (from.has_disk_cost()) {
+ set_disk_cost(from.disk_cost());
+ }
+ if (from.has_memory_cost()) {
+ set_memory_cost(from.memory_cost());
+ }
+ 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_bits_[8 / 32] & (0xffu << (8 % 32))) {
+ if (from.has_foreman()) {
+ mutable_foreman()->::exec::DrillbitEndpoint::MergeFrom(from.foreman());
+ }
+ if (from.has_mem_initial()) {
+ set_mem_initial(from.mem_initial());
+ }
+ 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());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void PlanFragment::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void PlanFragment::CopyFrom(const PlanFragment& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool PlanFragment::IsInitialized() const {
+
+ return true;
+}
+
+void PlanFragment::Swap(PlanFragment* other) {
+ if (other != this) {
+ std::swap(handle_, other->handle_);
+ std::swap(network_cost_, other->network_cost_);
+ std::swap(cpu_cost_, other->cpu_cost_);
+ 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(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(_has_bits_[0], other->_has_bits_[0]);
+ _unknown_fields_.Swap(&other->_unknown_fields_);
+ std::swap(_cached_size_, other->_cached_size_);
+ }
+}
+
+::google::protobuf::Metadata PlanFragment::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = PlanFragment_descriptor_;
+ metadata.reflection = PlanFragment_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int WorkQueueStatus::kEndpointFieldNumber;
+const int WorkQueueStatus::kQueueLengthFieldNumber;
+const int WorkQueueStatus::kReportTimeFieldNumber;
+#endif // !_MSC_VER
+
+WorkQueueStatus::WorkQueueStatus()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void WorkQueueStatus::InitAsDefaultInstance() {
+ endpoint_ = const_cast< ::exec::DrillbitEndpoint*>(&::exec::DrillbitEndpoint::default_instance());
+}
+
+WorkQueueStatus::WorkQueueStatus(const WorkQueueStatus& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void WorkQueueStatus::SharedCtor() {
+ _cached_size_ = 0;
+ endpoint_ = NULL;
+ queue_length_ = 0;
+ report_time_ = GOOGLE_LONGLONG(0);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+WorkQueueStatus::~WorkQueueStatus() {
+ SharedDtor();
+}
+
+void WorkQueueStatus::SharedDtor() {
+ if (this != default_instance_) {
+ delete endpoint_;
+ }
+}
+
+void WorkQueueStatus::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* WorkQueueStatus::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return WorkQueueStatus_descriptor_;
+}
+
+const WorkQueueStatus& WorkQueueStatus::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitControl_2eproto();
+ return *default_instance_;
+}
+
+WorkQueueStatus* WorkQueueStatus::default_instance_ = NULL;
+
+WorkQueueStatus* WorkQueueStatus::New() const {
+ return new WorkQueueStatus;
+}
+
+void WorkQueueStatus::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_endpoint()) {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ }
+ queue_length_ = 0;
+ report_time_ = GOOGLE_LONGLONG(0);
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool WorkQueueStatus::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 .exec.DrillbitEndpoint endpoint = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_endpoint()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_queue_length;
+ break;
+ }
+
+ // optional int32 queue_length = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_queue_length:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &queue_length_)));
+ set_has_queue_length();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_report_time;
+ break;
+ }
+
+ // optional int64 report_time = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_report_time:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &report_time_)));
+ set_has_report_time();
+ } 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 WorkQueueStatus::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.DrillbitEndpoint endpoint = 1;
+ if (has_endpoint()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->endpoint(), output);
+ }
+
+ // optional int32 queue_length = 2;
+ if (has_queue_length()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->queue_length(), output);
+ }
+
+ // optional int64 report_time = 3;
+ if (has_report_time()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->report_time(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* WorkQueueStatus::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.DrillbitEndpoint endpoint = 1;
+ if (has_endpoint()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->endpoint(), target);
+ }
+
+ // optional int32 queue_length = 2;
+ if (has_queue_length()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->queue_length(), target);
+ }
+
+ // optional int64 report_time = 3;
+ if (has_report_time()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->report_time(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int WorkQueueStatus::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.DrillbitEndpoint endpoint = 1;
+ if (has_endpoint()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->endpoint());
+ }
+
+ // optional int32 queue_length = 2;
+ if (has_queue_length()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->queue_length());
+ }
+
+ // optional int64 report_time = 3;
+ if (has_report_time()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->report_time());
+ }
+
+ }
+ 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 WorkQueueStatus::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const WorkQueueStatus* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const WorkQueueStatus*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void WorkQueueStatus::MergeFrom(const WorkQueueStatus& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_endpoint()) {
+ mutable_endpoint()->::exec::DrillbitEndpoint::MergeFrom(from.endpoint());
+ }
+ if (from.has_queue_length()) {
+ set_queue_length(from.queue_length());
+ }
+ if (from.has_report_time()) {
+ set_report_time(from.report_time());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void WorkQueueStatus::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void WorkQueueStatus::CopyFrom(const WorkQueueStatus& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool WorkQueueStatus::IsInitialized() const {
+
+ return true;
+}
+
+void WorkQueueStatus::Swap(WorkQueueStatus* other) {
+ if (other != this) {
+ std::swap(endpoint_, other->endpoint_);
+ std::swap(queue_length_, other->queue_length_);
+ std::swap(report_time_, other->report_time_);
+ 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 WorkQueueStatus::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = WorkQueueStatus_descriptor_;
+ metadata.reflection = WorkQueueStatus_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace control
+} // namespace bit
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/BitControl.pb.h b/contrib/native/client/src/protobuf/BitControl.pb.h
new file mode 100644
index 000000000..e26f7c05d
--- /dev/null
+++ b/contrib/native/client/src/protobuf/BitControl.pb.h
@@ -0,0 +1,1785 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: BitControl.proto
+
+#ifndef PROTOBUF_BitControl_2eproto__INCLUDED
+#define PROTOBUF_BitControl_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "ExecutionProtos.pb.h"
+#include "Coordination.pb.h"
+#include "UserBitShared.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace bit {
+namespace control {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_BitControl_2eproto();
+void protobuf_AssignDesc_BitControl_2eproto();
+void protobuf_ShutdownFile_BitControl_2eproto();
+
+class BitControlHandshake;
+class BitStatus;
+class FragmentStatus;
+class PlanFragment;
+class WorkQueueStatus;
+
+enum FragmentStatus_FragmentState {
+ FragmentStatus_FragmentState_SENDING = 0,
+ FragmentStatus_FragmentState_AWAITING_ALLOCATION = 1,
+ FragmentStatus_FragmentState_RUNNING = 2,
+ FragmentStatus_FragmentState_FINISHED = 3,
+ FragmentStatus_FragmentState_CANCELLED = 4,
+ FragmentStatus_FragmentState_FAILED = 5
+};
+bool FragmentStatus_FragmentState_IsValid(int value);
+const FragmentStatus_FragmentState FragmentStatus_FragmentState_FragmentState_MIN = FragmentStatus_FragmentState_SENDING;
+const FragmentStatus_FragmentState FragmentStatus_FragmentState_FragmentState_MAX = FragmentStatus_FragmentState_FAILED;
+const int FragmentStatus_FragmentState_FragmentState_ARRAYSIZE = FragmentStatus_FragmentState_FragmentState_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* FragmentStatus_FragmentState_descriptor();
+inline const ::std::string& FragmentStatus_FragmentState_Name(FragmentStatus_FragmentState value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ FragmentStatus_FragmentState_descriptor(), value);
+}
+inline bool FragmentStatus_FragmentState_Parse(
+ const ::std::string& name, FragmentStatus_FragmentState* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<FragmentStatus_FragmentState>(
+ FragmentStatus_FragmentState_descriptor(), name, value);
+}
+enum RpcType {
+ HANDSHAKE = 0,
+ ACK = 1,
+ GOODBYE = 2,
+ REQ_INIATILIZE_FRAGMENT = 3,
+ REQ_CANCEL_FRAGMENT = 6,
+ REQ_FRAGMENT_STATUS = 7,
+ REQ_BIT_STATUS = 8,
+ RESP_FRAGMENT_HANDLE = 9,
+ RESP_FRAGMENT_STATUS = 10,
+ RESP_BIT_STATUS = 11
+};
+bool RpcType_IsValid(int value);
+const RpcType RpcType_MIN = HANDSHAKE;
+const RpcType RpcType_MAX = RESP_BIT_STATUS;
+const int RpcType_ARRAYSIZE = RpcType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor();
+inline const ::std::string& RpcType_Name(RpcType value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ RpcType_descriptor(), value);
+}
+inline bool RpcType_Parse(
+ const ::std::string& name, RpcType* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<RpcType>(
+ RpcType_descriptor(), name, value);
+}
+// ===================================================================
+
+class BitControlHandshake : public ::google::protobuf::Message {
+ public:
+ BitControlHandshake();
+ virtual ~BitControlHandshake();
+
+ BitControlHandshake(const BitControlHandshake& from);
+
+ inline BitControlHandshake& operator=(const BitControlHandshake& 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 BitControlHandshake& default_instance();
+
+ void Swap(BitControlHandshake* other);
+
+ // implements Message ----------------------------------------------
+
+ BitControlHandshake* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const BitControlHandshake& from);
+ void MergeFrom(const BitControlHandshake& 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 int32 rpc_version = 1;
+ inline bool has_rpc_version() const;
+ inline void clear_rpc_version();
+ static const int kRpcVersionFieldNumber = 1;
+ inline ::google::protobuf::int32 rpc_version() const;
+ inline void set_rpc_version(::google::protobuf::int32 value);
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_CONTROL];
+ inline bool has_channel() const;
+ inline void clear_channel();
+ static const int kChannelFieldNumber = 2;
+ inline ::exec::shared::RpcChannel channel() const;
+ inline void set_channel(::exec::shared::RpcChannel value);
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ inline bool has_endpoint() const;
+ inline void clear_endpoint();
+ static const int kEndpointFieldNumber = 3;
+ inline const ::exec::DrillbitEndpoint& endpoint() const;
+ inline ::exec::DrillbitEndpoint* mutable_endpoint();
+ inline ::exec::DrillbitEndpoint* release_endpoint();
+ inline void set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.control.BitControlHandshake)
+ private:
+ inline void set_has_rpc_version();
+ inline void clear_has_rpc_version();
+ inline void set_has_channel();
+ inline void clear_has_channel();
+ inline void set_has_endpoint();
+ inline void clear_has_endpoint();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int32 rpc_version_;
+ int channel_;
+ ::exec::DrillbitEndpoint* endpoint_;
+
+ 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 BitControlHandshake* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class BitStatus : public ::google::protobuf::Message {
+ public:
+ BitStatus();
+ virtual ~BitStatus();
+
+ BitStatus(const BitStatus& from);
+
+ inline BitStatus& operator=(const BitStatus& 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 BitStatus& default_instance();
+
+ void Swap(BitStatus* other);
+
+ // implements Message ----------------------------------------------
+
+ BitStatus* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const BitStatus& from);
+ void MergeFrom(const BitStatus& 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 -------------------------------------------------------
+
+ // repeated .exec.bit.control.FragmentStatus fragment_status = 1;
+ inline int fragment_status_size() const;
+ inline void clear_fragment_status();
+ static const int kFragmentStatusFieldNumber = 1;
+ inline const ::exec::bit::control::FragmentStatus& fragment_status(int index) const;
+ inline ::exec::bit::control::FragmentStatus* mutable_fragment_status(int index);
+ inline ::exec::bit::control::FragmentStatus* add_fragment_status();
+ inline const ::google::protobuf::RepeatedPtrField< ::exec::bit::control::FragmentStatus >&
+ fragment_status() const;
+ inline ::google::protobuf::RepeatedPtrField< ::exec::bit::control::FragmentStatus >*
+ mutable_fragment_status();
+
+ // @@protoc_insertion_point(class_scope:exec.bit.control.BitStatus)
+ private:
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::RepeatedPtrField< ::exec::bit::control::FragmentStatus > fragment_status_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+ friend void protobuf_AddDesc_BitControl_2eproto();
+ friend void protobuf_AssignDesc_BitControl_2eproto();
+ friend void protobuf_ShutdownFile_BitControl_2eproto();
+
+ void InitAsDefaultInstance();
+ static BitStatus* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class FragmentStatus : public ::google::protobuf::Message {
+ public:
+ FragmentStatus();
+ virtual ~FragmentStatus();
+
+ FragmentStatus(const FragmentStatus& from);
+
+ inline FragmentStatus& operator=(const FragmentStatus& 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 FragmentStatus& default_instance();
+
+ void Swap(FragmentStatus* other);
+
+ // implements Message ----------------------------------------------
+
+ FragmentStatus* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const FragmentStatus& from);
+ void MergeFrom(const FragmentStatus& 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 ----------------------------------------------------
+
+ typedef FragmentStatus_FragmentState FragmentState;
+ static const FragmentState SENDING = FragmentStatus_FragmentState_SENDING;
+ static const FragmentState AWAITING_ALLOCATION = FragmentStatus_FragmentState_AWAITING_ALLOCATION;
+ static const FragmentState RUNNING = FragmentStatus_FragmentState_RUNNING;
+ static const FragmentState FINISHED = FragmentStatus_FragmentState_FINISHED;
+ static const FragmentState CANCELLED = FragmentStatus_FragmentState_CANCELLED;
+ static const FragmentState FAILED = FragmentStatus_FragmentState_FAILED;
+ static inline bool FragmentState_IsValid(int value) {
+ return FragmentStatus_FragmentState_IsValid(value);
+ }
+ static const FragmentState FragmentState_MIN =
+ FragmentStatus_FragmentState_FragmentState_MIN;
+ static const FragmentState FragmentState_MAX =
+ FragmentStatus_FragmentState_FragmentState_MAX;
+ static const int FragmentState_ARRAYSIZE =
+ FragmentStatus_FragmentState_FragmentState_ARRAYSIZE;
+ static inline const ::google::protobuf::EnumDescriptor*
+ FragmentState_descriptor() {
+ return FragmentStatus_FragmentState_descriptor();
+ }
+ static inline const ::std::string& FragmentState_Name(FragmentState value) {
+ return FragmentStatus_FragmentState_Name(value);
+ }
+ static inline bool FragmentState_Parse(const ::std::string& name,
+ FragmentState* value) {
+ return FragmentStatus_FragmentState_Parse(name, value);
+ }
+
+ // accessors -------------------------------------------------------
+
+ // optional int64 memory_use = 1;
+ inline bool has_memory_use() const;
+ inline void clear_memory_use();
+ static const int kMemoryUseFieldNumber = 1;
+ inline ::google::protobuf::int64 memory_use() const;
+ inline void set_memory_use(::google::protobuf::int64 value);
+
+ // optional int64 batches_completed = 2;
+ inline bool has_batches_completed() const;
+ inline void clear_batches_completed();
+ static const int kBatchesCompletedFieldNumber = 2;
+ inline ::google::protobuf::int64 batches_completed() const;
+ inline void set_batches_completed(::google::protobuf::int64 value);
+
+ // optional int64 records_completed = 3;
+ inline bool has_records_completed() const;
+ inline void clear_records_completed();
+ static const int kRecordsCompletedFieldNumber = 3;
+ inline ::google::protobuf::int64 records_completed() const;
+ inline void set_records_completed(::google::protobuf::int64 value);
+
+ // optional int32 estimated_completion_percentage = 4;
+ inline bool has_estimated_completion_percentage() const;
+ inline void clear_estimated_completion_percentage();
+ static const int kEstimatedCompletionPercentageFieldNumber = 4;
+ inline ::google::protobuf::int32 estimated_completion_percentage() const;
+ inline void set_estimated_completion_percentage(::google::protobuf::int32 value);
+
+ // optional .exec.bit.control.FragmentStatus.FragmentState state = 5;
+ inline bool has_state() const;
+ inline void clear_state();
+ static const int kStateFieldNumber = 5;
+ inline ::exec::bit::control::FragmentStatus_FragmentState state() const;
+ inline void set_state(::exec::bit::control::FragmentStatus_FragmentState value);
+
+ // optional int64 data_processed = 6;
+ inline bool has_data_processed() const;
+ inline void clear_data_processed();
+ static const int kDataProcessedFieldNumber = 6;
+ inline ::google::protobuf::int64 data_processed() const;
+ inline void set_data_processed(::google::protobuf::int64 value);
+
+ // optional .exec.bit.FragmentHandle handle = 7;
+ inline bool has_handle() const;
+ inline void clear_handle();
+ static const int kHandleFieldNumber = 7;
+ inline const ::exec::bit::FragmentHandle& handle() const;
+ inline ::exec::bit::FragmentHandle* mutable_handle();
+ inline ::exec::bit::FragmentHandle* release_handle();
+ inline void set_allocated_handle(::exec::bit::FragmentHandle* handle);
+
+ // optional .exec.shared.DrillPBError error = 8;
+ inline bool has_error() const;
+ inline void clear_error();
+ static const int kErrorFieldNumber = 8;
+ inline const ::exec::shared::DrillPBError& error() const;
+ inline ::exec::shared::DrillPBError* mutable_error();
+ inline ::exec::shared::DrillPBError* release_error();
+ inline void set_allocated_error(::exec::shared::DrillPBError* error);
+
+ // optional int64 running_time = 9;
+ inline bool has_running_time() const;
+ inline void clear_running_time();
+ static const int kRunningTimeFieldNumber = 9;
+ inline ::google::protobuf::int64 running_time() const;
+ inline void set_running_time(::google::protobuf::int64 value);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.control.FragmentStatus)
+ private:
+ inline void set_has_memory_use();
+ inline void clear_has_memory_use();
+ inline void set_has_batches_completed();
+ inline void clear_has_batches_completed();
+ inline void set_has_records_completed();
+ inline void clear_has_records_completed();
+ inline void set_has_estimated_completion_percentage();
+ inline void clear_has_estimated_completion_percentage();
+ inline void set_has_state();
+ inline void clear_has_state();
+ inline void set_has_data_processed();
+ inline void clear_has_data_processed();
+ inline void set_has_handle();
+ inline void clear_has_handle();
+ inline void set_has_error();
+ inline void clear_has_error();
+ inline void set_has_running_time();
+ inline void clear_has_running_time();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int64 memory_use_;
+ ::google::protobuf::int64 batches_completed_;
+ ::google::protobuf::int64 records_completed_;
+ ::google::protobuf::int32 estimated_completion_percentage_;
+ int state_;
+ ::google::protobuf::int64 data_processed_;
+ ::exec::bit::FragmentHandle* handle_;
+ ::exec::shared::DrillPBError* error_;
+ ::google::protobuf::int64 running_time_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32];
+
+ friend void protobuf_AddDesc_BitControl_2eproto();
+ friend void protobuf_AssignDesc_BitControl_2eproto();
+ friend void protobuf_ShutdownFile_BitControl_2eproto();
+
+ void InitAsDefaultInstance();
+ static FragmentStatus* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class PlanFragment : public ::google::protobuf::Message {
+ public:
+ PlanFragment();
+ virtual ~PlanFragment();
+
+ PlanFragment(const PlanFragment& from);
+
+ inline PlanFragment& operator=(const PlanFragment& 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 PlanFragment& default_instance();
+
+ void Swap(PlanFragment* other);
+
+ // implements Message ----------------------------------------------
+
+ PlanFragment* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const PlanFragment& from);
+ void MergeFrom(const PlanFragment& 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 .exec.bit.FragmentHandle handle = 1;
+ inline bool has_handle() const;
+ inline void clear_handle();
+ static const int kHandleFieldNumber = 1;
+ inline const ::exec::bit::FragmentHandle& handle() const;
+ inline ::exec::bit::FragmentHandle* mutable_handle();
+ inline ::exec::bit::FragmentHandle* release_handle();
+ inline void set_allocated_handle(::exec::bit::FragmentHandle* handle);
+
+ // optional float network_cost = 4;
+ inline bool has_network_cost() const;
+ inline void clear_network_cost();
+ static const int kNetworkCostFieldNumber = 4;
+ inline float network_cost() const;
+ inline void set_network_cost(float value);
+
+ // optional float cpu_cost = 5;
+ inline bool has_cpu_cost() const;
+ inline void clear_cpu_cost();
+ static const int kCpuCostFieldNumber = 5;
+ inline float cpu_cost() const;
+ inline void set_cpu_cost(float value);
+
+ // optional float disk_cost = 6;
+ inline bool has_disk_cost() const;
+ inline void clear_disk_cost();
+ static const int kDiskCostFieldNumber = 6;
+ inline float disk_cost() const;
+ inline void set_disk_cost(float value);
+
+ // optional float memory_cost = 7;
+ inline bool has_memory_cost() const;
+ inline void clear_memory_cost();
+ static const int kMemoryCostFieldNumber = 7;
+ inline float memory_cost() const;
+ inline void set_memory_cost(float value);
+
+ // optional string fragment_json = 8;
+ inline bool has_fragment_json() const;
+ inline void clear_fragment_json();
+ static const int kFragmentJsonFieldNumber = 8;
+ inline const ::std::string& fragment_json() const;
+ inline void set_fragment_json(const ::std::string& value);
+ inline void set_fragment_json(const char* value);
+ inline void set_fragment_json(const char* value, size_t size);
+ inline ::std::string* mutable_fragment_json();
+ inline ::std::string* release_fragment_json();
+ inline void set_allocated_fragment_json(::std::string* fragment_json);
+
+ // optional .exec.DrillbitEndpoint assignment = 10;
+ inline bool has_assignment() const;
+ inline void clear_assignment();
+ static const int kAssignmentFieldNumber = 10;
+ inline const ::exec::DrillbitEndpoint& assignment() const;
+ inline ::exec::DrillbitEndpoint* mutable_assignment();
+ 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();
+ static const int kForemanFieldNumber = 11;
+ inline const ::exec::DrillbitEndpoint& foreman() const;
+ inline ::exec::DrillbitEndpoint* mutable_foreman();
+ inline ::exec::DrillbitEndpoint* release_foreman();
+ inline void set_allocated_foreman(::exec::DrillbitEndpoint* foreman);
+
+ // optional int64 mem_initial = 12 [default = 20000000];
+ inline bool has_mem_initial() const;
+ inline void clear_mem_initial();
+ static const int kMemInitialFieldNumber = 12;
+ inline ::google::protobuf::int64 mem_initial() const;
+ inline void set_mem_initial(::google::protobuf::int64 value);
+
+ // optional int64 mem_max = 13 [default = 20000000000];
+ inline bool has_mem_max() const;
+ inline void clear_mem_max();
+ static const int kMemMaxFieldNumber = 13;
+ 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;
+ inline bool has_credentials() const;
+ inline void clear_credentials();
+ static const int kCredentialsFieldNumber = 15;
+ 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;
+ inline bool has_options_json() const;
+ inline void clear_options_json();
+ static const int kOptionsJsonFieldNumber = 17;
+ inline const ::std::string& options_json() const;
+ inline void set_options_json(const ::std::string& value);
+ inline void set_options_json(const char* value);
+ inline void set_options_json(const char* value, size_t size);
+ inline ::std::string* mutable_options_json();
+ inline ::std::string* release_options_json();
+ inline void set_allocated_options_json(::std::string* options_json);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.control.PlanFragment)
+ private:
+ inline void set_has_handle();
+ inline void clear_has_handle();
+ inline void set_has_network_cost();
+ inline void clear_has_network_cost();
+ inline void set_has_cpu_cost();
+ inline void clear_has_cpu_cost();
+ inline void set_has_disk_cost();
+ inline void clear_has_disk_cost();
+ inline void set_has_memory_cost();
+ 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_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();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::exec::bit::FragmentHandle* handle_;
+ float network_cost_;
+ float cpu_cost_;
+ float disk_cost_;
+ float memory_cost_;
+ ::std::string* fragment_json_;
+ ::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_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(15 + 31) / 32];
+
+ friend void protobuf_AddDesc_BitControl_2eproto();
+ friend void protobuf_AssignDesc_BitControl_2eproto();
+ friend void protobuf_ShutdownFile_BitControl_2eproto();
+
+ void InitAsDefaultInstance();
+ static PlanFragment* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class WorkQueueStatus : public ::google::protobuf::Message {
+ public:
+ WorkQueueStatus();
+ virtual ~WorkQueueStatus();
+
+ WorkQueueStatus(const WorkQueueStatus& from);
+
+ inline WorkQueueStatus& operator=(const WorkQueueStatus& 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 WorkQueueStatus& default_instance();
+
+ void Swap(WorkQueueStatus* other);
+
+ // implements Message ----------------------------------------------
+
+ WorkQueueStatus* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const WorkQueueStatus& from);
+ void MergeFrom(const WorkQueueStatus& 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 .exec.DrillbitEndpoint endpoint = 1;
+ inline bool has_endpoint() const;
+ inline void clear_endpoint();
+ static const int kEndpointFieldNumber = 1;
+ inline const ::exec::DrillbitEndpoint& endpoint() const;
+ inline ::exec::DrillbitEndpoint* mutable_endpoint();
+ inline ::exec::DrillbitEndpoint* release_endpoint();
+ inline void set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint);
+
+ // optional int32 queue_length = 2;
+ inline bool has_queue_length() const;
+ inline void clear_queue_length();
+ static const int kQueueLengthFieldNumber = 2;
+ inline ::google::protobuf::int32 queue_length() const;
+ inline void set_queue_length(::google::protobuf::int32 value);
+
+ // optional int64 report_time = 3;
+ inline bool has_report_time() const;
+ inline void clear_report_time();
+ static const int kReportTimeFieldNumber = 3;
+ inline ::google::protobuf::int64 report_time() const;
+ inline void set_report_time(::google::protobuf::int64 value);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.control.WorkQueueStatus)
+ private:
+ inline void set_has_endpoint();
+ inline void clear_has_endpoint();
+ inline void set_has_queue_length();
+ inline void clear_has_queue_length();
+ inline void set_has_report_time();
+ inline void clear_has_report_time();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::exec::DrillbitEndpoint* endpoint_;
+ ::google::protobuf::int64 report_time_;
+ ::google::protobuf::int32 queue_length_;
+
+ 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 WorkQueueStatus* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// BitControlHandshake
+
+// optional int32 rpc_version = 1;
+inline bool BitControlHandshake::has_rpc_version() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void BitControlHandshake::set_has_rpc_version() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void BitControlHandshake::clear_has_rpc_version() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void BitControlHandshake::clear_rpc_version() {
+ rpc_version_ = 0;
+ clear_has_rpc_version();
+}
+inline ::google::protobuf::int32 BitControlHandshake::rpc_version() const {
+ return rpc_version_;
+}
+inline void BitControlHandshake::set_rpc_version(::google::protobuf::int32 value) {
+ set_has_rpc_version();
+ rpc_version_ = value;
+}
+
+// optional .exec.shared.RpcChannel channel = 2 [default = BIT_CONTROL];
+inline bool BitControlHandshake::has_channel() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void BitControlHandshake::set_has_channel() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void BitControlHandshake::clear_has_channel() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void BitControlHandshake::clear_channel() {
+ channel_ = 0;
+ clear_has_channel();
+}
+inline ::exec::shared::RpcChannel BitControlHandshake::channel() const {
+ return static_cast< ::exec::shared::RpcChannel >(channel_);
+}
+inline void BitControlHandshake::set_channel(::exec::shared::RpcChannel value) {
+ assert(::exec::shared::RpcChannel_IsValid(value));
+ set_has_channel();
+ channel_ = value;
+}
+
+// optional .exec.DrillbitEndpoint endpoint = 3;
+inline bool BitControlHandshake::has_endpoint() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void BitControlHandshake::set_has_endpoint() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void BitControlHandshake::clear_has_endpoint() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void BitControlHandshake::clear_endpoint() {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ clear_has_endpoint();
+}
+inline const ::exec::DrillbitEndpoint& BitControlHandshake::endpoint() const {
+ return endpoint_ != NULL ? *endpoint_ : *default_instance_->endpoint_;
+}
+inline ::exec::DrillbitEndpoint* BitControlHandshake::mutable_endpoint() {
+ set_has_endpoint();
+ if (endpoint_ == NULL) endpoint_ = new ::exec::DrillbitEndpoint;
+ return endpoint_;
+}
+inline ::exec::DrillbitEndpoint* BitControlHandshake::release_endpoint() {
+ clear_has_endpoint();
+ ::exec::DrillbitEndpoint* temp = endpoint_;
+ endpoint_ = NULL;
+ return temp;
+}
+inline void BitControlHandshake::set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint) {
+ delete endpoint_;
+ endpoint_ = endpoint;
+ if (endpoint) {
+ set_has_endpoint();
+ } else {
+ clear_has_endpoint();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// BitStatus
+
+// repeated .exec.bit.control.FragmentStatus fragment_status = 1;
+inline int BitStatus::fragment_status_size() const {
+ return fragment_status_.size();
+}
+inline void BitStatus::clear_fragment_status() {
+ fragment_status_.Clear();
+}
+inline const ::exec::bit::control::FragmentStatus& BitStatus::fragment_status(int index) const {
+ return fragment_status_.Get(index);
+}
+inline ::exec::bit::control::FragmentStatus* BitStatus::mutable_fragment_status(int index) {
+ return fragment_status_.Mutable(index);
+}
+inline ::exec::bit::control::FragmentStatus* BitStatus::add_fragment_status() {
+ return fragment_status_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::exec::bit::control::FragmentStatus >&
+BitStatus::fragment_status() const {
+ return fragment_status_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::exec::bit::control::FragmentStatus >*
+BitStatus::mutable_fragment_status() {
+ return &fragment_status_;
+}
+
+// -------------------------------------------------------------------
+
+// FragmentStatus
+
+// optional int64 memory_use = 1;
+inline bool FragmentStatus::has_memory_use() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void FragmentStatus::set_has_memory_use() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void FragmentStatus::clear_has_memory_use() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void FragmentStatus::clear_memory_use() {
+ memory_use_ = GOOGLE_LONGLONG(0);
+ clear_has_memory_use();
+}
+inline ::google::protobuf::int64 FragmentStatus::memory_use() const {
+ return memory_use_;
+}
+inline void FragmentStatus::set_memory_use(::google::protobuf::int64 value) {
+ set_has_memory_use();
+ memory_use_ = value;
+}
+
+// optional int64 batches_completed = 2;
+inline bool FragmentStatus::has_batches_completed() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void FragmentStatus::set_has_batches_completed() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void FragmentStatus::clear_has_batches_completed() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void FragmentStatus::clear_batches_completed() {
+ batches_completed_ = GOOGLE_LONGLONG(0);
+ clear_has_batches_completed();
+}
+inline ::google::protobuf::int64 FragmentStatus::batches_completed() const {
+ return batches_completed_;
+}
+inline void FragmentStatus::set_batches_completed(::google::protobuf::int64 value) {
+ set_has_batches_completed();
+ batches_completed_ = value;
+}
+
+// optional int64 records_completed = 3;
+inline bool FragmentStatus::has_records_completed() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void FragmentStatus::set_has_records_completed() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void FragmentStatus::clear_has_records_completed() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void FragmentStatus::clear_records_completed() {
+ records_completed_ = GOOGLE_LONGLONG(0);
+ clear_has_records_completed();
+}
+inline ::google::protobuf::int64 FragmentStatus::records_completed() const {
+ return records_completed_;
+}
+inline void FragmentStatus::set_records_completed(::google::protobuf::int64 value) {
+ set_has_records_completed();
+ records_completed_ = value;
+}
+
+// optional int32 estimated_completion_percentage = 4;
+inline bool FragmentStatus::has_estimated_completion_percentage() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void FragmentStatus::set_has_estimated_completion_percentage() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void FragmentStatus::clear_has_estimated_completion_percentage() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void FragmentStatus::clear_estimated_completion_percentage() {
+ estimated_completion_percentage_ = 0;
+ clear_has_estimated_completion_percentage();
+}
+inline ::google::protobuf::int32 FragmentStatus::estimated_completion_percentage() const {
+ return estimated_completion_percentage_;
+}
+inline void FragmentStatus::set_estimated_completion_percentage(::google::protobuf::int32 value) {
+ set_has_estimated_completion_percentage();
+ estimated_completion_percentage_ = value;
+}
+
+// optional .exec.bit.control.FragmentStatus.FragmentState state = 5;
+inline bool FragmentStatus::has_state() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void FragmentStatus::set_has_state() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void FragmentStatus::clear_has_state() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void FragmentStatus::clear_state() {
+ state_ = 0;
+ clear_has_state();
+}
+inline ::exec::bit::control::FragmentStatus_FragmentState FragmentStatus::state() const {
+ return static_cast< ::exec::bit::control::FragmentStatus_FragmentState >(state_);
+}
+inline void FragmentStatus::set_state(::exec::bit::control::FragmentStatus_FragmentState value) {
+ assert(::exec::bit::control::FragmentStatus_FragmentState_IsValid(value));
+ set_has_state();
+ state_ = value;
+}
+
+// optional int64 data_processed = 6;
+inline bool FragmentStatus::has_data_processed() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void FragmentStatus::set_has_data_processed() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void FragmentStatus::clear_has_data_processed() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void FragmentStatus::clear_data_processed() {
+ data_processed_ = GOOGLE_LONGLONG(0);
+ clear_has_data_processed();
+}
+inline ::google::protobuf::int64 FragmentStatus::data_processed() const {
+ return data_processed_;
+}
+inline void FragmentStatus::set_data_processed(::google::protobuf::int64 value) {
+ set_has_data_processed();
+ data_processed_ = value;
+}
+
+// optional .exec.bit.FragmentHandle handle = 7;
+inline bool FragmentStatus::has_handle() const {
+ return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void FragmentStatus::set_has_handle() {
+ _has_bits_[0] |= 0x00000040u;
+}
+inline void FragmentStatus::clear_has_handle() {
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline void FragmentStatus::clear_handle() {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ clear_has_handle();
+}
+inline const ::exec::bit::FragmentHandle& FragmentStatus::handle() const {
+ return handle_ != NULL ? *handle_ : *default_instance_->handle_;
+}
+inline ::exec::bit::FragmentHandle* FragmentStatus::mutable_handle() {
+ set_has_handle();
+ if (handle_ == NULL) handle_ = new ::exec::bit::FragmentHandle;
+ return handle_;
+}
+inline ::exec::bit::FragmentHandle* FragmentStatus::release_handle() {
+ clear_has_handle();
+ ::exec::bit::FragmentHandle* temp = handle_;
+ handle_ = NULL;
+ return temp;
+}
+inline void FragmentStatus::set_allocated_handle(::exec::bit::FragmentHandle* handle) {
+ delete handle_;
+ handle_ = handle;
+ if (handle) {
+ set_has_handle();
+ } else {
+ clear_has_handle();
+ }
+}
+
+// optional .exec.shared.DrillPBError error = 8;
+inline bool FragmentStatus::has_error() const {
+ return (_has_bits_[0] & 0x00000080u) != 0;
+}
+inline void FragmentStatus::set_has_error() {
+ _has_bits_[0] |= 0x00000080u;
+}
+inline void FragmentStatus::clear_has_error() {
+ _has_bits_[0] &= ~0x00000080u;
+}
+inline void FragmentStatus::clear_error() {
+ if (error_ != NULL) error_->::exec::shared::DrillPBError::Clear();
+ clear_has_error();
+}
+inline const ::exec::shared::DrillPBError& FragmentStatus::error() const {
+ return error_ != NULL ? *error_ : *default_instance_->error_;
+}
+inline ::exec::shared::DrillPBError* FragmentStatus::mutable_error() {
+ set_has_error();
+ if (error_ == NULL) error_ = new ::exec::shared::DrillPBError;
+ return error_;
+}
+inline ::exec::shared::DrillPBError* FragmentStatus::release_error() {
+ clear_has_error();
+ ::exec::shared::DrillPBError* temp = error_;
+ error_ = NULL;
+ return temp;
+}
+inline void FragmentStatus::set_allocated_error(::exec::shared::DrillPBError* error) {
+ delete error_;
+ error_ = error;
+ if (error) {
+ set_has_error();
+ } else {
+ clear_has_error();
+ }
+}
+
+// optional int64 running_time = 9;
+inline bool FragmentStatus::has_running_time() const {
+ return (_has_bits_[0] & 0x00000100u) != 0;
+}
+inline void FragmentStatus::set_has_running_time() {
+ _has_bits_[0] |= 0x00000100u;
+}
+inline void FragmentStatus::clear_has_running_time() {
+ _has_bits_[0] &= ~0x00000100u;
+}
+inline void FragmentStatus::clear_running_time() {
+ running_time_ = GOOGLE_LONGLONG(0);
+ clear_has_running_time();
+}
+inline ::google::protobuf::int64 FragmentStatus::running_time() const {
+ return running_time_;
+}
+inline void FragmentStatus::set_running_time(::google::protobuf::int64 value) {
+ set_has_running_time();
+ running_time_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// PlanFragment
+
+// optional .exec.bit.FragmentHandle handle = 1;
+inline bool PlanFragment::has_handle() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void PlanFragment::set_has_handle() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void PlanFragment::clear_has_handle() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void PlanFragment::clear_handle() {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ clear_has_handle();
+}
+inline const ::exec::bit::FragmentHandle& PlanFragment::handle() const {
+ return handle_ != NULL ? *handle_ : *default_instance_->handle_;
+}
+inline ::exec::bit::FragmentHandle* PlanFragment::mutable_handle() {
+ set_has_handle();
+ if (handle_ == NULL) handle_ = new ::exec::bit::FragmentHandle;
+ return handle_;
+}
+inline ::exec::bit::FragmentHandle* PlanFragment::release_handle() {
+ clear_has_handle();
+ ::exec::bit::FragmentHandle* temp = handle_;
+ handle_ = NULL;
+ return temp;
+}
+inline void PlanFragment::set_allocated_handle(::exec::bit::FragmentHandle* handle) {
+ delete handle_;
+ handle_ = handle;
+ if (handle) {
+ set_has_handle();
+ } else {
+ clear_has_handle();
+ }
+}
+
+// optional float network_cost = 4;
+inline bool PlanFragment::has_network_cost() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void PlanFragment::set_has_network_cost() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void PlanFragment::clear_has_network_cost() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void PlanFragment::clear_network_cost() {
+ network_cost_ = 0;
+ clear_has_network_cost();
+}
+inline float PlanFragment::network_cost() const {
+ return network_cost_;
+}
+inline void PlanFragment::set_network_cost(float value) {
+ set_has_network_cost();
+ network_cost_ = value;
+}
+
+// optional float cpu_cost = 5;
+inline bool PlanFragment::has_cpu_cost() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void PlanFragment::set_has_cpu_cost() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void PlanFragment::clear_has_cpu_cost() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void PlanFragment::clear_cpu_cost() {
+ cpu_cost_ = 0;
+ clear_has_cpu_cost();
+}
+inline float PlanFragment::cpu_cost() const {
+ return cpu_cost_;
+}
+inline void PlanFragment::set_cpu_cost(float value) {
+ set_has_cpu_cost();
+ cpu_cost_ = value;
+}
+
+// optional float disk_cost = 6;
+inline bool PlanFragment::has_disk_cost() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void PlanFragment::set_has_disk_cost() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void PlanFragment::clear_has_disk_cost() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void PlanFragment::clear_disk_cost() {
+ disk_cost_ = 0;
+ clear_has_disk_cost();
+}
+inline float PlanFragment::disk_cost() const {
+ return disk_cost_;
+}
+inline void PlanFragment::set_disk_cost(float value) {
+ set_has_disk_cost();
+ disk_cost_ = value;
+}
+
+// optional float memory_cost = 7;
+inline bool PlanFragment::has_memory_cost() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void PlanFragment::set_has_memory_cost() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void PlanFragment::clear_has_memory_cost() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void PlanFragment::clear_memory_cost() {
+ memory_cost_ = 0;
+ clear_has_memory_cost();
+}
+inline float PlanFragment::memory_cost() const {
+ return memory_cost_;
+}
+inline void PlanFragment::set_memory_cost(float value) {
+ set_has_memory_cost();
+ memory_cost_ = value;
+}
+
+// optional string fragment_json = 8;
+inline bool PlanFragment::has_fragment_json() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void PlanFragment::set_has_fragment_json() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void PlanFragment::clear_has_fragment_json() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void PlanFragment::clear_fragment_json() {
+ if (fragment_json_ != &::google::protobuf::internal::kEmptyString) {
+ fragment_json_->clear();
+ }
+ clear_has_fragment_json();
+}
+inline const ::std::string& PlanFragment::fragment_json() const {
+ return *fragment_json_;
+}
+inline void PlanFragment::set_fragment_json(const ::std::string& value) {
+ set_has_fragment_json();
+ if (fragment_json_ == &::google::protobuf::internal::kEmptyString) {
+ fragment_json_ = new ::std::string;
+ }
+ fragment_json_->assign(value);
+}
+inline void PlanFragment::set_fragment_json(const char* value) {
+ set_has_fragment_json();
+ if (fragment_json_ == &::google::protobuf::internal::kEmptyString) {
+ fragment_json_ = new ::std::string;
+ }
+ fragment_json_->assign(value);
+}
+inline void PlanFragment::set_fragment_json(const char* value, size_t size) {
+ set_has_fragment_json();
+ if (fragment_json_ == &::google::protobuf::internal::kEmptyString) {
+ fragment_json_ = new ::std::string;
+ }
+ fragment_json_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* PlanFragment::mutable_fragment_json() {
+ set_has_fragment_json();
+ if (fragment_json_ == &::google::protobuf::internal::kEmptyString) {
+ fragment_json_ = new ::std::string;
+ }
+ return fragment_json_;
+}
+inline ::std::string* PlanFragment::release_fragment_json() {
+ clear_has_fragment_json();
+ if (fragment_json_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = fragment_json_;
+ fragment_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void PlanFragment::set_allocated_fragment_json(::std::string* fragment_json) {
+ if (fragment_json_ != &::google::protobuf::internal::kEmptyString) {
+ delete fragment_json_;
+ }
+ if (fragment_json) {
+ set_has_fragment_json();
+ fragment_json_ = fragment_json;
+ } else {
+ clear_has_fragment_json();
+ fragment_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional .exec.DrillbitEndpoint assignment = 10;
+inline bool PlanFragment::has_assignment() const {
+ return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void PlanFragment::set_has_assignment() {
+ _has_bits_[0] |= 0x00000040u;
+}
+inline void PlanFragment::clear_has_assignment() {
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline void PlanFragment::clear_assignment() {
+ if (assignment_ != NULL) assignment_->::exec::DrillbitEndpoint::Clear();
+ clear_has_assignment();
+}
+inline const ::exec::DrillbitEndpoint& PlanFragment::assignment() const {
+ return assignment_ != NULL ? *assignment_ : *default_instance_->assignment_;
+}
+inline ::exec::DrillbitEndpoint* PlanFragment::mutable_assignment() {
+ set_has_assignment();
+ if (assignment_ == NULL) assignment_ = new ::exec::DrillbitEndpoint;
+ return assignment_;
+}
+inline ::exec::DrillbitEndpoint* PlanFragment::release_assignment() {
+ clear_has_assignment();
+ ::exec::DrillbitEndpoint* temp = assignment_;
+ assignment_ = NULL;
+ return temp;
+}
+inline void PlanFragment::set_allocated_assignment(::exec::DrillbitEndpoint* assignment) {
+ delete assignment_;
+ assignment_ = assignment;
+ if (assignment) {
+ set_has_assignment();
+ } else {
+ clear_has_assignment();
+ }
+}
+
+// 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;
+}
+inline void PlanFragment::set_has_foreman() {
+ _has_bits_[0] |= 0x00000100u;
+}
+inline void PlanFragment::clear_has_foreman() {
+ _has_bits_[0] &= ~0x00000100u;
+}
+inline void PlanFragment::clear_foreman() {
+ if (foreman_ != NULL) foreman_->::exec::DrillbitEndpoint::Clear();
+ clear_has_foreman();
+}
+inline const ::exec::DrillbitEndpoint& PlanFragment::foreman() const {
+ return foreman_ != NULL ? *foreman_ : *default_instance_->foreman_;
+}
+inline ::exec::DrillbitEndpoint* PlanFragment::mutable_foreman() {
+ set_has_foreman();
+ if (foreman_ == NULL) foreman_ = new ::exec::DrillbitEndpoint;
+ return foreman_;
+}
+inline ::exec::DrillbitEndpoint* PlanFragment::release_foreman() {
+ clear_has_foreman();
+ ::exec::DrillbitEndpoint* temp = foreman_;
+ foreman_ = NULL;
+ return temp;
+}
+inline void PlanFragment::set_allocated_foreman(::exec::DrillbitEndpoint* foreman) {
+ delete foreman_;
+ foreman_ = foreman;
+ if (foreman) {
+ set_has_foreman();
+ } else {
+ clear_has_foreman();
+ }
+}
+
+// optional int64 mem_initial = 12 [default = 20000000];
+inline bool PlanFragment::has_mem_initial() const {
+ return (_has_bits_[0] & 0x00000200u) != 0;
+}
+inline void PlanFragment::set_has_mem_initial() {
+ _has_bits_[0] |= 0x00000200u;
+}
+inline void PlanFragment::clear_has_mem_initial() {
+ _has_bits_[0] &= ~0x00000200u;
+}
+inline void PlanFragment::clear_mem_initial() {
+ mem_initial_ = GOOGLE_LONGLONG(20000000);
+ clear_has_mem_initial();
+}
+inline ::google::protobuf::int64 PlanFragment::mem_initial() const {
+ return mem_initial_;
+}
+inline void PlanFragment::set_mem_initial(::google::protobuf::int64 value) {
+ set_has_mem_initial();
+ mem_initial_ = value;
+}
+
+// optional int64 mem_max = 13 [default = 20000000000];
+inline bool PlanFragment::has_mem_max() const {
+ return (_has_bits_[0] & 0x00000400u) != 0;
+}
+inline void PlanFragment::set_has_mem_max() {
+ _has_bits_[0] |= 0x00000400u;
+}
+inline void PlanFragment::clear_has_mem_max() {
+ _has_bits_[0] &= ~0x00000400u;
+}
+inline void PlanFragment::clear_mem_max() {
+ mem_max_ = GOOGLE_LONGLONG(20000000000);
+ clear_has_mem_max();
+}
+inline ::google::protobuf::int64 PlanFragment::mem_max() const {
+ return mem_max_;
+}
+inline void PlanFragment::set_mem_max(::google::protobuf::int64 value) {
+ set_has_mem_max();
+ 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;
+inline bool PlanFragment::has_credentials() const {
+ return (_has_bits_[0] & 0x00001000u) != 0;
+}
+inline void PlanFragment::set_has_credentials() {
+ _has_bits_[0] |= 0x00001000u;
+}
+inline void PlanFragment::clear_has_credentials() {
+ _has_bits_[0] &= ~0x00001000u;
+}
+inline void PlanFragment::clear_credentials() {
+ if (credentials_ != NULL) credentials_->::exec::shared::UserCredentials::Clear();
+ clear_has_credentials();
+}
+inline const ::exec::shared::UserCredentials& PlanFragment::credentials() const {
+ return credentials_ != NULL ? *credentials_ : *default_instance_->credentials_;
+}
+inline ::exec::shared::UserCredentials* PlanFragment::mutable_credentials() {
+ set_has_credentials();
+ if (credentials_ == NULL) credentials_ = new ::exec::shared::UserCredentials;
+ return credentials_;
+}
+inline ::exec::shared::UserCredentials* PlanFragment::release_credentials() {
+ clear_has_credentials();
+ ::exec::shared::UserCredentials* temp = credentials_;
+ credentials_ = NULL;
+ return temp;
+}
+inline void PlanFragment::set_allocated_credentials(::exec::shared::UserCredentials* credentials) {
+ delete credentials_;
+ credentials_ = credentials;
+ if (credentials) {
+ set_has_credentials();
+ } else {
+ clear_has_credentials();
+ }
+}
+
+// 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;
+inline bool PlanFragment::has_options_json() const {
+ return (_has_bits_[0] & 0x00004000u) != 0;
+}
+inline void PlanFragment::set_has_options_json() {
+ _has_bits_[0] |= 0x00004000u;
+}
+inline void PlanFragment::clear_has_options_json() {
+ _has_bits_[0] &= ~0x00004000u;
+}
+inline void PlanFragment::clear_options_json() {
+ if (options_json_ != &::google::protobuf::internal::kEmptyString) {
+ options_json_->clear();
+ }
+ clear_has_options_json();
+}
+inline const ::std::string& PlanFragment::options_json() const {
+ return *options_json_;
+}
+inline void PlanFragment::set_options_json(const ::std::string& value) {
+ set_has_options_json();
+ if (options_json_ == &::google::protobuf::internal::kEmptyString) {
+ options_json_ = new ::std::string;
+ }
+ options_json_->assign(value);
+}
+inline void PlanFragment::set_options_json(const char* value) {
+ set_has_options_json();
+ if (options_json_ == &::google::protobuf::internal::kEmptyString) {
+ options_json_ = new ::std::string;
+ }
+ options_json_->assign(value);
+}
+inline void PlanFragment::set_options_json(const char* value, size_t size) {
+ set_has_options_json();
+ if (options_json_ == &::google::protobuf::internal::kEmptyString) {
+ options_json_ = new ::std::string;
+ }
+ options_json_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* PlanFragment::mutable_options_json() {
+ set_has_options_json();
+ if (options_json_ == &::google::protobuf::internal::kEmptyString) {
+ options_json_ = new ::std::string;
+ }
+ return options_json_;
+}
+inline ::std::string* PlanFragment::release_options_json() {
+ clear_has_options_json();
+ if (options_json_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = options_json_;
+ options_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void PlanFragment::set_allocated_options_json(::std::string* options_json) {
+ if (options_json_ != &::google::protobuf::internal::kEmptyString) {
+ delete options_json_;
+ }
+ if (options_json) {
+ set_has_options_json();
+ options_json_ = options_json;
+ } else {
+ clear_has_options_json();
+ options_json_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// -------------------------------------------------------------------
+
+// WorkQueueStatus
+
+// optional .exec.DrillbitEndpoint endpoint = 1;
+inline bool WorkQueueStatus::has_endpoint() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void WorkQueueStatus::set_has_endpoint() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void WorkQueueStatus::clear_has_endpoint() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void WorkQueueStatus::clear_endpoint() {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ clear_has_endpoint();
+}
+inline const ::exec::DrillbitEndpoint& WorkQueueStatus::endpoint() const {
+ return endpoint_ != NULL ? *endpoint_ : *default_instance_->endpoint_;
+}
+inline ::exec::DrillbitEndpoint* WorkQueueStatus::mutable_endpoint() {
+ set_has_endpoint();
+ if (endpoint_ == NULL) endpoint_ = new ::exec::DrillbitEndpoint;
+ return endpoint_;
+}
+inline ::exec::DrillbitEndpoint* WorkQueueStatus::release_endpoint() {
+ clear_has_endpoint();
+ ::exec::DrillbitEndpoint* temp = endpoint_;
+ endpoint_ = NULL;
+ return temp;
+}
+inline void WorkQueueStatus::set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint) {
+ delete endpoint_;
+ endpoint_ = endpoint;
+ if (endpoint) {
+ set_has_endpoint();
+ } else {
+ clear_has_endpoint();
+ }
+}
+
+// optional int32 queue_length = 2;
+inline bool WorkQueueStatus::has_queue_length() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void WorkQueueStatus::set_has_queue_length() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void WorkQueueStatus::clear_has_queue_length() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void WorkQueueStatus::clear_queue_length() {
+ queue_length_ = 0;
+ clear_has_queue_length();
+}
+inline ::google::protobuf::int32 WorkQueueStatus::queue_length() const {
+ return queue_length_;
+}
+inline void WorkQueueStatus::set_queue_length(::google::protobuf::int32 value) {
+ set_has_queue_length();
+ queue_length_ = value;
+}
+
+// optional int64 report_time = 3;
+inline bool WorkQueueStatus::has_report_time() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void WorkQueueStatus::set_has_report_time() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void WorkQueueStatus::clear_has_report_time() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void WorkQueueStatus::clear_report_time() {
+ report_time_ = GOOGLE_LONGLONG(0);
+ clear_has_report_time();
+}
+inline ::google::protobuf::int64 WorkQueueStatus::report_time() const {
+ return report_time_;
+}
+inline void WorkQueueStatus::set_report_time(::google::protobuf::int64 value) {
+ set_has_report_time();
+ report_time_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace control
+} // namespace bit
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::bit::control::FragmentStatus_FragmentState>() {
+ return ::exec::bit::control::FragmentStatus_FragmentState_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::bit::control::RpcType>() {
+ return ::exec::bit::control::RpcType_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_BitControl_2eproto__INCLUDED
diff --git a/contrib/native/client/src/protobuf/BitData.pb.cc b/contrib/native/client/src/protobuf/BitData.pb.cc
new file mode 100644
index 000000000..ef4f99d84
--- /dev/null
+++ b/contrib/native/client/src/protobuf/BitData.pb.cc
@@ -0,0 +1,1116 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: BitData.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "BitData.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace bit {
+namespace data {
+
+namespace {
+
+const ::google::protobuf::Descriptor* BitClientHandshake_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ BitClientHandshake_reflection_ = NULL;
+const ::google::protobuf::Descriptor* BitServerHandshake_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ BitServerHandshake_reflection_ = NULL;
+const ::google::protobuf::Descriptor* FragmentRecordBatch_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ FragmentRecordBatch_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_BitData_2eproto() {
+ protobuf_AddDesc_BitData_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "BitData.proto");
+ GOOGLE_CHECK(file != NULL);
+ BitClientHandshake_descriptor_ = file->message_type(0);
+ static const int BitClientHandshake_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitClientHandshake, rpc_version_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitClientHandshake, channel_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitClientHandshake, handle_),
+ };
+ BitClientHandshake_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ BitClientHandshake_descriptor_,
+ BitClientHandshake::default_instance_,
+ BitClientHandshake_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitClientHandshake, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitClientHandshake, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(BitClientHandshake));
+ BitServerHandshake_descriptor_ = file->message_type(1);
+ static const int BitServerHandshake_offsets_[1] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitServerHandshake, rpc_version_),
+ };
+ BitServerHandshake_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ BitServerHandshake_descriptor_,
+ BitServerHandshake::default_instance_,
+ BitServerHandshake_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitServerHandshake, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitServerHandshake, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(BitServerHandshake));
+ FragmentRecordBatch_descriptor_ = file->message_type(2);
+ static const int FragmentRecordBatch_offsets_[6] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, handle_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, sending_major_fragment_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, sending_minor_fragment_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, def_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, islastbatch_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, isoutofmemory_),
+ };
+ FragmentRecordBatch_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ FragmentRecordBatch_descriptor_,
+ FragmentRecordBatch::default_instance_,
+ FragmentRecordBatch_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentRecordBatch, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(FragmentRecordBatch));
+ RpcType_descriptor_ = file->enum_type(0);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_BitData_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ BitClientHandshake_descriptor_, &BitClientHandshake::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ BitServerHandshake_descriptor_, &BitServerHandshake::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ FragmentRecordBatch_descriptor_, &FragmentRecordBatch::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_BitData_2eproto() {
+ delete BitClientHandshake::default_instance_;
+ delete BitClientHandshake_reflection_;
+ delete BitServerHandshake::default_instance_;
+ delete BitServerHandshake_reflection_;
+ delete FragmentRecordBatch::default_instance_;
+ delete FragmentRecordBatch_reflection_;
+}
+
+void protobuf_AddDesc_BitData_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::exec::bit::protobuf_AddDesc_ExecutionProtos_2eproto();
+ ::exec::protobuf_AddDesc_Coordination_2eproto();
+ ::exec::shared::protobuf_AddDesc_UserBitShared_2eproto();
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\rBitData.proto\022\rexec.bit.data\032\025Executio"
+ "nProtos.proto\032\022Coordination.proto\032\023UserB"
+ "itShared.proto\"\207\001\n\022BitClientHandshake\022\023\n"
+ "\013rpc_version\030\001 \001(\005\0222\n\007channel\030\002 \001(\0162\027.ex"
+ "ec.shared.RpcChannel:\010BIT_DATA\022(\n\006handle"
+ "\030\003 \001(\0132\030.exec.bit.FragmentHandle\")\n\022BitS"
+ "erverHandshake\022\023\n\013rpc_version\030\001 \001(\005\"\342\001\n\023"
+ "FragmentRecordBatch\022(\n\006handle\030\001 \001(\0132\030.ex"
+ "ec.bit.FragmentHandle\022!\n\031sending_major_f"
+ "ragment_id\030\002 \001(\005\022!\n\031sending_minor_fragme"
+ "nt_id\030\003 \001(\005\022(\n\003def\030\004 \001(\0132\033.exec.shared.R"
+ "ecordBatchDef\022\023\n\013isLastBatch\030\005 \001(\010\022\034\n\ris"
+ "OutOfMemory\030\006 \001(\010:\005false*D\n\007RpcType\022\r\n\tH"
+ "ANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\024\n\020REQ_"
+ "RECORD_BATCH\020\003B(\n\033org.apache.drill.exec."
+ "protoB\007BitDataH\001", 616);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "BitData.proto", &protobuf_RegisterTypes);
+ BitClientHandshake::default_instance_ = new BitClientHandshake();
+ BitServerHandshake::default_instance_ = new BitServerHandshake();
+ FragmentRecordBatch::default_instance_ = new FragmentRecordBatch();
+ BitClientHandshake::default_instance_->InitAsDefaultInstance();
+ BitServerHandshake::default_instance_->InitAsDefaultInstance();
+ FragmentRecordBatch::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_BitData_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_BitData_2eproto {
+ StaticDescriptorInitializer_BitData_2eproto() {
+ protobuf_AddDesc_BitData_2eproto();
+ }
+} static_descriptor_initializer_BitData_2eproto_;
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RpcType_descriptor_;
+}
+bool RpcType_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int BitClientHandshake::kRpcVersionFieldNumber;
+const int BitClientHandshake::kChannelFieldNumber;
+const int BitClientHandshake::kHandleFieldNumber;
+#endif // !_MSC_VER
+
+BitClientHandshake::BitClientHandshake()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void BitClientHandshake::InitAsDefaultInstance() {
+ handle_ = const_cast< ::exec::bit::FragmentHandle*>(&::exec::bit::FragmentHandle::default_instance());
+}
+
+BitClientHandshake::BitClientHandshake(const BitClientHandshake& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void BitClientHandshake::SharedCtor() {
+ _cached_size_ = 0;
+ rpc_version_ = 0;
+ channel_ = 1;
+ handle_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+BitClientHandshake::~BitClientHandshake() {
+ SharedDtor();
+}
+
+void BitClientHandshake::SharedDtor() {
+ if (this != default_instance_) {
+ delete handle_;
+ }
+}
+
+void BitClientHandshake::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* BitClientHandshake::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return BitClientHandshake_descriptor_;
+}
+
+const BitClientHandshake& BitClientHandshake::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitData_2eproto();
+ return *default_instance_;
+}
+
+BitClientHandshake* BitClientHandshake::default_instance_ = NULL;
+
+BitClientHandshake* BitClientHandshake::New() const {
+ return new BitClientHandshake;
+}
+
+void BitClientHandshake::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ rpc_version_ = 0;
+ channel_ = 1;
+ if (has_handle()) {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool BitClientHandshake::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 int32 rpc_version = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &rpc_version_)));
+ set_has_rpc_version();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_channel;
+ break;
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_channel:
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::shared::RpcChannel_IsValid(value)) {
+ set_channel(static_cast< ::exec::shared::RpcChannel >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(2, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_handle;
+ break;
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_handle:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_handle()));
+ } 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 BitClientHandshake::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->rpc_version(), output);
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
+ if (has_channel()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 2, this->channel(), output);
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 3;
+ if (has_handle()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, this->handle(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* BitClientHandshake::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->rpc_version(), target);
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
+ if (has_channel()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 2, this->channel(), target);
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 3;
+ if (has_handle()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 3, this->handle(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int BitClientHandshake::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->rpc_version());
+ }
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
+ if (has_channel()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->channel());
+ }
+
+ // optional .exec.bit.FragmentHandle handle = 3;
+ if (has_handle()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->handle());
+ }
+
+ }
+ 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 BitClientHandshake::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const BitClientHandshake* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const BitClientHandshake*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void BitClientHandshake::MergeFrom(const BitClientHandshake& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_rpc_version()) {
+ set_rpc_version(from.rpc_version());
+ }
+ if (from.has_channel()) {
+ set_channel(from.channel());
+ }
+ if (from.has_handle()) {
+ mutable_handle()->::exec::bit::FragmentHandle::MergeFrom(from.handle());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void BitClientHandshake::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void BitClientHandshake::CopyFrom(const BitClientHandshake& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool BitClientHandshake::IsInitialized() const {
+
+ return true;
+}
+
+void BitClientHandshake::Swap(BitClientHandshake* other) {
+ if (other != this) {
+ std::swap(rpc_version_, other->rpc_version_);
+ std::swap(channel_, other->channel_);
+ std::swap(handle_, other->handle_);
+ 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 BitClientHandshake::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = BitClientHandshake_descriptor_;
+ metadata.reflection = BitClientHandshake_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int BitServerHandshake::kRpcVersionFieldNumber;
+#endif // !_MSC_VER
+
+BitServerHandshake::BitServerHandshake()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void BitServerHandshake::InitAsDefaultInstance() {
+}
+
+BitServerHandshake::BitServerHandshake(const BitServerHandshake& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void BitServerHandshake::SharedCtor() {
+ _cached_size_ = 0;
+ rpc_version_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+BitServerHandshake::~BitServerHandshake() {
+ SharedDtor();
+}
+
+void BitServerHandshake::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void BitServerHandshake::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* BitServerHandshake::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return BitServerHandshake_descriptor_;
+}
+
+const BitServerHandshake& BitServerHandshake::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitData_2eproto();
+ return *default_instance_;
+}
+
+BitServerHandshake* BitServerHandshake::default_instance_ = NULL;
+
+BitServerHandshake* BitServerHandshake::New() const {
+ return new BitServerHandshake;
+}
+
+void BitServerHandshake::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ rpc_version_ = 0;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool BitServerHandshake::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 int32 rpc_version = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &rpc_version_)));
+ set_has_rpc_version();
+ } 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 BitServerHandshake::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->rpc_version(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* BitServerHandshake::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->rpc_version(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int BitServerHandshake::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int32 rpc_version = 1;
+ if (has_rpc_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->rpc_version());
+ }
+
+ }
+ 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 BitServerHandshake::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const BitServerHandshake* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const BitServerHandshake*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void BitServerHandshake::MergeFrom(const BitServerHandshake& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_rpc_version()) {
+ set_rpc_version(from.rpc_version());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void BitServerHandshake::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void BitServerHandshake::CopyFrom(const BitServerHandshake& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool BitServerHandshake::IsInitialized() const {
+
+ return true;
+}
+
+void BitServerHandshake::Swap(BitServerHandshake* other) {
+ if (other != this) {
+ std::swap(rpc_version_, other->rpc_version_);
+ 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 BitServerHandshake::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = BitServerHandshake_descriptor_;
+ metadata.reflection = BitServerHandshake_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int FragmentRecordBatch::kHandleFieldNumber;
+const int FragmentRecordBatch::kSendingMajorFragmentIdFieldNumber;
+const int FragmentRecordBatch::kSendingMinorFragmentIdFieldNumber;
+const int FragmentRecordBatch::kDefFieldNumber;
+const int FragmentRecordBatch::kIsLastBatchFieldNumber;
+const int FragmentRecordBatch::kIsOutOfMemoryFieldNumber;
+#endif // !_MSC_VER
+
+FragmentRecordBatch::FragmentRecordBatch()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void FragmentRecordBatch::InitAsDefaultInstance() {
+ handle_ = const_cast< ::exec::bit::FragmentHandle*>(&::exec::bit::FragmentHandle::default_instance());
+ def_ = const_cast< ::exec::shared::RecordBatchDef*>(&::exec::shared::RecordBatchDef::default_instance());
+}
+
+FragmentRecordBatch::FragmentRecordBatch(const FragmentRecordBatch& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void FragmentRecordBatch::SharedCtor() {
+ _cached_size_ = 0;
+ handle_ = NULL;
+ sending_major_fragment_id_ = 0;
+ sending_minor_fragment_id_ = 0;
+ def_ = NULL;
+ islastbatch_ = false;
+ isoutofmemory_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+FragmentRecordBatch::~FragmentRecordBatch() {
+ SharedDtor();
+}
+
+void FragmentRecordBatch::SharedDtor() {
+ if (this != default_instance_) {
+ delete handle_;
+ delete def_;
+ }
+}
+
+void FragmentRecordBatch::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* FragmentRecordBatch::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return FragmentRecordBatch_descriptor_;
+}
+
+const FragmentRecordBatch& FragmentRecordBatch::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_BitData_2eproto();
+ return *default_instance_;
+}
+
+FragmentRecordBatch* FragmentRecordBatch::default_instance_ = NULL;
+
+FragmentRecordBatch* FragmentRecordBatch::New() const {
+ return new FragmentRecordBatch;
+}
+
+void FragmentRecordBatch::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_handle()) {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ }
+ sending_major_fragment_id_ = 0;
+ sending_minor_fragment_id_ = 0;
+ if (has_def()) {
+ if (def_ != NULL) def_->::exec::shared::RecordBatchDef::Clear();
+ }
+ islastbatch_ = false;
+ isoutofmemory_ = false;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool FragmentRecordBatch::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 .exec.bit.FragmentHandle handle = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_handle()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_sending_major_fragment_id;
+ break;
+ }
+
+ // optional int32 sending_major_fragment_id = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_sending_major_fragment_id:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &sending_major_fragment_id_)));
+ set_has_sending_major_fragment_id();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_sending_minor_fragment_id;
+ break;
+ }
+
+ // optional int32 sending_minor_fragment_id = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_sending_minor_fragment_id:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &sending_minor_fragment_id_)));
+ set_has_sending_minor_fragment_id();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(34)) goto parse_def;
+ break;
+ }
+
+ // optional .exec.shared.RecordBatchDef def = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_def:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_def()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(40)) goto parse_isLastBatch;
+ break;
+ }
+
+ // optional bool isLastBatch = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_isLastBatch:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &islastbatch_)));
+ set_has_islastbatch();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(48)) goto parse_isOutOfMemory;
+ break;
+ }
+
+ // optional bool isOutOfMemory = 6 [default = false];
+ case 6: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_isOutOfMemory:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &isoutofmemory_)));
+ set_has_isoutofmemory();
+ } 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 FragmentRecordBatch::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.bit.FragmentHandle handle = 1;
+ if (has_handle()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->handle(), output);
+ }
+
+ // optional int32 sending_major_fragment_id = 2;
+ if (has_sending_major_fragment_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->sending_major_fragment_id(), output);
+ }
+
+ // optional int32 sending_minor_fragment_id = 3;
+ if (has_sending_minor_fragment_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->sending_minor_fragment_id(), output);
+ }
+
+ // optional .exec.shared.RecordBatchDef def = 4;
+ if (has_def()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 4, this->def(), output);
+ }
+
+ // optional bool isLastBatch = 5;
+ if (has_islastbatch()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->islastbatch(), output);
+ }
+
+ // optional bool isOutOfMemory = 6 [default = false];
+ if (has_isoutofmemory()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->isoutofmemory(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* FragmentRecordBatch::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.bit.FragmentHandle handle = 1;
+ if (has_handle()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->handle(), target);
+ }
+
+ // optional int32 sending_major_fragment_id = 2;
+ if (has_sending_major_fragment_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->sending_major_fragment_id(), target);
+ }
+
+ // optional int32 sending_minor_fragment_id = 3;
+ if (has_sending_minor_fragment_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->sending_minor_fragment_id(), target);
+ }
+
+ // optional .exec.shared.RecordBatchDef def = 4;
+ if (has_def()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 4, this->def(), target);
+ }
+
+ // optional bool isLastBatch = 5;
+ if (has_islastbatch()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->islastbatch(), target);
+ }
+
+ // optional bool isOutOfMemory = 6 [default = false];
+ if (has_isoutofmemory()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->isoutofmemory(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int FragmentRecordBatch::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.bit.FragmentHandle handle = 1;
+ if (has_handle()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->handle());
+ }
+
+ // optional int32 sending_major_fragment_id = 2;
+ if (has_sending_major_fragment_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->sending_major_fragment_id());
+ }
+
+ // optional int32 sending_minor_fragment_id = 3;
+ if (has_sending_minor_fragment_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->sending_minor_fragment_id());
+ }
+
+ // optional .exec.shared.RecordBatchDef def = 4;
+ if (has_def()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->def());
+ }
+
+ // optional bool isLastBatch = 5;
+ if (has_islastbatch()) {
+ total_size += 1 + 1;
+ }
+
+ // optional bool isOutOfMemory = 6 [default = false];
+ if (has_isoutofmemory()) {
+ total_size += 1 + 1;
+ }
+
+ }
+ 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 FragmentRecordBatch::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const FragmentRecordBatch* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const FragmentRecordBatch*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void FragmentRecordBatch::MergeFrom(const FragmentRecordBatch& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_handle()) {
+ mutable_handle()->::exec::bit::FragmentHandle::MergeFrom(from.handle());
+ }
+ if (from.has_sending_major_fragment_id()) {
+ set_sending_major_fragment_id(from.sending_major_fragment_id());
+ }
+ if (from.has_sending_minor_fragment_id()) {
+ set_sending_minor_fragment_id(from.sending_minor_fragment_id());
+ }
+ if (from.has_def()) {
+ mutable_def()->::exec::shared::RecordBatchDef::MergeFrom(from.def());
+ }
+ if (from.has_islastbatch()) {
+ set_islastbatch(from.islastbatch());
+ }
+ if (from.has_isoutofmemory()) {
+ set_isoutofmemory(from.isoutofmemory());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void FragmentRecordBatch::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void FragmentRecordBatch::CopyFrom(const FragmentRecordBatch& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool FragmentRecordBatch::IsInitialized() const {
+
+ return true;
+}
+
+void FragmentRecordBatch::Swap(FragmentRecordBatch* other) {
+ if (other != this) {
+ std::swap(handle_, other->handle_);
+ std::swap(sending_major_fragment_id_, other->sending_major_fragment_id_);
+ std::swap(sending_minor_fragment_id_, other->sending_minor_fragment_id_);
+ std::swap(def_, other->def_);
+ std::swap(islastbatch_, other->islastbatch_);
+ std::swap(isoutofmemory_, other->isoutofmemory_);
+ 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 FragmentRecordBatch::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = FragmentRecordBatch_descriptor_;
+ metadata.reflection = FragmentRecordBatch_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace data
+} // namespace bit
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/BitData.pb.h b/contrib/native/client/src/protobuf/BitData.pb.h
new file mode 100644
index 000000000..f1f935395
--- /dev/null
+++ b/contrib/native/client/src/protobuf/BitData.pb.h
@@ -0,0 +1,695 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: BitData.proto
+
+#ifndef PROTOBUF_BitData_2eproto__INCLUDED
+#define PROTOBUF_BitData_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "ExecutionProtos.pb.h"
+#include "Coordination.pb.h"
+#include "UserBitShared.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace bit {
+namespace data {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_BitData_2eproto();
+void protobuf_AssignDesc_BitData_2eproto();
+void protobuf_ShutdownFile_BitData_2eproto();
+
+class BitClientHandshake;
+class BitServerHandshake;
+class FragmentRecordBatch;
+
+enum RpcType {
+ HANDSHAKE = 0,
+ ACK = 1,
+ GOODBYE = 2,
+ REQ_RECORD_BATCH = 3
+};
+bool RpcType_IsValid(int value);
+const RpcType RpcType_MIN = HANDSHAKE;
+const RpcType RpcType_MAX = REQ_RECORD_BATCH;
+const int RpcType_ARRAYSIZE = RpcType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor();
+inline const ::std::string& RpcType_Name(RpcType value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ RpcType_descriptor(), value);
+}
+inline bool RpcType_Parse(
+ const ::std::string& name, RpcType* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<RpcType>(
+ RpcType_descriptor(), name, value);
+}
+// ===================================================================
+
+class BitClientHandshake : public ::google::protobuf::Message {
+ public:
+ BitClientHandshake();
+ virtual ~BitClientHandshake();
+
+ BitClientHandshake(const BitClientHandshake& from);
+
+ inline BitClientHandshake& operator=(const BitClientHandshake& 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 BitClientHandshake& default_instance();
+
+ void Swap(BitClientHandshake* other);
+
+ // implements Message ----------------------------------------------
+
+ BitClientHandshake* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const BitClientHandshake& from);
+ void MergeFrom(const BitClientHandshake& 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 int32 rpc_version = 1;
+ inline bool has_rpc_version() const;
+ inline void clear_rpc_version();
+ static const int kRpcVersionFieldNumber = 1;
+ inline ::google::protobuf::int32 rpc_version() const;
+ inline void set_rpc_version(::google::protobuf::int32 value);
+
+ // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
+ inline bool has_channel() const;
+ inline void clear_channel();
+ static const int kChannelFieldNumber = 2;
+ inline ::exec::shared::RpcChannel channel() const;
+ inline void set_channel(::exec::shared::RpcChannel value);
+
+ // optional .exec.bit.FragmentHandle handle = 3;
+ inline bool has_handle() const;
+ inline void clear_handle();
+ static const int kHandleFieldNumber = 3;
+ inline const ::exec::bit::FragmentHandle& handle() const;
+ inline ::exec::bit::FragmentHandle* mutable_handle();
+ inline ::exec::bit::FragmentHandle* release_handle();
+ inline void set_allocated_handle(::exec::bit::FragmentHandle* handle);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.data.BitClientHandshake)
+ private:
+ inline void set_has_rpc_version();
+ inline void clear_has_rpc_version();
+ inline void set_has_channel();
+ inline void clear_has_channel();
+ inline void set_has_handle();
+ inline void clear_has_handle();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int32 rpc_version_;
+ int channel_;
+ ::exec::bit::FragmentHandle* handle_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_BitData_2eproto();
+ friend void protobuf_AssignDesc_BitData_2eproto();
+ friend void protobuf_ShutdownFile_BitData_2eproto();
+
+ void InitAsDefaultInstance();
+ static BitClientHandshake* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class BitServerHandshake : public ::google::protobuf::Message {
+ public:
+ BitServerHandshake();
+ virtual ~BitServerHandshake();
+
+ BitServerHandshake(const BitServerHandshake& from);
+
+ inline BitServerHandshake& operator=(const BitServerHandshake& 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 BitServerHandshake& default_instance();
+
+ void Swap(BitServerHandshake* other);
+
+ // implements Message ----------------------------------------------
+
+ BitServerHandshake* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const BitServerHandshake& from);
+ void MergeFrom(const BitServerHandshake& 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 int32 rpc_version = 1;
+ inline bool has_rpc_version() const;
+ inline void clear_rpc_version();
+ static const int kRpcVersionFieldNumber = 1;
+ inline ::google::protobuf::int32 rpc_version() const;
+ inline void set_rpc_version(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.data.BitServerHandshake)
+ private:
+ inline void set_has_rpc_version();
+ inline void clear_has_rpc_version();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int32 rpc_version_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+ friend void protobuf_AddDesc_BitData_2eproto();
+ friend void protobuf_AssignDesc_BitData_2eproto();
+ friend void protobuf_ShutdownFile_BitData_2eproto();
+
+ void InitAsDefaultInstance();
+ static BitServerHandshake* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class FragmentRecordBatch : public ::google::protobuf::Message {
+ public:
+ FragmentRecordBatch();
+ virtual ~FragmentRecordBatch();
+
+ FragmentRecordBatch(const FragmentRecordBatch& from);
+
+ inline FragmentRecordBatch& operator=(const FragmentRecordBatch& 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 FragmentRecordBatch& default_instance();
+
+ void Swap(FragmentRecordBatch* other);
+
+ // implements Message ----------------------------------------------
+
+ FragmentRecordBatch* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const FragmentRecordBatch& from);
+ void MergeFrom(const FragmentRecordBatch& 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 .exec.bit.FragmentHandle handle = 1;
+ inline bool has_handle() const;
+ inline void clear_handle();
+ static const int kHandleFieldNumber = 1;
+ inline const ::exec::bit::FragmentHandle& handle() const;
+ inline ::exec::bit::FragmentHandle* mutable_handle();
+ inline ::exec::bit::FragmentHandle* release_handle();
+ inline void set_allocated_handle(::exec::bit::FragmentHandle* handle);
+
+ // optional int32 sending_major_fragment_id = 2;
+ inline bool has_sending_major_fragment_id() const;
+ inline void clear_sending_major_fragment_id();
+ static const int kSendingMajorFragmentIdFieldNumber = 2;
+ inline ::google::protobuf::int32 sending_major_fragment_id() const;
+ inline void set_sending_major_fragment_id(::google::protobuf::int32 value);
+
+ // optional int32 sending_minor_fragment_id = 3;
+ inline bool has_sending_minor_fragment_id() const;
+ inline void clear_sending_minor_fragment_id();
+ static const int kSendingMinorFragmentIdFieldNumber = 3;
+ inline ::google::protobuf::int32 sending_minor_fragment_id() const;
+ inline void set_sending_minor_fragment_id(::google::protobuf::int32 value);
+
+ // optional .exec.shared.RecordBatchDef def = 4;
+ inline bool has_def() const;
+ inline void clear_def();
+ static const int kDefFieldNumber = 4;
+ inline const ::exec::shared::RecordBatchDef& def() const;
+ inline ::exec::shared::RecordBatchDef* mutable_def();
+ inline ::exec::shared::RecordBatchDef* release_def();
+ inline void set_allocated_def(::exec::shared::RecordBatchDef* def);
+
+ // optional bool isLastBatch = 5;
+ inline bool has_islastbatch() const;
+ inline void clear_islastbatch();
+ static const int kIsLastBatchFieldNumber = 5;
+ inline bool islastbatch() const;
+ inline void set_islastbatch(bool value);
+
+ // optional bool isOutOfMemory = 6 [default = false];
+ inline bool has_isoutofmemory() const;
+ inline void clear_isoutofmemory();
+ static const int kIsOutOfMemoryFieldNumber = 6;
+ inline bool isoutofmemory() const;
+ inline void set_isoutofmemory(bool value);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.data.FragmentRecordBatch)
+ private:
+ inline void set_has_handle();
+ inline void clear_has_handle();
+ inline void set_has_sending_major_fragment_id();
+ inline void clear_has_sending_major_fragment_id();
+ inline void set_has_sending_minor_fragment_id();
+ inline void clear_has_sending_minor_fragment_id();
+ inline void set_has_def();
+ inline void clear_has_def();
+ inline void set_has_islastbatch();
+ inline void clear_has_islastbatch();
+ inline void set_has_isoutofmemory();
+ inline void clear_has_isoutofmemory();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::exec::bit::FragmentHandle* handle_;
+ ::google::protobuf::int32 sending_major_fragment_id_;
+ ::google::protobuf::int32 sending_minor_fragment_id_;
+ ::exec::shared::RecordBatchDef* def_;
+ bool islastbatch_;
+ bool isoutofmemory_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
+
+ friend void protobuf_AddDesc_BitData_2eproto();
+ friend void protobuf_AssignDesc_BitData_2eproto();
+ friend void protobuf_ShutdownFile_BitData_2eproto();
+
+ void InitAsDefaultInstance();
+ static FragmentRecordBatch* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// BitClientHandshake
+
+// optional int32 rpc_version = 1;
+inline bool BitClientHandshake::has_rpc_version() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void BitClientHandshake::set_has_rpc_version() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void BitClientHandshake::clear_has_rpc_version() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void BitClientHandshake::clear_rpc_version() {
+ rpc_version_ = 0;
+ clear_has_rpc_version();
+}
+inline ::google::protobuf::int32 BitClientHandshake::rpc_version() const {
+ return rpc_version_;
+}
+inline void BitClientHandshake::set_rpc_version(::google::protobuf::int32 value) {
+ set_has_rpc_version();
+ rpc_version_ = value;
+}
+
+// optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
+inline bool BitClientHandshake::has_channel() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void BitClientHandshake::set_has_channel() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void BitClientHandshake::clear_has_channel() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void BitClientHandshake::clear_channel() {
+ channel_ = 1;
+ clear_has_channel();
+}
+inline ::exec::shared::RpcChannel BitClientHandshake::channel() const {
+ return static_cast< ::exec::shared::RpcChannel >(channel_);
+}
+inline void BitClientHandshake::set_channel(::exec::shared::RpcChannel value) {
+ assert(::exec::shared::RpcChannel_IsValid(value));
+ set_has_channel();
+ channel_ = value;
+}
+
+// optional .exec.bit.FragmentHandle handle = 3;
+inline bool BitClientHandshake::has_handle() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void BitClientHandshake::set_has_handle() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void BitClientHandshake::clear_has_handle() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void BitClientHandshake::clear_handle() {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ clear_has_handle();
+}
+inline const ::exec::bit::FragmentHandle& BitClientHandshake::handle() const {
+ return handle_ != NULL ? *handle_ : *default_instance_->handle_;
+}
+inline ::exec::bit::FragmentHandle* BitClientHandshake::mutable_handle() {
+ set_has_handle();
+ if (handle_ == NULL) handle_ = new ::exec::bit::FragmentHandle;
+ return handle_;
+}
+inline ::exec::bit::FragmentHandle* BitClientHandshake::release_handle() {
+ clear_has_handle();
+ ::exec::bit::FragmentHandle* temp = handle_;
+ handle_ = NULL;
+ return temp;
+}
+inline void BitClientHandshake::set_allocated_handle(::exec::bit::FragmentHandle* handle) {
+ delete handle_;
+ handle_ = handle;
+ if (handle) {
+ set_has_handle();
+ } else {
+ clear_has_handle();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// BitServerHandshake
+
+// optional int32 rpc_version = 1;
+inline bool BitServerHandshake::has_rpc_version() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void BitServerHandshake::set_has_rpc_version() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void BitServerHandshake::clear_has_rpc_version() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void BitServerHandshake::clear_rpc_version() {
+ rpc_version_ = 0;
+ clear_has_rpc_version();
+}
+inline ::google::protobuf::int32 BitServerHandshake::rpc_version() const {
+ return rpc_version_;
+}
+inline void BitServerHandshake::set_rpc_version(::google::protobuf::int32 value) {
+ set_has_rpc_version();
+ rpc_version_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// FragmentRecordBatch
+
+// optional .exec.bit.FragmentHandle handle = 1;
+inline bool FragmentRecordBatch::has_handle() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void FragmentRecordBatch::set_has_handle() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void FragmentRecordBatch::clear_has_handle() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void FragmentRecordBatch::clear_handle() {
+ if (handle_ != NULL) handle_->::exec::bit::FragmentHandle::Clear();
+ clear_has_handle();
+}
+inline const ::exec::bit::FragmentHandle& FragmentRecordBatch::handle() const {
+ return handle_ != NULL ? *handle_ : *default_instance_->handle_;
+}
+inline ::exec::bit::FragmentHandle* FragmentRecordBatch::mutable_handle() {
+ set_has_handle();
+ if (handle_ == NULL) handle_ = new ::exec::bit::FragmentHandle;
+ return handle_;
+}
+inline ::exec::bit::FragmentHandle* FragmentRecordBatch::release_handle() {
+ clear_has_handle();
+ ::exec::bit::FragmentHandle* temp = handle_;
+ handle_ = NULL;
+ return temp;
+}
+inline void FragmentRecordBatch::set_allocated_handle(::exec::bit::FragmentHandle* handle) {
+ delete handle_;
+ handle_ = handle;
+ if (handle) {
+ set_has_handle();
+ } else {
+ clear_has_handle();
+ }
+}
+
+// optional int32 sending_major_fragment_id = 2;
+inline bool FragmentRecordBatch::has_sending_major_fragment_id() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void FragmentRecordBatch::set_has_sending_major_fragment_id() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void FragmentRecordBatch::clear_has_sending_major_fragment_id() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void FragmentRecordBatch::clear_sending_major_fragment_id() {
+ sending_major_fragment_id_ = 0;
+ clear_has_sending_major_fragment_id();
+}
+inline ::google::protobuf::int32 FragmentRecordBatch::sending_major_fragment_id() const {
+ return sending_major_fragment_id_;
+}
+inline void FragmentRecordBatch::set_sending_major_fragment_id(::google::protobuf::int32 value) {
+ set_has_sending_major_fragment_id();
+ sending_major_fragment_id_ = value;
+}
+
+// optional int32 sending_minor_fragment_id = 3;
+inline bool FragmentRecordBatch::has_sending_minor_fragment_id() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void FragmentRecordBatch::set_has_sending_minor_fragment_id() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void FragmentRecordBatch::clear_has_sending_minor_fragment_id() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void FragmentRecordBatch::clear_sending_minor_fragment_id() {
+ sending_minor_fragment_id_ = 0;
+ clear_has_sending_minor_fragment_id();
+}
+inline ::google::protobuf::int32 FragmentRecordBatch::sending_minor_fragment_id() const {
+ return sending_minor_fragment_id_;
+}
+inline void FragmentRecordBatch::set_sending_minor_fragment_id(::google::protobuf::int32 value) {
+ set_has_sending_minor_fragment_id();
+ sending_minor_fragment_id_ = value;
+}
+
+// optional .exec.shared.RecordBatchDef def = 4;
+inline bool FragmentRecordBatch::has_def() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void FragmentRecordBatch::set_has_def() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void FragmentRecordBatch::clear_has_def() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void FragmentRecordBatch::clear_def() {
+ if (def_ != NULL) def_->::exec::shared::RecordBatchDef::Clear();
+ clear_has_def();
+}
+inline const ::exec::shared::RecordBatchDef& FragmentRecordBatch::def() const {
+ return def_ != NULL ? *def_ : *default_instance_->def_;
+}
+inline ::exec::shared::RecordBatchDef* FragmentRecordBatch::mutable_def() {
+ set_has_def();
+ if (def_ == NULL) def_ = new ::exec::shared::RecordBatchDef;
+ return def_;
+}
+inline ::exec::shared::RecordBatchDef* FragmentRecordBatch::release_def() {
+ clear_has_def();
+ ::exec::shared::RecordBatchDef* temp = def_;
+ def_ = NULL;
+ return temp;
+}
+inline void FragmentRecordBatch::set_allocated_def(::exec::shared::RecordBatchDef* def) {
+ delete def_;
+ def_ = def;
+ if (def) {
+ set_has_def();
+ } else {
+ clear_has_def();
+ }
+}
+
+// optional bool isLastBatch = 5;
+inline bool FragmentRecordBatch::has_islastbatch() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void FragmentRecordBatch::set_has_islastbatch() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void FragmentRecordBatch::clear_has_islastbatch() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void FragmentRecordBatch::clear_islastbatch() {
+ islastbatch_ = false;
+ clear_has_islastbatch();
+}
+inline bool FragmentRecordBatch::islastbatch() const {
+ return islastbatch_;
+}
+inline void FragmentRecordBatch::set_islastbatch(bool value) {
+ set_has_islastbatch();
+ islastbatch_ = value;
+}
+
+// optional bool isOutOfMemory = 6 [default = false];
+inline bool FragmentRecordBatch::has_isoutofmemory() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void FragmentRecordBatch::set_has_isoutofmemory() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void FragmentRecordBatch::clear_has_isoutofmemory() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void FragmentRecordBatch::clear_isoutofmemory() {
+ isoutofmemory_ = false;
+ clear_has_isoutofmemory();
+}
+inline bool FragmentRecordBatch::isoutofmemory() const {
+ return isoutofmemory_;
+}
+inline void FragmentRecordBatch::set_isoutofmemory(bool value) {
+ set_has_isoutofmemory();
+ isoutofmemory_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace data
+} // namespace bit
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::bit::data::RpcType>() {
+ return ::exec::bit::data::RpcType_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_BitData_2eproto__INCLUDED
diff --git a/contrib/native/client/src/protobuf/CMakeLists.txt b/contrib/native/client/src/protobuf/CMakeLists.txt
new file mode 100644
index 000000000..98fbfbac2
--- /dev/null
+++ b/contrib/native/client/src/protobuf/CMakeLists.txt
@@ -0,0 +1,112 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Find Protobufs
+find_package(Protobuf REQUIRED)
+include_directories(${PROTOBUF_INCLUDE_DIR})
+
+#Generate Protobuf code
+
+set (PROTO_SRC_FILES
+ ${CMAKE_BINARY_DIR}/protobuf/BitControl.proto
+ ${CMAKE_BINARY_DIR}/protobuf/Coordination.proto
+ ${CMAKE_BINARY_DIR}/protobuf/GeneralRPC.proto
+ ${CMAKE_BINARY_DIR}/protobuf/Types.proto
+ ${CMAKE_BINARY_DIR}/protobuf/UserBitShared.proto
+ ${CMAKE_BINARY_DIR}/protobuf/BitData.proto
+ ${CMAKE_BINARY_DIR}/protobuf/ExecutionProtos.proto
+ ${CMAKE_BINARY_DIR}/protobuf/SchemaDef.proto
+ ${CMAKE_BINARY_DIR}/protobuf/User.proto
+ )
+
+PROTOBUF_GENERATE_CPP(GenProtoSources GenProtoHeaders ${PROTO_SRC_FILES})
+
+set (PROTO_CPPSRC_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/BitControl.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/Coordination.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/GeneralRPC.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/Types.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/UserBitShared.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/BitData.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/ExecutionProtos.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/SchemaDef.pb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/User.pb.cc
+ )
+
+set (PROTO_HDR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+
+set (PROTO_CPPHDR_FILES
+ ${PROTO_HDR_DIR}/BitControl.pb.h
+ ${PROTO_HDR_DIR}/Coordination.pb.h
+ ${PROTO_HDR_DIR}/GeneralRPC.pb.h
+ ${PROTO_HDR_DIR}/UserBitShared.pb.h
+ ${PROTO_HDR_DIR}/BitData.pb.h
+ ${PROTO_HDR_DIR}/ExecutionProtos.pb.h
+ ${PROTO_HDR_DIR}/SchemaDef.pb.h
+ )
+
+set (PROTO_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../include/drill/protobuf)
+
+set (PROTO_CPPINC_FILES
+ ${PROTO_INC_DIR}/Types.pb.h
+ ${PROTO_INC_DIR}/User.pb.h
+ )
+
+set(ProtoIncludes ${PROTO_CPPINC_FILES} )
+set(ProtoSources ${PROTO_CPPSRC_FILES} )
+set(ProtoHeaders ${PROTO_CPPHDR_FILES})
+include_directories(${PROTO_INC_DIR})
+include_directories(${PROTO_HDR_DIR})
+
+set(ProtoHeadersDir ${PROTO_HDR_DIR} PARENT_SCOPE)
+set(ProtoIncludesDir ${PROTO_INC_DIR} PARENT_SCOPE)
+
+#
+# TARGETS
+#
+
+#Preprocess to fix protobuf .proto definitions
+SET (SRCDIR ${PROJECT_SOURCE_DIR}/../../../protocol/src/main/protobuf )
+SET (TARGDIR ${PROJECT_SOURCE_DIR}/build/protobuf)
+SET (FNAME Types.proto)
+SET (CPPSRCDIR ${PROJECT_SOURCE_DIR}/build/src/protobuf)
+SET (CPPDESTDIR ${PROJECT_SOURCE_DIR}/src/protobuf)
+SET (CPPINCDIR ${PROJECT_SOURCE_DIR}/src/include/drill/protobuf)
+
+add_custom_target(fixProtobufs
+ COMMAND ${PROJECT_SOURCE_DIR}/scripts/fixProtodefs.sh ${SRCDIR} ${TARGDIR} ${FNAME}
+ )
+
+add_custom_target(genProtobufs DEPENDS ${GenProtoSources})
+
+# copy protobuf CPP files to destinations in the source tree
+add_custom_target(cpProtobufs
+ COMMAND ${PROJECT_SOURCE_DIR}/scripts/cpProtofiles.sh ${CPPSRCDIR} ${CPPDESTDIR} ${CPPINCDIR}
+ )
+
+#message("ProtoSources = ${ProtoSources}" )
+#message("ProtoHeaders = ${ProtoHeaders}" )
+#message("ProtoIncludes = ${ProtoIncludes}" )
+
+add_library(protomsgs STATIC ${ProtoSources} ${ProtoHeaders} ${ProtoIncludes} )
+#set linker properties. The first time around, the protobufs generated files may not exist
+# and CMAKE will not be able to determine the linker type.
+SET_TARGET_PROPERTIES(protomsgs PROPERTIES LINKER_LANGUAGE C)
+
+add_dependencies(cpProtobufs genProtobufs)
+
diff --git a/contrib/native/client/src/protobuf/Coordination.pb.cc b/contrib/native/client/src/protobuf/Coordination.pb.cc
new file mode 100644
index 000000000..dd6b02f81
--- /dev/null
+++ b/contrib/native/client/src/protobuf/Coordination.pb.cc
@@ -0,0 +1,1227 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Coordination.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "Coordination.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+
+namespace {
+
+const ::google::protobuf::Descriptor* DrillbitEndpoint_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ DrillbitEndpoint_reflection_ = NULL;
+const ::google::protobuf::Descriptor* DrillServiceInstance_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ DrillServiceInstance_reflection_ = NULL;
+const ::google::protobuf::Descriptor* Roles_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ Roles_reflection_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_Coordination_2eproto() {
+ protobuf_AddDesc_Coordination_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "Coordination.proto");
+ GOOGLE_CHECK(file != NULL);
+ DrillbitEndpoint_descriptor_ = file->message_type(0);
+ static const int DrillbitEndpoint_offsets_[5] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillbitEndpoint, address_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillbitEndpoint, user_port_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillbitEndpoint, control_port_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillbitEndpoint, data_port_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillbitEndpoint, roles_),
+ };
+ DrillbitEndpoint_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ DrillbitEndpoint_descriptor_,
+ DrillbitEndpoint::default_instance_,
+ DrillbitEndpoint_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillbitEndpoint, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillbitEndpoint, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(DrillbitEndpoint));
+ DrillServiceInstance_descriptor_ = file->message_type(1);
+ static const int DrillServiceInstance_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillServiceInstance, id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillServiceInstance, registrationtimeutc_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillServiceInstance, endpoint_),
+ };
+ DrillServiceInstance_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ DrillServiceInstance_descriptor_,
+ DrillServiceInstance::default_instance_,
+ DrillServiceInstance_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillServiceInstance, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillServiceInstance, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(DrillServiceInstance));
+ Roles_descriptor_ = file->message_type(2);
+ static const int Roles_offsets_[5] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Roles, sql_query_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Roles, logical_plan_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Roles, physical_plan_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Roles, java_executor_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Roles, distributed_cache_),
+ };
+ Roles_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ Roles_descriptor_,
+ Roles::default_instance_,
+ Roles_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Roles, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Roles, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(Roles));
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_Coordination_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ DrillbitEndpoint_descriptor_, &DrillbitEndpoint::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ DrillServiceInstance_descriptor_, &DrillServiceInstance::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ Roles_descriptor_, &Roles::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_Coordination_2eproto() {
+ delete DrillbitEndpoint::default_instance_;
+ delete DrillbitEndpoint_reflection_;
+ delete DrillServiceInstance::default_instance_;
+ delete DrillServiceInstance_reflection_;
+ delete Roles::default_instance_;
+ delete Roles_reflection_;
+}
+
+void protobuf_AddDesc_Coordination_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\022Coordination.proto\022\004exec\"{\n\020DrillbitEn"
+ "dpoint\022\017\n\007address\030\001 \001(\t\022\021\n\tuser_port\030\002 \001"
+ "(\005\022\024\n\014control_port\030\003 \001(\005\022\021\n\tdata_port\030\004 "
+ "\001(\005\022\032\n\005roles\030\005 \001(\0132\013.exec.Roles\"i\n\024Drill"
+ "ServiceInstance\022\n\n\002id\030\001 \001(\t\022\033\n\023registrat"
+ "ionTimeUTC\030\002 \001(\003\022(\n\010endpoint\030\003 \001(\0132\026.exe"
+ "c.DrillbitEndpoint\"\227\001\n\005Roles\022\027\n\tsql_quer"
+ "y\030\001 \001(\010:\004true\022\032\n\014logical_plan\030\002 \001(\010:\004tru"
+ "e\022\033\n\rphysical_plan\030\003 \001(\010:\004true\022\033\n\rjava_e"
+ "xecutor\030\004 \001(\010:\004true\022\037\n\021distributed_cache"
+ "\030\005 \001(\010:\004trueB3\n\033org.apache.drill.exec.pr"
+ "otoB\022CoordinationProtosH\001", 465);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "Coordination.proto", &protobuf_RegisterTypes);
+ DrillbitEndpoint::default_instance_ = new DrillbitEndpoint();
+ DrillServiceInstance::default_instance_ = new DrillServiceInstance();
+ Roles::default_instance_ = new Roles();
+ DrillbitEndpoint::default_instance_->InitAsDefaultInstance();
+ DrillServiceInstance::default_instance_->InitAsDefaultInstance();
+ Roles::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Coordination_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_Coordination_2eproto {
+ StaticDescriptorInitializer_Coordination_2eproto() {
+ protobuf_AddDesc_Coordination_2eproto();
+ }
+} static_descriptor_initializer_Coordination_2eproto_;
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int DrillbitEndpoint::kAddressFieldNumber;
+const int DrillbitEndpoint::kUserPortFieldNumber;
+const int DrillbitEndpoint::kControlPortFieldNumber;
+const int DrillbitEndpoint::kDataPortFieldNumber;
+const int DrillbitEndpoint::kRolesFieldNumber;
+#endif // !_MSC_VER
+
+DrillbitEndpoint::DrillbitEndpoint()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void DrillbitEndpoint::InitAsDefaultInstance() {
+ roles_ = const_cast< ::exec::Roles*>(&::exec::Roles::default_instance());
+}
+
+DrillbitEndpoint::DrillbitEndpoint(const DrillbitEndpoint& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void DrillbitEndpoint::SharedCtor() {
+ _cached_size_ = 0;
+ address_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ user_port_ = 0;
+ control_port_ = 0;
+ data_port_ = 0;
+ roles_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+DrillbitEndpoint::~DrillbitEndpoint() {
+ SharedDtor();
+}
+
+void DrillbitEndpoint::SharedDtor() {
+ if (address_ != &::google::protobuf::internal::kEmptyString) {
+ delete address_;
+ }
+ if (this != default_instance_) {
+ delete roles_;
+ }
+}
+
+void DrillbitEndpoint::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* DrillbitEndpoint::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return DrillbitEndpoint_descriptor_;
+}
+
+const DrillbitEndpoint& DrillbitEndpoint::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_Coordination_2eproto();
+ return *default_instance_;
+}
+
+DrillbitEndpoint* DrillbitEndpoint::default_instance_ = NULL;
+
+DrillbitEndpoint* DrillbitEndpoint::New() const {
+ return new DrillbitEndpoint;
+}
+
+void DrillbitEndpoint::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_address()) {
+ if (address_ != &::google::protobuf::internal::kEmptyString) {
+ address_->clear();
+ }
+ }
+ user_port_ = 0;
+ control_port_ = 0;
+ data_port_ = 0;
+ if (has_roles()) {
+ if (roles_ != NULL) roles_->::exec::Roles::Clear();
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool DrillbitEndpoint::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 string address = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_address()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->address().data(), this->address().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_user_port;
+ break;
+ }
+
+ // optional int32 user_port = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_user_port:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &user_port_)));
+ set_has_user_port();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_control_port;
+ break;
+ }
+
+ // optional int32 control_port = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_control_port:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &control_port_)));
+ set_has_control_port();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(32)) goto parse_data_port;
+ break;
+ }
+
+ // optional int32 data_port = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_data_port:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &data_port_)));
+ set_has_data_port();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(42)) goto parse_roles;
+ break;
+ }
+
+ // optional .exec.Roles roles = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_roles:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_roles()));
+ } 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 DrillbitEndpoint::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional string address = 1;
+ if (has_address()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->address().data(), this->address().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 1, this->address(), output);
+ }
+
+ // optional int32 user_port = 2;
+ if (has_user_port()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->user_port(), output);
+ }
+
+ // optional int32 control_port = 3;
+ if (has_control_port()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->control_port(), output);
+ }
+
+ // optional int32 data_port = 4;
+ if (has_data_port()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->data_port(), output);
+ }
+
+ // optional .exec.Roles roles = 5;
+ if (has_roles()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 5, this->roles(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* DrillbitEndpoint::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string address = 1;
+ if (has_address()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->address().data(), this->address().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 1, this->address(), target);
+ }
+
+ // optional int32 user_port = 2;
+ if (has_user_port()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->user_port(), target);
+ }
+
+ // optional int32 control_port = 3;
+ if (has_control_port()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->control_port(), target);
+ }
+
+ // optional int32 data_port = 4;
+ if (has_data_port()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->data_port(), target);
+ }
+
+ // optional .exec.Roles roles = 5;
+ if (has_roles()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 5, this->roles(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int DrillbitEndpoint::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional string address = 1;
+ if (has_address()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->address());
+ }
+
+ // optional int32 user_port = 2;
+ if (has_user_port()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->user_port());
+ }
+
+ // optional int32 control_port = 3;
+ if (has_control_port()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->control_port());
+ }
+
+ // optional int32 data_port = 4;
+ if (has_data_port()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->data_port());
+ }
+
+ // optional .exec.Roles roles = 5;
+ if (has_roles()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->roles());
+ }
+
+ }
+ 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 DrillbitEndpoint::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const DrillbitEndpoint* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const DrillbitEndpoint*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void DrillbitEndpoint::MergeFrom(const DrillbitEndpoint& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_address()) {
+ set_address(from.address());
+ }
+ if (from.has_user_port()) {
+ set_user_port(from.user_port());
+ }
+ if (from.has_control_port()) {
+ set_control_port(from.control_port());
+ }
+ if (from.has_data_port()) {
+ set_data_port(from.data_port());
+ }
+ if (from.has_roles()) {
+ mutable_roles()->::exec::Roles::MergeFrom(from.roles());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void DrillbitEndpoint::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void DrillbitEndpoint::CopyFrom(const DrillbitEndpoint& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool DrillbitEndpoint::IsInitialized() const {
+
+ return true;
+}
+
+void DrillbitEndpoint::Swap(DrillbitEndpoint* other) {
+ if (other != this) {
+ std::swap(address_, other->address_);
+ std::swap(user_port_, other->user_port_);
+ std::swap(control_port_, other->control_port_);
+ std::swap(data_port_, other->data_port_);
+ std::swap(roles_, other->roles_);
+ 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 DrillbitEndpoint::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = DrillbitEndpoint_descriptor_;
+ metadata.reflection = DrillbitEndpoint_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int DrillServiceInstance::kIdFieldNumber;
+const int DrillServiceInstance::kRegistrationTimeUTCFieldNumber;
+const int DrillServiceInstance::kEndpointFieldNumber;
+#endif // !_MSC_VER
+
+DrillServiceInstance::DrillServiceInstance()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void DrillServiceInstance::InitAsDefaultInstance() {
+ endpoint_ = const_cast< ::exec::DrillbitEndpoint*>(&::exec::DrillbitEndpoint::default_instance());
+}
+
+DrillServiceInstance::DrillServiceInstance(const DrillServiceInstance& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void DrillServiceInstance::SharedCtor() {
+ _cached_size_ = 0;
+ id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ registrationtimeutc_ = GOOGLE_LONGLONG(0);
+ endpoint_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+DrillServiceInstance::~DrillServiceInstance() {
+ SharedDtor();
+}
+
+void DrillServiceInstance::SharedDtor() {
+ if (id_ != &::google::protobuf::internal::kEmptyString) {
+ delete id_;
+ }
+ if (this != default_instance_) {
+ delete endpoint_;
+ }
+}
+
+void DrillServiceInstance::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* DrillServiceInstance::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return DrillServiceInstance_descriptor_;
+}
+
+const DrillServiceInstance& DrillServiceInstance::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_Coordination_2eproto();
+ return *default_instance_;
+}
+
+DrillServiceInstance* DrillServiceInstance::default_instance_ = NULL;
+
+DrillServiceInstance* DrillServiceInstance::New() const {
+ return new DrillServiceInstance;
+}
+
+void DrillServiceInstance::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_id()) {
+ if (id_ != &::google::protobuf::internal::kEmptyString) {
+ id_->clear();
+ }
+ }
+ registrationtimeutc_ = GOOGLE_LONGLONG(0);
+ if (has_endpoint()) {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool DrillServiceInstance::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 string id = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_id()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->id().data(), this->id().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_registrationTimeUTC;
+ break;
+ }
+
+ // optional int64 registrationTimeUTC = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_registrationTimeUTC:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &registrationtimeutc_)));
+ set_has_registrationtimeutc();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_endpoint;
+ break;
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_endpoint:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_endpoint()));
+ } 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 DrillServiceInstance::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional string id = 1;
+ if (has_id()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->id().data(), this->id().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 1, this->id(), output);
+ }
+
+ // optional int64 registrationTimeUTC = 2;
+ if (has_registrationtimeutc()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->registrationtimeutc(), output);
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ if (has_endpoint()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, this->endpoint(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* DrillServiceInstance::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string id = 1;
+ if (has_id()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->id().data(), this->id().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 1, this->id(), target);
+ }
+
+ // optional int64 registrationTimeUTC = 2;
+ if (has_registrationtimeutc()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->registrationtimeutc(), target);
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ if (has_endpoint()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 3, this->endpoint(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int DrillServiceInstance::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional string id = 1;
+ if (has_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->id());
+ }
+
+ // optional int64 registrationTimeUTC = 2;
+ if (has_registrationtimeutc()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->registrationtimeutc());
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ if (has_endpoint()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->endpoint());
+ }
+
+ }
+ 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 DrillServiceInstance::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const DrillServiceInstance* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const DrillServiceInstance*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void DrillServiceInstance::MergeFrom(const DrillServiceInstance& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_id()) {
+ set_id(from.id());
+ }
+ if (from.has_registrationtimeutc()) {
+ set_registrationtimeutc(from.registrationtimeutc());
+ }
+ if (from.has_endpoint()) {
+ mutable_endpoint()->::exec::DrillbitEndpoint::MergeFrom(from.endpoint());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void DrillServiceInstance::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void DrillServiceInstance::CopyFrom(const DrillServiceInstance& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool DrillServiceInstance::IsInitialized() const {
+
+ return true;
+}
+
+void DrillServiceInstance::Swap(DrillServiceInstance* other) {
+ if (other != this) {
+ std::swap(id_, other->id_);
+ std::swap(registrationtimeutc_, other->registrationtimeutc_);
+ std::swap(endpoint_, other->endpoint_);
+ 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 DrillServiceInstance::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = DrillServiceInstance_descriptor_;
+ metadata.reflection = DrillServiceInstance_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int Roles::kSqlQueryFieldNumber;
+const int Roles::kLogicalPlanFieldNumber;
+const int Roles::kPhysicalPlanFieldNumber;
+const int Roles::kJavaExecutorFieldNumber;
+const int Roles::kDistributedCacheFieldNumber;
+#endif // !_MSC_VER
+
+Roles::Roles()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void Roles::InitAsDefaultInstance() {
+}
+
+Roles::Roles(const Roles& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void Roles::SharedCtor() {
+ _cached_size_ = 0;
+ sql_query_ = true;
+ logical_plan_ = true;
+ physical_plan_ = true;
+ java_executor_ = true;
+ distributed_cache_ = true;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+Roles::~Roles() {
+ SharedDtor();
+}
+
+void Roles::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void Roles::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* Roles::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return Roles_descriptor_;
+}
+
+const Roles& Roles::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_Coordination_2eproto();
+ return *default_instance_;
+}
+
+Roles* Roles::default_instance_ = NULL;
+
+Roles* Roles::New() const {
+ return new Roles;
+}
+
+void Roles::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ sql_query_ = true;
+ logical_plan_ = true;
+ physical_plan_ = true;
+ java_executor_ = true;
+ distributed_cache_ = true;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool Roles::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 bool sql_query = 1 [default = true];
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &sql_query_)));
+ set_has_sql_query();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_logical_plan;
+ break;
+ }
+
+ // optional bool logical_plan = 2 [default = true];
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_logical_plan:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &logical_plan_)));
+ set_has_logical_plan();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_physical_plan;
+ break;
+ }
+
+ // optional bool physical_plan = 3 [default = true];
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_physical_plan:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &physical_plan_)));
+ set_has_physical_plan();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(32)) goto parse_java_executor;
+ break;
+ }
+
+ // optional bool java_executor = 4 [default = true];
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_java_executor:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &java_executor_)));
+ set_has_java_executor();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(40)) goto parse_distributed_cache;
+ break;
+ }
+
+ // optional bool distributed_cache = 5 [default = true];
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_distributed_cache:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &distributed_cache_)));
+ set_has_distributed_cache();
+ } 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 Roles::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional bool sql_query = 1 [default = true];
+ if (has_sql_query()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->sql_query(), output);
+ }
+
+ // optional bool logical_plan = 2 [default = true];
+ if (has_logical_plan()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->logical_plan(), output);
+ }
+
+ // optional bool physical_plan = 3 [default = true];
+ if (has_physical_plan()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->physical_plan(), output);
+ }
+
+ // optional bool java_executor = 4 [default = true];
+ if (has_java_executor()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->java_executor(), output);
+ }
+
+ // optional bool distributed_cache = 5 [default = true];
+ if (has_distributed_cache()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->distributed_cache(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* Roles::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional bool sql_query = 1 [default = true];
+ if (has_sql_query()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->sql_query(), target);
+ }
+
+ // optional bool logical_plan = 2 [default = true];
+ if (has_logical_plan()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->logical_plan(), target);
+ }
+
+ // optional bool physical_plan = 3 [default = true];
+ if (has_physical_plan()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->physical_plan(), target);
+ }
+
+ // optional bool java_executor = 4 [default = true];
+ if (has_java_executor()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->java_executor(), target);
+ }
+
+ // optional bool distributed_cache = 5 [default = true];
+ if (has_distributed_cache()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->distributed_cache(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int Roles::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional bool sql_query = 1 [default = true];
+ if (has_sql_query()) {
+ total_size += 1 + 1;
+ }
+
+ // optional bool logical_plan = 2 [default = true];
+ if (has_logical_plan()) {
+ total_size += 1 + 1;
+ }
+
+ // optional bool physical_plan = 3 [default = true];
+ if (has_physical_plan()) {
+ total_size += 1 + 1;
+ }
+
+ // optional bool java_executor = 4 [default = true];
+ if (has_java_executor()) {
+ total_size += 1 + 1;
+ }
+
+ // optional bool distributed_cache = 5 [default = true];
+ if (has_distributed_cache()) {
+ total_size += 1 + 1;
+ }
+
+ }
+ 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 Roles::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const Roles* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const Roles*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void Roles::MergeFrom(const Roles& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_sql_query()) {
+ set_sql_query(from.sql_query());
+ }
+ if (from.has_logical_plan()) {
+ set_logical_plan(from.logical_plan());
+ }
+ if (from.has_physical_plan()) {
+ set_physical_plan(from.physical_plan());
+ }
+ if (from.has_java_executor()) {
+ set_java_executor(from.java_executor());
+ }
+ if (from.has_distributed_cache()) {
+ set_distributed_cache(from.distributed_cache());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void Roles::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void Roles::CopyFrom(const Roles& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool Roles::IsInitialized() const {
+
+ return true;
+}
+
+void Roles::Swap(Roles* other) {
+ if (other != this) {
+ std::swap(sql_query_, other->sql_query_);
+ std::swap(logical_plan_, other->logical_plan_);
+ std::swap(physical_plan_, other->physical_plan_);
+ std::swap(java_executor_, other->java_executor_);
+ std::swap(distributed_cache_, other->distributed_cache_);
+ 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 Roles::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = Roles_descriptor_;
+ metadata.reflection = Roles_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/Coordination.pb.h b/contrib/native/client/src/protobuf/Coordination.pb.h
new file mode 100644
index 000000000..bea819a2b
--- /dev/null
+++ b/contrib/native/client/src/protobuf/Coordination.pb.h
@@ -0,0 +1,845 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Coordination.proto
+
+#ifndef PROTOBUF_Coordination_2eproto__INCLUDED
+#define PROTOBUF_Coordination_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_Coordination_2eproto();
+void protobuf_AssignDesc_Coordination_2eproto();
+void protobuf_ShutdownFile_Coordination_2eproto();
+
+class DrillbitEndpoint;
+class DrillServiceInstance;
+class Roles;
+
+// ===================================================================
+
+class DrillbitEndpoint : public ::google::protobuf::Message {
+ public:
+ DrillbitEndpoint();
+ virtual ~DrillbitEndpoint();
+
+ DrillbitEndpoint(const DrillbitEndpoint& from);
+
+ inline DrillbitEndpoint& operator=(const DrillbitEndpoint& 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 DrillbitEndpoint& default_instance();
+
+ void Swap(DrillbitEndpoint* other);
+
+ // implements Message ----------------------------------------------
+
+ DrillbitEndpoint* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const DrillbitEndpoint& from);
+ void MergeFrom(const DrillbitEndpoint& 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 string address = 1;
+ inline bool has_address() const;
+ inline void clear_address();
+ static const int kAddressFieldNumber = 1;
+ inline const ::std::string& address() const;
+ inline void set_address(const ::std::string& value);
+ inline void set_address(const char* value);
+ inline void set_address(const char* value, size_t size);
+ inline ::std::string* mutable_address();
+ inline ::std::string* release_address();
+ inline void set_allocated_address(::std::string* address);
+
+ // optional int32 user_port = 2;
+ inline bool has_user_port() const;
+ inline void clear_user_port();
+ static const int kUserPortFieldNumber = 2;
+ inline ::google::protobuf::int32 user_port() const;
+ inline void set_user_port(::google::protobuf::int32 value);
+
+ // optional int32 control_port = 3;
+ inline bool has_control_port() const;
+ inline void clear_control_port();
+ static const int kControlPortFieldNumber = 3;
+ inline ::google::protobuf::int32 control_port() const;
+ inline void set_control_port(::google::protobuf::int32 value);
+
+ // optional int32 data_port = 4;
+ inline bool has_data_port() const;
+ inline void clear_data_port();
+ static const int kDataPortFieldNumber = 4;
+ inline ::google::protobuf::int32 data_port() const;
+ inline void set_data_port(::google::protobuf::int32 value);
+
+ // optional .exec.Roles roles = 5;
+ inline bool has_roles() const;
+ inline void clear_roles();
+ static const int kRolesFieldNumber = 5;
+ inline const ::exec::Roles& roles() const;
+ inline ::exec::Roles* mutable_roles();
+ inline ::exec::Roles* release_roles();
+ inline void set_allocated_roles(::exec::Roles* roles);
+
+ // @@protoc_insertion_point(class_scope:exec.DrillbitEndpoint)
+ private:
+ inline void set_has_address();
+ inline void clear_has_address();
+ inline void set_has_user_port();
+ inline void clear_has_user_port();
+ inline void set_has_control_port();
+ inline void clear_has_control_port();
+ inline void set_has_data_port();
+ inline void clear_has_data_port();
+ inline void set_has_roles();
+ inline void clear_has_roles();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::std::string* address_;
+ ::google::protobuf::int32 user_port_;
+ ::google::protobuf::int32 control_port_;
+ ::exec::Roles* roles_;
+ ::google::protobuf::int32 data_port_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
+
+ friend void protobuf_AddDesc_Coordination_2eproto();
+ friend void protobuf_AssignDesc_Coordination_2eproto();
+ friend void protobuf_ShutdownFile_Coordination_2eproto();
+
+ void InitAsDefaultInstance();
+ static DrillbitEndpoint* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class DrillServiceInstance : public ::google::protobuf::Message {
+ public:
+ DrillServiceInstance();
+ virtual ~DrillServiceInstance();
+
+ DrillServiceInstance(const DrillServiceInstance& from);
+
+ inline DrillServiceInstance& operator=(const DrillServiceInstance& 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 DrillServiceInstance& default_instance();
+
+ void Swap(DrillServiceInstance* other);
+
+ // implements Message ----------------------------------------------
+
+ DrillServiceInstance* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const DrillServiceInstance& from);
+ void MergeFrom(const DrillServiceInstance& 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 string id = 1;
+ inline bool has_id() const;
+ inline void clear_id();
+ static const int kIdFieldNumber = 1;
+ inline const ::std::string& id() const;
+ inline void set_id(const ::std::string& value);
+ inline void set_id(const char* value);
+ inline void set_id(const char* value, size_t size);
+ inline ::std::string* mutable_id();
+ inline ::std::string* release_id();
+ inline void set_allocated_id(::std::string* id);
+
+ // optional int64 registrationTimeUTC = 2;
+ inline bool has_registrationtimeutc() const;
+ inline void clear_registrationtimeutc();
+ static const int kRegistrationTimeUTCFieldNumber = 2;
+ inline ::google::protobuf::int64 registrationtimeutc() const;
+ inline void set_registrationtimeutc(::google::protobuf::int64 value);
+
+ // optional .exec.DrillbitEndpoint endpoint = 3;
+ inline bool has_endpoint() const;
+ inline void clear_endpoint();
+ static const int kEndpointFieldNumber = 3;
+ inline const ::exec::DrillbitEndpoint& endpoint() const;
+ inline ::exec::DrillbitEndpoint* mutable_endpoint();
+ inline ::exec::DrillbitEndpoint* release_endpoint();
+ inline void set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint);
+
+ // @@protoc_insertion_point(class_scope:exec.DrillServiceInstance)
+ private:
+ inline void set_has_id();
+ inline void clear_has_id();
+ inline void set_has_registrationtimeutc();
+ inline void clear_has_registrationtimeutc();
+ inline void set_has_endpoint();
+ inline void clear_has_endpoint();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::std::string* id_;
+ ::google::protobuf::int64 registrationtimeutc_;
+ ::exec::DrillbitEndpoint* endpoint_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_Coordination_2eproto();
+ friend void protobuf_AssignDesc_Coordination_2eproto();
+ friend void protobuf_ShutdownFile_Coordination_2eproto();
+
+ void InitAsDefaultInstance();
+ static DrillServiceInstance* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class Roles : public ::google::protobuf::Message {
+ public:
+ Roles();
+ virtual ~Roles();
+
+ Roles(const Roles& from);
+
+ inline Roles& operator=(const Roles& 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 Roles& default_instance();
+
+ void Swap(Roles* other);
+
+ // implements Message ----------------------------------------------
+
+ Roles* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Roles& from);
+ void MergeFrom(const Roles& 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 bool sql_query = 1 [default = true];
+ inline bool has_sql_query() const;
+ inline void clear_sql_query();
+ static const int kSqlQueryFieldNumber = 1;
+ inline bool sql_query() const;
+ inline void set_sql_query(bool value);
+
+ // optional bool logical_plan = 2 [default = true];
+ inline bool has_logical_plan() const;
+ inline void clear_logical_plan();
+ static const int kLogicalPlanFieldNumber = 2;
+ inline bool logical_plan() const;
+ inline void set_logical_plan(bool value);
+
+ // optional bool physical_plan = 3 [default = true];
+ inline bool has_physical_plan() const;
+ inline void clear_physical_plan();
+ static const int kPhysicalPlanFieldNumber = 3;
+ inline bool physical_plan() const;
+ inline void set_physical_plan(bool value);
+
+ // optional bool java_executor = 4 [default = true];
+ inline bool has_java_executor() const;
+ inline void clear_java_executor();
+ static const int kJavaExecutorFieldNumber = 4;
+ inline bool java_executor() const;
+ inline void set_java_executor(bool value);
+
+ // optional bool distributed_cache = 5 [default = true];
+ inline bool has_distributed_cache() const;
+ inline void clear_distributed_cache();
+ static const int kDistributedCacheFieldNumber = 5;
+ inline bool distributed_cache() const;
+ inline void set_distributed_cache(bool value);
+
+ // @@protoc_insertion_point(class_scope:exec.Roles)
+ private:
+ inline void set_has_sql_query();
+ inline void clear_has_sql_query();
+ inline void set_has_logical_plan();
+ inline void clear_has_logical_plan();
+ inline void set_has_physical_plan();
+ inline void clear_has_physical_plan();
+ inline void set_has_java_executor();
+ inline void clear_has_java_executor();
+ inline void set_has_distributed_cache();
+ inline void clear_has_distributed_cache();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ bool sql_query_;
+ bool logical_plan_;
+ bool physical_plan_;
+ bool java_executor_;
+ bool distributed_cache_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
+
+ friend void protobuf_AddDesc_Coordination_2eproto();
+ friend void protobuf_AssignDesc_Coordination_2eproto();
+ friend void protobuf_ShutdownFile_Coordination_2eproto();
+
+ void InitAsDefaultInstance();
+ static Roles* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// DrillbitEndpoint
+
+// optional string address = 1;
+inline bool DrillbitEndpoint::has_address() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void DrillbitEndpoint::set_has_address() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void DrillbitEndpoint::clear_has_address() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void DrillbitEndpoint::clear_address() {
+ if (address_ != &::google::protobuf::internal::kEmptyString) {
+ address_->clear();
+ }
+ clear_has_address();
+}
+inline const ::std::string& DrillbitEndpoint::address() const {
+ return *address_;
+}
+inline void DrillbitEndpoint::set_address(const ::std::string& value) {
+ set_has_address();
+ if (address_ == &::google::protobuf::internal::kEmptyString) {
+ address_ = new ::std::string;
+ }
+ address_->assign(value);
+}
+inline void DrillbitEndpoint::set_address(const char* value) {
+ set_has_address();
+ if (address_ == &::google::protobuf::internal::kEmptyString) {
+ address_ = new ::std::string;
+ }
+ address_->assign(value);
+}
+inline void DrillbitEndpoint::set_address(const char* value, size_t size) {
+ set_has_address();
+ if (address_ == &::google::protobuf::internal::kEmptyString) {
+ address_ = new ::std::string;
+ }
+ address_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* DrillbitEndpoint::mutable_address() {
+ set_has_address();
+ if (address_ == &::google::protobuf::internal::kEmptyString) {
+ address_ = new ::std::string;
+ }
+ return address_;
+}
+inline ::std::string* DrillbitEndpoint::release_address() {
+ clear_has_address();
+ if (address_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = address_;
+ address_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void DrillbitEndpoint::set_allocated_address(::std::string* address) {
+ if (address_ != &::google::protobuf::internal::kEmptyString) {
+ delete address_;
+ }
+ if (address) {
+ set_has_address();
+ address_ = address;
+ } else {
+ clear_has_address();
+ address_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional int32 user_port = 2;
+inline bool DrillbitEndpoint::has_user_port() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void DrillbitEndpoint::set_has_user_port() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void DrillbitEndpoint::clear_has_user_port() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void DrillbitEndpoint::clear_user_port() {
+ user_port_ = 0;
+ clear_has_user_port();
+}
+inline ::google::protobuf::int32 DrillbitEndpoint::user_port() const {
+ return user_port_;
+}
+inline void DrillbitEndpoint::set_user_port(::google::protobuf::int32 value) {
+ set_has_user_port();
+ user_port_ = value;
+}
+
+// optional int32 control_port = 3;
+inline bool DrillbitEndpoint::has_control_port() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void DrillbitEndpoint::set_has_control_port() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void DrillbitEndpoint::clear_has_control_port() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void DrillbitEndpoint::clear_control_port() {
+ control_port_ = 0;
+ clear_has_control_port();
+}
+inline ::google::protobuf::int32 DrillbitEndpoint::control_port() const {
+ return control_port_;
+}
+inline void DrillbitEndpoint::set_control_port(::google::protobuf::int32 value) {
+ set_has_control_port();
+ control_port_ = value;
+}
+
+// optional int32 data_port = 4;
+inline bool DrillbitEndpoint::has_data_port() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void DrillbitEndpoint::set_has_data_port() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void DrillbitEndpoint::clear_has_data_port() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void DrillbitEndpoint::clear_data_port() {
+ data_port_ = 0;
+ clear_has_data_port();
+}
+inline ::google::protobuf::int32 DrillbitEndpoint::data_port() const {
+ return data_port_;
+}
+inline void DrillbitEndpoint::set_data_port(::google::protobuf::int32 value) {
+ set_has_data_port();
+ data_port_ = value;
+}
+
+// optional .exec.Roles roles = 5;
+inline bool DrillbitEndpoint::has_roles() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void DrillbitEndpoint::set_has_roles() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void DrillbitEndpoint::clear_has_roles() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void DrillbitEndpoint::clear_roles() {
+ if (roles_ != NULL) roles_->::exec::Roles::Clear();
+ clear_has_roles();
+}
+inline const ::exec::Roles& DrillbitEndpoint::roles() const {
+ return roles_ != NULL ? *roles_ : *default_instance_->roles_;
+}
+inline ::exec::Roles* DrillbitEndpoint::mutable_roles() {
+ set_has_roles();
+ if (roles_ == NULL) roles_ = new ::exec::Roles;
+ return roles_;
+}
+inline ::exec::Roles* DrillbitEndpoint::release_roles() {
+ clear_has_roles();
+ ::exec::Roles* temp = roles_;
+ roles_ = NULL;
+ return temp;
+}
+inline void DrillbitEndpoint::set_allocated_roles(::exec::Roles* roles) {
+ delete roles_;
+ roles_ = roles;
+ if (roles) {
+ set_has_roles();
+ } else {
+ clear_has_roles();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// DrillServiceInstance
+
+// optional string id = 1;
+inline bool DrillServiceInstance::has_id() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void DrillServiceInstance::set_has_id() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void DrillServiceInstance::clear_has_id() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void DrillServiceInstance::clear_id() {
+ if (id_ != &::google::protobuf::internal::kEmptyString) {
+ id_->clear();
+ }
+ clear_has_id();
+}
+inline const ::std::string& DrillServiceInstance::id() const {
+ return *id_;
+}
+inline void DrillServiceInstance::set_id(const ::std::string& value) {
+ set_has_id();
+ if (id_ == &::google::protobuf::internal::kEmptyString) {
+ id_ = new ::std::string;
+ }
+ id_->assign(value);
+}
+inline void DrillServiceInstance::set_id(const char* value) {
+ set_has_id();
+ if (id_ == &::google::protobuf::internal::kEmptyString) {
+ id_ = new ::std::string;
+ }
+ id_->assign(value);
+}
+inline void DrillServiceInstance::set_id(const char* value, size_t size) {
+ set_has_id();
+ if (id_ == &::google::protobuf::internal::kEmptyString) {
+ id_ = new ::std::string;
+ }
+ id_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* DrillServiceInstance::mutable_id() {
+ set_has_id();
+ if (id_ == &::google::protobuf::internal::kEmptyString) {
+ id_ = new ::std::string;
+ }
+ return id_;
+}
+inline ::std::string* DrillServiceInstance::release_id() {
+ clear_has_id();
+ if (id_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = id_;
+ id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void DrillServiceInstance::set_allocated_id(::std::string* id) {
+ if (id_ != &::google::protobuf::internal::kEmptyString) {
+ delete id_;
+ }
+ if (id) {
+ set_has_id();
+ id_ = id;
+ } else {
+ clear_has_id();
+ id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional int64 registrationTimeUTC = 2;
+inline bool DrillServiceInstance::has_registrationtimeutc() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void DrillServiceInstance::set_has_registrationtimeutc() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void DrillServiceInstance::clear_has_registrationtimeutc() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void DrillServiceInstance::clear_registrationtimeutc() {
+ registrationtimeutc_ = GOOGLE_LONGLONG(0);
+ clear_has_registrationtimeutc();
+}
+inline ::google::protobuf::int64 DrillServiceInstance::registrationtimeutc() const {
+ return registrationtimeutc_;
+}
+inline void DrillServiceInstance::set_registrationtimeutc(::google::protobuf::int64 value) {
+ set_has_registrationtimeutc();
+ registrationtimeutc_ = value;
+}
+
+// optional .exec.DrillbitEndpoint endpoint = 3;
+inline bool DrillServiceInstance::has_endpoint() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void DrillServiceInstance::set_has_endpoint() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void DrillServiceInstance::clear_has_endpoint() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void DrillServiceInstance::clear_endpoint() {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ clear_has_endpoint();
+}
+inline const ::exec::DrillbitEndpoint& DrillServiceInstance::endpoint() const {
+ return endpoint_ != NULL ? *endpoint_ : *default_instance_->endpoint_;
+}
+inline ::exec::DrillbitEndpoint* DrillServiceInstance::mutable_endpoint() {
+ set_has_endpoint();
+ if (endpoint_ == NULL) endpoint_ = new ::exec::DrillbitEndpoint;
+ return endpoint_;
+}
+inline ::exec::DrillbitEndpoint* DrillServiceInstance::release_endpoint() {
+ clear_has_endpoint();
+ ::exec::DrillbitEndpoint* temp = endpoint_;
+ endpoint_ = NULL;
+ return temp;
+}
+inline void DrillServiceInstance::set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint) {
+ delete endpoint_;
+ endpoint_ = endpoint;
+ if (endpoint) {
+ set_has_endpoint();
+ } else {
+ clear_has_endpoint();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// Roles
+
+// optional bool sql_query = 1 [default = true];
+inline bool Roles::has_sql_query() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Roles::set_has_sql_query() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void Roles::clear_has_sql_query() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void Roles::clear_sql_query() {
+ sql_query_ = true;
+ clear_has_sql_query();
+}
+inline bool Roles::sql_query() const {
+ return sql_query_;
+}
+inline void Roles::set_sql_query(bool value) {
+ set_has_sql_query();
+ sql_query_ = value;
+}
+
+// optional bool logical_plan = 2 [default = true];
+inline bool Roles::has_logical_plan() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Roles::set_has_logical_plan() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void Roles::clear_has_logical_plan() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void Roles::clear_logical_plan() {
+ logical_plan_ = true;
+ clear_has_logical_plan();
+}
+inline bool Roles::logical_plan() const {
+ return logical_plan_;
+}
+inline void Roles::set_logical_plan(bool value) {
+ set_has_logical_plan();
+ logical_plan_ = value;
+}
+
+// optional bool physical_plan = 3 [default = true];
+inline bool Roles::has_physical_plan() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void Roles::set_has_physical_plan() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void Roles::clear_has_physical_plan() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void Roles::clear_physical_plan() {
+ physical_plan_ = true;
+ clear_has_physical_plan();
+}
+inline bool Roles::physical_plan() const {
+ return physical_plan_;
+}
+inline void Roles::set_physical_plan(bool value) {
+ set_has_physical_plan();
+ physical_plan_ = value;
+}
+
+// optional bool java_executor = 4 [default = true];
+inline bool Roles::has_java_executor() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void Roles::set_has_java_executor() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void Roles::clear_has_java_executor() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void Roles::clear_java_executor() {
+ java_executor_ = true;
+ clear_has_java_executor();
+}
+inline bool Roles::java_executor() const {
+ return java_executor_;
+}
+inline void Roles::set_java_executor(bool value) {
+ set_has_java_executor();
+ java_executor_ = value;
+}
+
+// optional bool distributed_cache = 5 [default = true];
+inline bool Roles::has_distributed_cache() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void Roles::set_has_distributed_cache() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void Roles::clear_has_distributed_cache() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void Roles::clear_distributed_cache() {
+ distributed_cache_ = true;
+ clear_has_distributed_cache();
+}
+inline bool Roles::distributed_cache() const {
+ return distributed_cache_;
+}
+inline void Roles::set_distributed_cache(bool value) {
+ set_has_distributed_cache();
+ distributed_cache_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_Coordination_2eproto__INCLUDED
diff --git a/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc b/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc
new file mode 100644
index 000000000..a36bd9faf
--- /dev/null
+++ b/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc
@@ -0,0 +1,404 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: ExecutionProtos.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "ExecutionProtos.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace bit {
+
+namespace {
+
+const ::google::protobuf::Descriptor* FragmentHandle_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ FragmentHandle_reflection_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_ExecutionProtos_2eproto() {
+ protobuf_AddDesc_ExecutionProtos_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "ExecutionProtos.proto");
+ GOOGLE_CHECK(file != NULL);
+ FragmentHandle_descriptor_ = file->message_type(0);
+ static const int FragmentHandle_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, query_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, major_fragment_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, minor_fragment_id_),
+ };
+ FragmentHandle_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ FragmentHandle_descriptor_,
+ FragmentHandle::default_instance_,
+ FragmentHandle_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(FragmentHandle));
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_ExecutionProtos_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ FragmentHandle_descriptor_, &FragmentHandle::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_ExecutionProtos_2eproto() {
+ delete FragmentHandle::default_instance_;
+ delete FragmentHandle_reflection_;
+}
+
+void protobuf_AddDesc_ExecutionProtos_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::exec::protobuf_AddDesc_Coordination_2eproto();
+ ::exec::shared::protobuf_AddDesc_UserBitShared_2eproto();
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\025ExecutionProtos.proto\022\010exec.bit\032\022Coord"
+ "ination.proto\032\023UserBitShared.proto\"n\n\016Fr"
+ "agmentHandle\022&\n\010query_id\030\001 \001(\0132\024.exec.sh"
+ "ared.QueryId\022\031\n\021major_fragment_id\030\002 \001(\005\022"
+ "\031\n\021minor_fragment_id\030\003 \001(\005B+\n\033org.apache"
+ ".drill.exec.protoB\nExecProtosH\001", 231);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "ExecutionProtos.proto", &protobuf_RegisterTypes);
+ FragmentHandle::default_instance_ = new FragmentHandle();
+ FragmentHandle::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_ExecutionProtos_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_ExecutionProtos_2eproto {
+ StaticDescriptorInitializer_ExecutionProtos_2eproto() {
+ protobuf_AddDesc_ExecutionProtos_2eproto();
+ }
+} static_descriptor_initializer_ExecutionProtos_2eproto_;
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int FragmentHandle::kQueryIdFieldNumber;
+const int FragmentHandle::kMajorFragmentIdFieldNumber;
+const int FragmentHandle::kMinorFragmentIdFieldNumber;
+#endif // !_MSC_VER
+
+FragmentHandle::FragmentHandle()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void FragmentHandle::InitAsDefaultInstance() {
+ query_id_ = const_cast< ::exec::shared::QueryId*>(&::exec::shared::QueryId::default_instance());
+}
+
+FragmentHandle::FragmentHandle(const FragmentHandle& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void FragmentHandle::SharedCtor() {
+ _cached_size_ = 0;
+ query_id_ = NULL;
+ major_fragment_id_ = 0;
+ minor_fragment_id_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+FragmentHandle::~FragmentHandle() {
+ SharedDtor();
+}
+
+void FragmentHandle::SharedDtor() {
+ if (this != default_instance_) {
+ delete query_id_;
+ }
+}
+
+void FragmentHandle::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* FragmentHandle::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return FragmentHandle_descriptor_;
+}
+
+const FragmentHandle& FragmentHandle::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_ExecutionProtos_2eproto();
+ return *default_instance_;
+}
+
+FragmentHandle* FragmentHandle::default_instance_ = NULL;
+
+FragmentHandle* FragmentHandle::New() const {
+ return new FragmentHandle;
+}
+
+void FragmentHandle::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_query_id()) {
+ if (query_id_ != NULL) query_id_->::exec::shared::QueryId::Clear();
+ }
+ major_fragment_id_ = 0;
+ minor_fragment_id_ = 0;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool FragmentHandle::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 .exec.shared.QueryId query_id = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_query_id()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_major_fragment_id;
+ break;
+ }
+
+ // optional int32 major_fragment_id = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_major_fragment_id:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &major_fragment_id_)));
+ set_has_major_fragment_id();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_minor_fragment_id;
+ break;
+ }
+
+ // optional int32 minor_fragment_id = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_minor_fragment_id:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &minor_fragment_id_)));
+ set_has_minor_fragment_id();
+ } 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 FragmentHandle::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.shared.QueryId query_id = 1;
+ if (has_query_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->query_id(), output);
+ }
+
+ // optional int32 major_fragment_id = 2;
+ if (has_major_fragment_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->major_fragment_id(), output);
+ }
+
+ // optional int32 minor_fragment_id = 3;
+ if (has_minor_fragment_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->minor_fragment_id(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* FragmentHandle::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.shared.QueryId query_id = 1;
+ if (has_query_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->query_id(), target);
+ }
+
+ // optional int32 major_fragment_id = 2;
+ if (has_major_fragment_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->major_fragment_id(), target);
+ }
+
+ // optional int32 minor_fragment_id = 3;
+ if (has_minor_fragment_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->minor_fragment_id(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int FragmentHandle::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.shared.QueryId query_id = 1;
+ if (has_query_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->query_id());
+ }
+
+ // optional int32 major_fragment_id = 2;
+ if (has_major_fragment_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->major_fragment_id());
+ }
+
+ // optional int32 minor_fragment_id = 3;
+ if (has_minor_fragment_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->minor_fragment_id());
+ }
+
+ }
+ 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 FragmentHandle::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const FragmentHandle* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const FragmentHandle*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void FragmentHandle::MergeFrom(const FragmentHandle& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_query_id()) {
+ mutable_query_id()->::exec::shared::QueryId::MergeFrom(from.query_id());
+ }
+ if (from.has_major_fragment_id()) {
+ set_major_fragment_id(from.major_fragment_id());
+ }
+ if (from.has_minor_fragment_id()) {
+ set_minor_fragment_id(from.minor_fragment_id());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void FragmentHandle::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void FragmentHandle::CopyFrom(const FragmentHandle& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool FragmentHandle::IsInitialized() const {
+
+ return true;
+}
+
+void FragmentHandle::Swap(FragmentHandle* other) {
+ if (other != this) {
+ std::swap(query_id_, other->query_id_);
+ std::swap(major_fragment_id_, other->major_fragment_id_);
+ std::swap(minor_fragment_id_, other->minor_fragment_id_);
+ 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 FragmentHandle::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = FragmentHandle_descriptor_;
+ metadata.reflection = FragmentHandle_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace bit
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/ExecutionProtos.pb.h b/contrib/native/client/src/protobuf/ExecutionProtos.pb.h
new file mode 100644
index 000000000..a602c1f9b
--- /dev/null
+++ b/contrib/native/client/src/protobuf/ExecutionProtos.pb.h
@@ -0,0 +1,251 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: ExecutionProtos.proto
+
+#ifndef PROTOBUF_ExecutionProtos_2eproto__INCLUDED
+#define PROTOBUF_ExecutionProtos_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "Coordination.pb.h"
+#include "UserBitShared.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace bit {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_ExecutionProtos_2eproto();
+void protobuf_AssignDesc_ExecutionProtos_2eproto();
+void protobuf_ShutdownFile_ExecutionProtos_2eproto();
+
+class FragmentHandle;
+
+// ===================================================================
+
+class FragmentHandle : public ::google::protobuf::Message {
+ public:
+ FragmentHandle();
+ virtual ~FragmentHandle();
+
+ FragmentHandle(const FragmentHandle& from);
+
+ inline FragmentHandle& operator=(const FragmentHandle& 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 FragmentHandle& default_instance();
+
+ void Swap(FragmentHandle* other);
+
+ // implements Message ----------------------------------------------
+
+ FragmentHandle* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const FragmentHandle& from);
+ void MergeFrom(const FragmentHandle& 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 .exec.shared.QueryId query_id = 1;
+ inline bool has_query_id() const;
+ inline void clear_query_id();
+ static const int kQueryIdFieldNumber = 1;
+ inline const ::exec::shared::QueryId& query_id() const;
+ inline ::exec::shared::QueryId* mutable_query_id();
+ inline ::exec::shared::QueryId* release_query_id();
+ inline void set_allocated_query_id(::exec::shared::QueryId* query_id);
+
+ // optional int32 major_fragment_id = 2;
+ inline bool has_major_fragment_id() const;
+ inline void clear_major_fragment_id();
+ static const int kMajorFragmentIdFieldNumber = 2;
+ inline ::google::protobuf::int32 major_fragment_id() const;
+ inline void set_major_fragment_id(::google::protobuf::int32 value);
+
+ // optional int32 minor_fragment_id = 3;
+ inline bool has_minor_fragment_id() const;
+ inline void clear_minor_fragment_id();
+ static const int kMinorFragmentIdFieldNumber = 3;
+ inline ::google::protobuf::int32 minor_fragment_id() const;
+ inline void set_minor_fragment_id(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.FragmentHandle)
+ private:
+ inline void set_has_query_id();
+ inline void clear_has_query_id();
+ inline void set_has_major_fragment_id();
+ inline void clear_has_major_fragment_id();
+ inline void set_has_minor_fragment_id();
+ inline void clear_has_minor_fragment_id();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::exec::shared::QueryId* query_id_;
+ ::google::protobuf::int32 major_fragment_id_;
+ ::google::protobuf::int32 minor_fragment_id_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_ExecutionProtos_2eproto();
+ friend void protobuf_AssignDesc_ExecutionProtos_2eproto();
+ friend void protobuf_ShutdownFile_ExecutionProtos_2eproto();
+
+ void InitAsDefaultInstance();
+ static FragmentHandle* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// FragmentHandle
+
+// optional .exec.shared.QueryId query_id = 1;
+inline bool FragmentHandle::has_query_id() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void FragmentHandle::set_has_query_id() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void FragmentHandle::clear_has_query_id() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void FragmentHandle::clear_query_id() {
+ if (query_id_ != NULL) query_id_->::exec::shared::QueryId::Clear();
+ clear_has_query_id();
+}
+inline const ::exec::shared::QueryId& FragmentHandle::query_id() const {
+ return query_id_ != NULL ? *query_id_ : *default_instance_->query_id_;
+}
+inline ::exec::shared::QueryId* FragmentHandle::mutable_query_id() {
+ set_has_query_id();
+ if (query_id_ == NULL) query_id_ = new ::exec::shared::QueryId;
+ return query_id_;
+}
+inline ::exec::shared::QueryId* FragmentHandle::release_query_id() {
+ clear_has_query_id();
+ ::exec::shared::QueryId* temp = query_id_;
+ query_id_ = NULL;
+ return temp;
+}
+inline void FragmentHandle::set_allocated_query_id(::exec::shared::QueryId* query_id) {
+ delete query_id_;
+ query_id_ = query_id;
+ if (query_id) {
+ set_has_query_id();
+ } else {
+ clear_has_query_id();
+ }
+}
+
+// optional int32 major_fragment_id = 2;
+inline bool FragmentHandle::has_major_fragment_id() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void FragmentHandle::set_has_major_fragment_id() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void FragmentHandle::clear_has_major_fragment_id() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void FragmentHandle::clear_major_fragment_id() {
+ major_fragment_id_ = 0;
+ clear_has_major_fragment_id();
+}
+inline ::google::protobuf::int32 FragmentHandle::major_fragment_id() const {
+ return major_fragment_id_;
+}
+inline void FragmentHandle::set_major_fragment_id(::google::protobuf::int32 value) {
+ set_has_major_fragment_id();
+ major_fragment_id_ = value;
+}
+
+// optional int32 minor_fragment_id = 3;
+inline bool FragmentHandle::has_minor_fragment_id() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void FragmentHandle::set_has_minor_fragment_id() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void FragmentHandle::clear_has_minor_fragment_id() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void FragmentHandle::clear_minor_fragment_id() {
+ minor_fragment_id_ = 0;
+ clear_has_minor_fragment_id();
+}
+inline ::google::protobuf::int32 FragmentHandle::minor_fragment_id() const {
+ return minor_fragment_id_;
+}
+inline void FragmentHandle::set_minor_fragment_id(::google::protobuf::int32 value) {
+ set_has_minor_fragment_id();
+ minor_fragment_id_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace bit
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_ExecutionProtos_2eproto__INCLUDED
diff --git a/contrib/native/client/src/protobuf/GeneralRPC.pb.cc b/contrib/native/client/src/protobuf/GeneralRPC.pb.cc
new file mode 100644
index 000000000..68929cc20
--- /dev/null
+++ b/contrib/native/client/src/protobuf/GeneralRPC.pb.cc
@@ -0,0 +1,1381 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: GeneralRPC.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "GeneralRPC.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace rpc {
+
+namespace {
+
+const ::google::protobuf::Descriptor* Ack_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ Ack_reflection_ = NULL;
+const ::google::protobuf::Descriptor* RpcHeader_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ RpcHeader_reflection_ = NULL;
+const ::google::protobuf::Descriptor* CompleteRpcMessage_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ CompleteRpcMessage_reflection_ = NULL;
+const ::google::protobuf::Descriptor* RpcFailure_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ RpcFailure_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* RpcMode_descriptor_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_GeneralRPC_2eproto() {
+ protobuf_AddDesc_GeneralRPC_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "GeneralRPC.proto");
+ GOOGLE_CHECK(file != NULL);
+ Ack_descriptor_ = file->message_type(0);
+ static const int Ack_offsets_[1] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ack, ok_),
+ };
+ Ack_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ Ack_descriptor_,
+ Ack::default_instance_,
+ Ack_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ack, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ack, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(Ack));
+ RpcHeader_descriptor_ = file->message_type(1);
+ static const int RpcHeader_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcHeader, mode_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcHeader, coordination_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcHeader, rpc_type_),
+ };
+ RpcHeader_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ RpcHeader_descriptor_,
+ RpcHeader::default_instance_,
+ RpcHeader_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcHeader, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcHeader, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(RpcHeader));
+ CompleteRpcMessage_descriptor_ = file->message_type(2);
+ static const int CompleteRpcMessage_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CompleteRpcMessage, header_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CompleteRpcMessage, protobuf_body_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CompleteRpcMessage, raw_body_),
+ };
+ CompleteRpcMessage_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ CompleteRpcMessage_descriptor_,
+ CompleteRpcMessage::default_instance_,
+ CompleteRpcMessage_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CompleteRpcMessage, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CompleteRpcMessage, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(CompleteRpcMessage));
+ RpcFailure_descriptor_ = file->message_type(3);
+ static const int RpcFailure_offsets_[4] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, error_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, error_code_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, short_error_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, long_error_),
+ };
+ RpcFailure_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ RpcFailure_descriptor_,
+ RpcFailure::default_instance_,
+ RpcFailure_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(RpcFailure));
+ RpcMode_descriptor_ = file->enum_type(0);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_GeneralRPC_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ Ack_descriptor_, &Ack::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ RpcHeader_descriptor_, &RpcHeader::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ CompleteRpcMessage_descriptor_, &CompleteRpcMessage::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ RpcFailure_descriptor_, &RpcFailure::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_GeneralRPC_2eproto() {
+ delete Ack::default_instance_;
+ delete Ack_reflection_;
+ delete RpcHeader::default_instance_;
+ delete RpcHeader_reflection_;
+ delete CompleteRpcMessage::default_instance_;
+ delete CompleteRpcMessage_reflection_;
+ delete RpcFailure::default_instance_;
+ delete RpcFailure_reflection_;
+}
+
+void protobuf_AddDesc_GeneralRPC_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::exec::protobuf_AddDesc_Coordination_2eproto();
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\020GeneralRPC.proto\022\010exec.rpc\032\022Coordinati"
+ "on.proto\"\021\n\003Ack\022\n\n\002ok\030\001 \001(\010\"W\n\tRpcHeader"
+ "\022\037\n\004mode\030\001 \001(\0162\021.exec.rpc.RpcMode\022\027\n\017coo"
+ "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\nRpcFailure\022\020\n\010error_"
+ "id\030\001 \001(\003\022\022\n\nerror_code\030\002 \001(\005\022\023\n\013short_er"
+ "ror\030\003 \001(\t\022\022\n\nlong_error\030\004 \001(\t*:\n\007RpcMode"
+ "\022\013\n\007REQUEST\020\000\022\014\n\010RESPONSE\020\001\022\024\n\020RESPONSE_"
+ "FAILURE\020\002B1\n\033org.apache.drill.exec.proto"
+ "B\020GeneralRPCProtosH\001", 460);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "GeneralRPC.proto", &protobuf_RegisterTypes);
+ Ack::default_instance_ = new Ack();
+ RpcHeader::default_instance_ = new RpcHeader();
+ CompleteRpcMessage::default_instance_ = new CompleteRpcMessage();
+ RpcFailure::default_instance_ = new RpcFailure();
+ Ack::default_instance_->InitAsDefaultInstance();
+ RpcHeader::default_instance_->InitAsDefaultInstance();
+ CompleteRpcMessage::default_instance_->InitAsDefaultInstance();
+ RpcFailure::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_GeneralRPC_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_GeneralRPC_2eproto {
+ StaticDescriptorInitializer_GeneralRPC_2eproto() {
+ protobuf_AddDesc_GeneralRPC_2eproto();
+ }
+} static_descriptor_initializer_GeneralRPC_2eproto_;
+const ::google::protobuf::EnumDescriptor* RpcMode_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RpcMode_descriptor_;
+}
+bool RpcMode_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int Ack::kOkFieldNumber;
+#endif // !_MSC_VER
+
+Ack::Ack()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void Ack::InitAsDefaultInstance() {
+}
+
+Ack::Ack(const Ack& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void Ack::SharedCtor() {
+ _cached_size_ = 0;
+ ok_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+Ack::~Ack() {
+ SharedDtor();
+}
+
+void Ack::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void Ack::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* Ack::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return Ack_descriptor_;
+}
+
+const Ack& Ack::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_GeneralRPC_2eproto();
+ return *default_instance_;
+}
+
+Ack* Ack::default_instance_ = NULL;
+
+Ack* Ack::New() const {
+ return new Ack;
+}
+
+void Ack::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ ok_ = false;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool Ack::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 bool ok = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &ok_)));
+ set_has_ok();
+ } 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 Ack::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional bool ok = 1;
+ if (has_ok()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->ok(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* Ack::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional bool ok = 1;
+ if (has_ok()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->ok(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int Ack::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional bool ok = 1;
+ if (has_ok()) {
+ total_size += 1 + 1;
+ }
+
+ }
+ 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 Ack::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const Ack* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const Ack*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void Ack::MergeFrom(const Ack& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_ok()) {
+ set_ok(from.ok());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void Ack::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void Ack::CopyFrom(const Ack& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool Ack::IsInitialized() const {
+
+ return true;
+}
+
+void Ack::Swap(Ack* other) {
+ if (other != this) {
+ std::swap(ok_, other->ok_);
+ 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 Ack::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = Ack_descriptor_;
+ metadata.reflection = Ack_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int RpcHeader::kModeFieldNumber;
+const int RpcHeader::kCoordinationIdFieldNumber;
+const int RpcHeader::kRpcTypeFieldNumber;
+#endif // !_MSC_VER
+
+RpcHeader::RpcHeader()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void RpcHeader::InitAsDefaultInstance() {
+}
+
+RpcHeader::RpcHeader(const RpcHeader& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void RpcHeader::SharedCtor() {
+ _cached_size_ = 0;
+ mode_ = 0;
+ coordination_id_ = 0;
+ rpc_type_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+RpcHeader::~RpcHeader() {
+ SharedDtor();
+}
+
+void RpcHeader::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void RpcHeader::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* RpcHeader::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RpcHeader_descriptor_;
+}
+
+const RpcHeader& RpcHeader::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_GeneralRPC_2eproto();
+ return *default_instance_;
+}
+
+RpcHeader* RpcHeader::default_instance_ = NULL;
+
+RpcHeader* RpcHeader::New() const {
+ return new RpcHeader;
+}
+
+void RpcHeader::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ mode_ = 0;
+ coordination_id_ = 0;
+ rpc_type_ = 0;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool RpcHeader::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 .exec.rpc.RpcMode mode = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::rpc::RpcMode_IsValid(value)) {
+ set_mode(static_cast< ::exec::rpc::RpcMode >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(1, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_coordination_id;
+ break;
+ }
+
+ // optional int32 coordination_id = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_coordination_id:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &coordination_id_)));
+ set_has_coordination_id();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_rpc_type;
+ break;
+ }
+
+ // optional int32 rpc_type = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_rpc_type:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &rpc_type_)));
+ set_has_rpc_type();
+ } 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 RpcHeader::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.rpc.RpcMode mode = 1;
+ if (has_mode()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 1, this->mode(), output);
+ }
+
+ // optional int32 coordination_id = 2;
+ if (has_coordination_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->coordination_id(), output);
+ }
+
+ // optional int32 rpc_type = 3;
+ if (has_rpc_type()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->rpc_type(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* RpcHeader::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.rpc.RpcMode mode = 1;
+ if (has_mode()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 1, this->mode(), target);
+ }
+
+ // optional int32 coordination_id = 2;
+ if (has_coordination_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->coordination_id(), target);
+ }
+
+ // optional int32 rpc_type = 3;
+ if (has_rpc_type()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->rpc_type(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int RpcHeader::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.rpc.RpcMode mode = 1;
+ if (has_mode()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->mode());
+ }
+
+ // optional int32 coordination_id = 2;
+ if (has_coordination_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->coordination_id());
+ }
+
+ // optional int32 rpc_type = 3;
+ if (has_rpc_type()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->rpc_type());
+ }
+
+ }
+ 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 RpcHeader::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const RpcHeader* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const RpcHeader*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void RpcHeader::MergeFrom(const RpcHeader& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_mode()) {
+ set_mode(from.mode());
+ }
+ if (from.has_coordination_id()) {
+ set_coordination_id(from.coordination_id());
+ }
+ if (from.has_rpc_type()) {
+ set_rpc_type(from.rpc_type());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void RpcHeader::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void RpcHeader::CopyFrom(const RpcHeader& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool RpcHeader::IsInitialized() const {
+
+ return true;
+}
+
+void RpcHeader::Swap(RpcHeader* other) {
+ if (other != this) {
+ std::swap(mode_, other->mode_);
+ std::swap(coordination_id_, other->coordination_id_);
+ std::swap(rpc_type_, other->rpc_type_);
+ 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 RpcHeader::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = RpcHeader_descriptor_;
+ metadata.reflection = RpcHeader_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int CompleteRpcMessage::kHeaderFieldNumber;
+const int CompleteRpcMessage::kProtobufBodyFieldNumber;
+const int CompleteRpcMessage::kRawBodyFieldNumber;
+#endif // !_MSC_VER
+
+CompleteRpcMessage::CompleteRpcMessage()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void CompleteRpcMessage::InitAsDefaultInstance() {
+ header_ = const_cast< ::exec::rpc::RpcHeader*>(&::exec::rpc::RpcHeader::default_instance());
+}
+
+CompleteRpcMessage::CompleteRpcMessage(const CompleteRpcMessage& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void CompleteRpcMessage::SharedCtor() {
+ _cached_size_ = 0;
+ header_ = NULL;
+ protobuf_body_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ raw_body_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+CompleteRpcMessage::~CompleteRpcMessage() {
+ SharedDtor();
+}
+
+void CompleteRpcMessage::SharedDtor() {
+ if (protobuf_body_ != &::google::protobuf::internal::kEmptyString) {
+ delete protobuf_body_;
+ }
+ if (raw_body_ != &::google::protobuf::internal::kEmptyString) {
+ delete raw_body_;
+ }
+ if (this != default_instance_) {
+ delete header_;
+ }
+}
+
+void CompleteRpcMessage::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* CompleteRpcMessage::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return CompleteRpcMessage_descriptor_;
+}
+
+const CompleteRpcMessage& CompleteRpcMessage::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_GeneralRPC_2eproto();
+ return *default_instance_;
+}
+
+CompleteRpcMessage* CompleteRpcMessage::default_instance_ = NULL;
+
+CompleteRpcMessage* CompleteRpcMessage::New() const {
+ return new CompleteRpcMessage;
+}
+
+void CompleteRpcMessage::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_header()) {
+ if (header_ != NULL) header_->::exec::rpc::RpcHeader::Clear();
+ }
+ if (has_protobuf_body()) {
+ if (protobuf_body_ != &::google::protobuf::internal::kEmptyString) {
+ protobuf_body_->clear();
+ }
+ }
+ if (has_raw_body()) {
+ if (raw_body_ != &::google::protobuf::internal::kEmptyString) {
+ raw_body_->clear();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool CompleteRpcMessage::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 .exec.rpc.RpcHeader header = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_header()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(18)) goto parse_protobuf_body;
+ break;
+ }
+
+ // optional bytes protobuf_body = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_protobuf_body:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
+ input, this->mutable_protobuf_body()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_raw_body;
+ break;
+ }
+
+ // optional bytes raw_body = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_raw_body:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
+ input, this->mutable_raw_body()));
+ } 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 CompleteRpcMessage::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.rpc.RpcHeader header = 1;
+ if (has_header()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->header(), output);
+ }
+
+ // optional bytes protobuf_body = 2;
+ if (has_protobuf_body()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBytes(
+ 2, this->protobuf_body(), output);
+ }
+
+ // optional bytes raw_body = 3;
+ if (has_raw_body()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBytes(
+ 3, this->raw_body(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* CompleteRpcMessage::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.rpc.RpcHeader header = 1;
+ if (has_header()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->header(), target);
+ }
+
+ // optional bytes protobuf_body = 2;
+ if (has_protobuf_body()) {
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
+ 2, this->protobuf_body(), target);
+ }
+
+ // optional bytes raw_body = 3;
+ if (has_raw_body()) {
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
+ 3, this->raw_body(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int CompleteRpcMessage::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.rpc.RpcHeader header = 1;
+ if (has_header()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->header());
+ }
+
+ // optional bytes protobuf_body = 2;
+ if (has_protobuf_body()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::BytesSize(
+ this->protobuf_body());
+ }
+
+ // optional bytes raw_body = 3;
+ if (has_raw_body()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::BytesSize(
+ this->raw_body());
+ }
+
+ }
+ 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 CompleteRpcMessage::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const CompleteRpcMessage* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const CompleteRpcMessage*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void CompleteRpcMessage::MergeFrom(const CompleteRpcMessage& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_header()) {
+ mutable_header()->::exec::rpc::RpcHeader::MergeFrom(from.header());
+ }
+ if (from.has_protobuf_body()) {
+ set_protobuf_body(from.protobuf_body());
+ }
+ if (from.has_raw_body()) {
+ set_raw_body(from.raw_body());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void CompleteRpcMessage::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void CompleteRpcMessage::CopyFrom(const CompleteRpcMessage& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool CompleteRpcMessage::IsInitialized() const {
+
+ return true;
+}
+
+void CompleteRpcMessage::Swap(CompleteRpcMessage* other) {
+ if (other != this) {
+ std::swap(header_, other->header_);
+ std::swap(protobuf_body_, other->protobuf_body_);
+ std::swap(raw_body_, other->raw_body_);
+ 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 CompleteRpcMessage::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = CompleteRpcMessage_descriptor_;
+ metadata.reflection = CompleteRpcMessage_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int RpcFailure::kErrorIdFieldNumber;
+const int RpcFailure::kErrorCodeFieldNumber;
+const int RpcFailure::kShortErrorFieldNumber;
+const int RpcFailure::kLongErrorFieldNumber;
+#endif // !_MSC_VER
+
+RpcFailure::RpcFailure()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void RpcFailure::InitAsDefaultInstance() {
+}
+
+RpcFailure::RpcFailure(const RpcFailure& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void RpcFailure::SharedCtor() {
+ _cached_size_ = 0;
+ error_id_ = GOOGLE_LONGLONG(0);
+ error_code_ = 0;
+ short_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ long_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+RpcFailure::~RpcFailure() {
+ SharedDtor();
+}
+
+void RpcFailure::SharedDtor() {
+ if (short_error_ != &::google::protobuf::internal::kEmptyString) {
+ delete short_error_;
+ }
+ if (long_error_ != &::google::protobuf::internal::kEmptyString) {
+ delete long_error_;
+ }
+ if (this != default_instance_) {
+ }
+}
+
+void RpcFailure::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* RpcFailure::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RpcFailure_descriptor_;
+}
+
+const RpcFailure& RpcFailure::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_GeneralRPC_2eproto();
+ return *default_instance_;
+}
+
+RpcFailure* RpcFailure::default_instance_ = NULL;
+
+RpcFailure* RpcFailure::New() const {
+ return new RpcFailure;
+}
+
+void RpcFailure::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ error_id_ = GOOGLE_LONGLONG(0);
+ error_code_ = 0;
+ if (has_short_error()) {
+ if (short_error_ != &::google::protobuf::internal::kEmptyString) {
+ short_error_->clear();
+ }
+ }
+ if (has_long_error()) {
+ if (long_error_ != &::google::protobuf::internal::kEmptyString) {
+ long_error_->clear();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool RpcFailure::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 error_id = 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, &error_id_)));
+ set_has_error_id();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_error_code;
+ break;
+ }
+
+ // optional int32 error_code = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_error_code:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &error_code_)));
+ set_has_error_code();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_short_error;
+ break;
+ }
+
+ // optional string short_error = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_short_error:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_short_error()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->short_error().data(), this->short_error().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(34)) goto parse_long_error;
+ break;
+ }
+
+ // optional string long_error = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_long_error:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_long_error()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->long_error().data(), this->long_error().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 RpcFailure::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int64 error_id = 1;
+ if (has_error_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->error_id(), output);
+ }
+
+ // optional int32 error_code = 2;
+ if (has_error_code()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->error_code(), output);
+ }
+
+ // optional string short_error = 3;
+ if (has_short_error()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->short_error().data(), this->short_error().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 3, this->short_error(), output);
+ }
+
+ // optional string long_error = 4;
+ if (has_long_error()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->long_error().data(), this->long_error().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 4, this->long_error(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* RpcFailure::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int64 error_id = 1;
+ if (has_error_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->error_id(), target);
+ }
+
+ // optional int32 error_code = 2;
+ if (has_error_code()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->error_code(), target);
+ }
+
+ // optional string short_error = 3;
+ if (has_short_error()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->short_error().data(), this->short_error().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 3, this->short_error(), target);
+ }
+
+ // optional string long_error = 4;
+ if (has_long_error()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->long_error().data(), this->long_error().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 4, this->long_error(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int RpcFailure::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int64 error_id = 1;
+ if (has_error_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->error_id());
+ }
+
+ // optional int32 error_code = 2;
+ if (has_error_code()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->error_code());
+ }
+
+ // optional string short_error = 3;
+ if (has_short_error()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->short_error());
+ }
+
+ // optional string long_error = 4;
+ if (has_long_error()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->long_error());
+ }
+
+ }
+ 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 RpcFailure::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const RpcFailure* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const RpcFailure*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void RpcFailure::MergeFrom(const RpcFailure& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_error_id()) {
+ set_error_id(from.error_id());
+ }
+ if (from.has_error_code()) {
+ set_error_code(from.error_code());
+ }
+ if (from.has_short_error()) {
+ set_short_error(from.short_error());
+ }
+ if (from.has_long_error()) {
+ set_long_error(from.long_error());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void RpcFailure::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void RpcFailure::CopyFrom(const RpcFailure& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool RpcFailure::IsInitialized() const {
+
+ return true;
+}
+
+void RpcFailure::Swap(RpcFailure* other) {
+ if (other != this) {
+ std::swap(error_id_, other->error_id_);
+ std::swap(error_code_, other->error_code_);
+ std::swap(short_error_, other->short_error_);
+ std::swap(long_error_, other->long_error_);
+ 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 RpcFailure::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = RpcFailure_descriptor_;
+ metadata.reflection = RpcFailure_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace rpc
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/GeneralRPC.pb.h b/contrib/native/client/src/protobuf/GeneralRPC.pb.h
new file mode 100644
index 000000000..cfafd6543
--- /dev/null
+++ b/contrib/native/client/src/protobuf/GeneralRPC.pb.h
@@ -0,0 +1,975 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: GeneralRPC.proto
+
+#ifndef PROTOBUF_GeneralRPC_2eproto__INCLUDED
+#define PROTOBUF_GeneralRPC_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "Coordination.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace rpc {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_GeneralRPC_2eproto();
+void protobuf_AssignDesc_GeneralRPC_2eproto();
+void protobuf_ShutdownFile_GeneralRPC_2eproto();
+
+class Ack;
+class RpcHeader;
+class CompleteRpcMessage;
+class RpcFailure;
+
+enum RpcMode {
+ REQUEST = 0,
+ RESPONSE = 1,
+ RESPONSE_FAILURE = 2
+};
+bool RpcMode_IsValid(int value);
+const RpcMode RpcMode_MIN = REQUEST;
+const RpcMode RpcMode_MAX = RESPONSE_FAILURE;
+const int RpcMode_ARRAYSIZE = RpcMode_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* RpcMode_descriptor();
+inline const ::std::string& RpcMode_Name(RpcMode value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ RpcMode_descriptor(), value);
+}
+inline bool RpcMode_Parse(
+ const ::std::string& name, RpcMode* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<RpcMode>(
+ RpcMode_descriptor(), name, value);
+}
+// ===================================================================
+
+class Ack : public ::google::protobuf::Message {
+ public:
+ Ack();
+ virtual ~Ack();
+
+ Ack(const Ack& from);
+
+ inline Ack& operator=(const Ack& 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 Ack& default_instance();
+
+ void Swap(Ack* other);
+
+ // implements Message ----------------------------------------------
+
+ Ack* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Ack& from);
+ void MergeFrom(const Ack& 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 bool ok = 1;
+ inline bool has_ok() const;
+ inline void clear_ok();
+ static const int kOkFieldNumber = 1;
+ inline bool ok() const;
+ inline void set_ok(bool value);
+
+ // @@protoc_insertion_point(class_scope:exec.rpc.Ack)
+ private:
+ inline void set_has_ok();
+ inline void clear_has_ok();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ bool ok_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+ friend void protobuf_AddDesc_GeneralRPC_2eproto();
+ friend void protobuf_AssignDesc_GeneralRPC_2eproto();
+ friend void protobuf_ShutdownFile_GeneralRPC_2eproto();
+
+ void InitAsDefaultInstance();
+ static Ack* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class RpcHeader : public ::google::protobuf::Message {
+ public:
+ RpcHeader();
+ virtual ~RpcHeader();
+
+ RpcHeader(const RpcHeader& from);
+
+ inline RpcHeader& operator=(const RpcHeader& 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 RpcHeader& default_instance();
+
+ void Swap(RpcHeader* other);
+
+ // implements Message ----------------------------------------------
+
+ RpcHeader* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const RpcHeader& from);
+ void MergeFrom(const RpcHeader& 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 .exec.rpc.RpcMode mode = 1;
+ inline bool has_mode() const;
+ inline void clear_mode();
+ static const int kModeFieldNumber = 1;
+ inline ::exec::rpc::RpcMode mode() const;
+ inline void set_mode(::exec::rpc::RpcMode value);
+
+ // optional int32 coordination_id = 2;
+ inline bool has_coordination_id() const;
+ inline void clear_coordination_id();
+ static const int kCoordinationIdFieldNumber = 2;
+ inline ::google::protobuf::int32 coordination_id() const;
+ inline void set_coordination_id(::google::protobuf::int32 value);
+
+ // optional int32 rpc_type = 3;
+ inline bool has_rpc_type() const;
+ inline void clear_rpc_type();
+ static const int kRpcTypeFieldNumber = 3;
+ inline ::google::protobuf::int32 rpc_type() const;
+ inline void set_rpc_type(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:exec.rpc.RpcHeader)
+ private:
+ inline void set_has_mode();
+ inline void clear_has_mode();
+ inline void set_has_coordination_id();
+ inline void clear_has_coordination_id();
+ inline void set_has_rpc_type();
+ inline void clear_has_rpc_type();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ int mode_;
+ ::google::protobuf::int32 coordination_id_;
+ ::google::protobuf::int32 rpc_type_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_GeneralRPC_2eproto();
+ friend void protobuf_AssignDesc_GeneralRPC_2eproto();
+ friend void protobuf_ShutdownFile_GeneralRPC_2eproto();
+
+ void InitAsDefaultInstance();
+ static RpcHeader* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class CompleteRpcMessage : public ::google::protobuf::Message {
+ public:
+ CompleteRpcMessage();
+ virtual ~CompleteRpcMessage();
+
+ CompleteRpcMessage(const CompleteRpcMessage& from);
+
+ inline CompleteRpcMessage& operator=(const CompleteRpcMessage& 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 CompleteRpcMessage& default_instance();
+
+ void Swap(CompleteRpcMessage* other);
+
+ // implements Message ----------------------------------------------
+
+ CompleteRpcMessage* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const CompleteRpcMessage& from);
+ void MergeFrom(const CompleteRpcMessage& 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 .exec.rpc.RpcHeader header = 1;
+ inline bool has_header() const;
+ inline void clear_header();
+ static const int kHeaderFieldNumber = 1;
+ inline const ::exec::rpc::RpcHeader& header() const;
+ inline ::exec::rpc::RpcHeader* mutable_header();
+ inline ::exec::rpc::RpcHeader* release_header();
+ inline void set_allocated_header(::exec::rpc::RpcHeader* header);
+
+ // optional bytes protobuf_body = 2;
+ inline bool has_protobuf_body() const;
+ inline void clear_protobuf_body();
+ static const int kProtobufBodyFieldNumber = 2;
+ inline const ::std::string& protobuf_body() const;
+ inline void set_protobuf_body(const ::std::string& value);
+ inline void set_protobuf_body(const char* value);
+ inline void set_protobuf_body(const void* value, size_t size);
+ inline ::std::string* mutable_protobuf_body();
+ inline ::std::string* release_protobuf_body();
+ inline void set_allocated_protobuf_body(::std::string* protobuf_body);
+
+ // optional bytes raw_body = 3;
+ inline bool has_raw_body() const;
+ inline void clear_raw_body();
+ static const int kRawBodyFieldNumber = 3;
+ inline const ::std::string& raw_body() const;
+ inline void set_raw_body(const ::std::string& value);
+ inline void set_raw_body(const char* value);
+ inline void set_raw_body(const void* value, size_t size);
+ inline ::std::string* mutable_raw_body();
+ inline ::std::string* release_raw_body();
+ inline void set_allocated_raw_body(::std::string* raw_body);
+
+ // @@protoc_insertion_point(class_scope:exec.rpc.CompleteRpcMessage)
+ private:
+ inline void set_has_header();
+ inline void clear_has_header();
+ inline void set_has_protobuf_body();
+ inline void clear_has_protobuf_body();
+ inline void set_has_raw_body();
+ inline void clear_has_raw_body();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::exec::rpc::RpcHeader* header_;
+ ::std::string* protobuf_body_;
+ ::std::string* raw_body_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_GeneralRPC_2eproto();
+ friend void protobuf_AssignDesc_GeneralRPC_2eproto();
+ friend void protobuf_ShutdownFile_GeneralRPC_2eproto();
+
+ void InitAsDefaultInstance();
+ static CompleteRpcMessage* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class RpcFailure : public ::google::protobuf::Message {
+ public:
+ RpcFailure();
+ virtual ~RpcFailure();
+
+ RpcFailure(const RpcFailure& from);
+
+ inline RpcFailure& operator=(const RpcFailure& 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 RpcFailure& default_instance();
+
+ void Swap(RpcFailure* other);
+
+ // implements Message ----------------------------------------------
+
+ RpcFailure* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const RpcFailure& from);
+ void MergeFrom(const RpcFailure& 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 error_id = 1;
+ inline bool has_error_id() const;
+ inline void clear_error_id();
+ static const int kErrorIdFieldNumber = 1;
+ inline ::google::protobuf::int64 error_id() const;
+ inline void set_error_id(::google::protobuf::int64 value);
+
+ // optional int32 error_code = 2;
+ inline bool has_error_code() const;
+ inline void clear_error_code();
+ static const int kErrorCodeFieldNumber = 2;
+ inline ::google::protobuf::int32 error_code() const;
+ inline void set_error_code(::google::protobuf::int32 value);
+
+ // optional string short_error = 3;
+ inline bool has_short_error() const;
+ inline void clear_short_error();
+ static const int kShortErrorFieldNumber = 3;
+ inline const ::std::string& short_error() const;
+ inline void set_short_error(const ::std::string& value);
+ inline void set_short_error(const char* value);
+ inline void set_short_error(const char* value, size_t size);
+ inline ::std::string* mutable_short_error();
+ inline ::std::string* release_short_error();
+ inline void set_allocated_short_error(::std::string* short_error);
+
+ // optional string long_error = 4;
+ inline bool has_long_error() const;
+ inline void clear_long_error();
+ static const int kLongErrorFieldNumber = 4;
+ inline const ::std::string& long_error() const;
+ inline void set_long_error(const ::std::string& value);
+ inline void set_long_error(const char* value);
+ inline void set_long_error(const char* value, size_t size);
+ inline ::std::string* mutable_long_error();
+ inline ::std::string* release_long_error();
+ inline void set_allocated_long_error(::std::string* long_error);
+
+ // @@protoc_insertion_point(class_scope:exec.rpc.RpcFailure)
+ private:
+ inline void set_has_error_id();
+ inline void clear_has_error_id();
+ inline void set_has_error_code();
+ inline void clear_has_error_code();
+ inline void set_has_short_error();
+ inline void clear_has_short_error();
+ inline void set_has_long_error();
+ inline void clear_has_long_error();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int64 error_id_;
+ ::std::string* short_error_;
+ ::std::string* long_error_;
+ ::google::protobuf::int32 error_code_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
+
+ friend void protobuf_AddDesc_GeneralRPC_2eproto();
+ friend void protobuf_AssignDesc_GeneralRPC_2eproto();
+ friend void protobuf_ShutdownFile_GeneralRPC_2eproto();
+
+ void InitAsDefaultInstance();
+ static RpcFailure* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// Ack
+
+// optional bool ok = 1;
+inline bool Ack::has_ok() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Ack::set_has_ok() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void Ack::clear_has_ok() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void Ack::clear_ok() {
+ ok_ = false;
+ clear_has_ok();
+}
+inline bool Ack::ok() const {
+ return ok_;
+}
+inline void Ack::set_ok(bool value) {
+ set_has_ok();
+ ok_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// RpcHeader
+
+// optional .exec.rpc.RpcMode mode = 1;
+inline bool RpcHeader::has_mode() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void RpcHeader::set_has_mode() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void RpcHeader::clear_has_mode() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void RpcHeader::clear_mode() {
+ mode_ = 0;
+ clear_has_mode();
+}
+inline ::exec::rpc::RpcMode RpcHeader::mode() const {
+ return static_cast< ::exec::rpc::RpcMode >(mode_);
+}
+inline void RpcHeader::set_mode(::exec::rpc::RpcMode value) {
+ assert(::exec::rpc::RpcMode_IsValid(value));
+ set_has_mode();
+ mode_ = value;
+}
+
+// optional int32 coordination_id = 2;
+inline bool RpcHeader::has_coordination_id() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void RpcHeader::set_has_coordination_id() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void RpcHeader::clear_has_coordination_id() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void RpcHeader::clear_coordination_id() {
+ coordination_id_ = 0;
+ clear_has_coordination_id();
+}
+inline ::google::protobuf::int32 RpcHeader::coordination_id() const {
+ return coordination_id_;
+}
+inline void RpcHeader::set_coordination_id(::google::protobuf::int32 value) {
+ set_has_coordination_id();
+ coordination_id_ = value;
+}
+
+// optional int32 rpc_type = 3;
+inline bool RpcHeader::has_rpc_type() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void RpcHeader::set_has_rpc_type() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void RpcHeader::clear_has_rpc_type() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void RpcHeader::clear_rpc_type() {
+ rpc_type_ = 0;
+ clear_has_rpc_type();
+}
+inline ::google::protobuf::int32 RpcHeader::rpc_type() const {
+ return rpc_type_;
+}
+inline void RpcHeader::set_rpc_type(::google::protobuf::int32 value) {
+ set_has_rpc_type();
+ rpc_type_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// CompleteRpcMessage
+
+// optional .exec.rpc.RpcHeader header = 1;
+inline bool CompleteRpcMessage::has_header() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void CompleteRpcMessage::set_has_header() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void CompleteRpcMessage::clear_has_header() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void CompleteRpcMessage::clear_header() {
+ if (header_ != NULL) header_->::exec::rpc::RpcHeader::Clear();
+ clear_has_header();
+}
+inline const ::exec::rpc::RpcHeader& CompleteRpcMessage::header() const {
+ return header_ != NULL ? *header_ : *default_instance_->header_;
+}
+inline ::exec::rpc::RpcHeader* CompleteRpcMessage::mutable_header() {
+ set_has_header();
+ if (header_ == NULL) header_ = new ::exec::rpc::RpcHeader;
+ return header_;
+}
+inline ::exec::rpc::RpcHeader* CompleteRpcMessage::release_header() {
+ clear_has_header();
+ ::exec::rpc::RpcHeader* temp = header_;
+ header_ = NULL;
+ return temp;
+}
+inline void CompleteRpcMessage::set_allocated_header(::exec::rpc::RpcHeader* header) {
+ delete header_;
+ header_ = header;
+ if (header) {
+ set_has_header();
+ } else {
+ clear_has_header();
+ }
+}
+
+// optional bytes protobuf_body = 2;
+inline bool CompleteRpcMessage::has_protobuf_body() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void CompleteRpcMessage::set_has_protobuf_body() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void CompleteRpcMessage::clear_has_protobuf_body() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void CompleteRpcMessage::clear_protobuf_body() {
+ if (protobuf_body_ != &::google::protobuf::internal::kEmptyString) {
+ protobuf_body_->clear();
+ }
+ clear_has_protobuf_body();
+}
+inline const ::std::string& CompleteRpcMessage::protobuf_body() const {
+ return *protobuf_body_;
+}
+inline void CompleteRpcMessage::set_protobuf_body(const ::std::string& value) {
+ set_has_protobuf_body();
+ if (protobuf_body_ == &::google::protobuf::internal::kEmptyString) {
+ protobuf_body_ = new ::std::string;
+ }
+ protobuf_body_->assign(value);
+}
+inline void CompleteRpcMessage::set_protobuf_body(const char* value) {
+ set_has_protobuf_body();
+ if (protobuf_body_ == &::google::protobuf::internal::kEmptyString) {
+ protobuf_body_ = new ::std::string;
+ }
+ protobuf_body_->assign(value);
+}
+inline void CompleteRpcMessage::set_protobuf_body(const void* value, size_t size) {
+ set_has_protobuf_body();
+ if (protobuf_body_ == &::google::protobuf::internal::kEmptyString) {
+ protobuf_body_ = new ::std::string;
+ }
+ protobuf_body_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* CompleteRpcMessage::mutable_protobuf_body() {
+ set_has_protobuf_body();
+ if (protobuf_body_ == &::google::protobuf::internal::kEmptyString) {
+ protobuf_body_ = new ::std::string;
+ }
+ return protobuf_body_;
+}
+inline ::std::string* CompleteRpcMessage::release_protobuf_body() {
+ clear_has_protobuf_body();
+ if (protobuf_body_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = protobuf_body_;
+ protobuf_body_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void CompleteRpcMessage::set_allocated_protobuf_body(::std::string* protobuf_body) {
+ if (protobuf_body_ != &::google::protobuf::internal::kEmptyString) {
+ delete protobuf_body_;
+ }
+ if (protobuf_body) {
+ set_has_protobuf_body();
+ protobuf_body_ = protobuf_body;
+ } else {
+ clear_has_protobuf_body();
+ protobuf_body_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional bytes raw_body = 3;
+inline bool CompleteRpcMessage::has_raw_body() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void CompleteRpcMessage::set_has_raw_body() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void CompleteRpcMessage::clear_has_raw_body() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void CompleteRpcMessage::clear_raw_body() {
+ if (raw_body_ != &::google::protobuf::internal::kEmptyString) {
+ raw_body_->clear();
+ }
+ clear_has_raw_body();
+}
+inline const ::std::string& CompleteRpcMessage::raw_body() const {
+ return *raw_body_;
+}
+inline void CompleteRpcMessage::set_raw_body(const ::std::string& value) {
+ set_has_raw_body();
+ if (raw_body_ == &::google::protobuf::internal::kEmptyString) {
+ raw_body_ = new ::std::string;
+ }
+ raw_body_->assign(value);
+}
+inline void CompleteRpcMessage::set_raw_body(const char* value) {
+ set_has_raw_body();
+ if (raw_body_ == &::google::protobuf::internal::kEmptyString) {
+ raw_body_ = new ::std::string;
+ }
+ raw_body_->assign(value);
+}
+inline void CompleteRpcMessage::set_raw_body(const void* value, size_t size) {
+ set_has_raw_body();
+ if (raw_body_ == &::google::protobuf::internal::kEmptyString) {
+ raw_body_ = new ::std::string;
+ }
+ raw_body_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* CompleteRpcMessage::mutable_raw_body() {
+ set_has_raw_body();
+ if (raw_body_ == &::google::protobuf::internal::kEmptyString) {
+ raw_body_ = new ::std::string;
+ }
+ return raw_body_;
+}
+inline ::std::string* CompleteRpcMessage::release_raw_body() {
+ clear_has_raw_body();
+ if (raw_body_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = raw_body_;
+ raw_body_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void CompleteRpcMessage::set_allocated_raw_body(::std::string* raw_body) {
+ if (raw_body_ != &::google::protobuf::internal::kEmptyString) {
+ delete raw_body_;
+ }
+ if (raw_body) {
+ set_has_raw_body();
+ raw_body_ = raw_body;
+ } else {
+ clear_has_raw_body();
+ raw_body_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// -------------------------------------------------------------------
+
+// RpcFailure
+
+// optional int64 error_id = 1;
+inline bool RpcFailure::has_error_id() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void RpcFailure::set_has_error_id() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void RpcFailure::clear_has_error_id() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void RpcFailure::clear_error_id() {
+ error_id_ = GOOGLE_LONGLONG(0);
+ clear_has_error_id();
+}
+inline ::google::protobuf::int64 RpcFailure::error_id() const {
+ return error_id_;
+}
+inline void RpcFailure::set_error_id(::google::protobuf::int64 value) {
+ set_has_error_id();
+ error_id_ = value;
+}
+
+// optional int32 error_code = 2;
+inline bool RpcFailure::has_error_code() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void RpcFailure::set_has_error_code() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void RpcFailure::clear_has_error_code() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void RpcFailure::clear_error_code() {
+ error_code_ = 0;
+ clear_has_error_code();
+}
+inline ::google::protobuf::int32 RpcFailure::error_code() const {
+ return error_code_;
+}
+inline void RpcFailure::set_error_code(::google::protobuf::int32 value) {
+ set_has_error_code();
+ error_code_ = value;
+}
+
+// optional string short_error = 3;
+inline bool RpcFailure::has_short_error() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void RpcFailure::set_has_short_error() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void RpcFailure::clear_has_short_error() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void RpcFailure::clear_short_error() {
+ if (short_error_ != &::google::protobuf::internal::kEmptyString) {
+ short_error_->clear();
+ }
+ clear_has_short_error();
+}
+inline const ::std::string& RpcFailure::short_error() const {
+ return *short_error_;
+}
+inline void RpcFailure::set_short_error(const ::std::string& value) {
+ set_has_short_error();
+ if (short_error_ == &::google::protobuf::internal::kEmptyString) {
+ short_error_ = new ::std::string;
+ }
+ short_error_->assign(value);
+}
+inline void RpcFailure::set_short_error(const char* value) {
+ set_has_short_error();
+ if (short_error_ == &::google::protobuf::internal::kEmptyString) {
+ short_error_ = new ::std::string;
+ }
+ short_error_->assign(value);
+}
+inline void RpcFailure::set_short_error(const char* value, size_t size) {
+ set_has_short_error();
+ if (short_error_ == &::google::protobuf::internal::kEmptyString) {
+ short_error_ = new ::std::string;
+ }
+ short_error_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* RpcFailure::mutable_short_error() {
+ set_has_short_error();
+ if (short_error_ == &::google::protobuf::internal::kEmptyString) {
+ short_error_ = new ::std::string;
+ }
+ return short_error_;
+}
+inline ::std::string* RpcFailure::release_short_error() {
+ clear_has_short_error();
+ if (short_error_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = short_error_;
+ short_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void RpcFailure::set_allocated_short_error(::std::string* short_error) {
+ if (short_error_ != &::google::protobuf::internal::kEmptyString) {
+ delete short_error_;
+ }
+ if (short_error) {
+ set_has_short_error();
+ short_error_ = short_error;
+ } else {
+ clear_has_short_error();
+ short_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional string long_error = 4;
+inline bool RpcFailure::has_long_error() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void RpcFailure::set_has_long_error() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void RpcFailure::clear_has_long_error() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void RpcFailure::clear_long_error() {
+ if (long_error_ != &::google::protobuf::internal::kEmptyString) {
+ long_error_->clear();
+ }
+ clear_has_long_error();
+}
+inline const ::std::string& RpcFailure::long_error() const {
+ return *long_error_;
+}
+inline void RpcFailure::set_long_error(const ::std::string& value) {
+ set_has_long_error();
+ if (long_error_ == &::google::protobuf::internal::kEmptyString) {
+ long_error_ = new ::std::string;
+ }
+ long_error_->assign(value);
+}
+inline void RpcFailure::set_long_error(const char* value) {
+ set_has_long_error();
+ if (long_error_ == &::google::protobuf::internal::kEmptyString) {
+ long_error_ = new ::std::string;
+ }
+ long_error_->assign(value);
+}
+inline void RpcFailure::set_long_error(const char* value, size_t size) {
+ set_has_long_error();
+ if (long_error_ == &::google::protobuf::internal::kEmptyString) {
+ long_error_ = new ::std::string;
+ }
+ long_error_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* RpcFailure::mutable_long_error() {
+ set_has_long_error();
+ if (long_error_ == &::google::protobuf::internal::kEmptyString) {
+ long_error_ = new ::std::string;
+ }
+ return long_error_;
+}
+inline ::std::string* RpcFailure::release_long_error() {
+ clear_has_long_error();
+ if (long_error_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = long_error_;
+ long_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void RpcFailure::set_allocated_long_error(::std::string* long_error) {
+ if (long_error_ != &::google::protobuf::internal::kEmptyString) {
+ delete long_error_;
+ }
+ if (long_error) {
+ set_has_long_error();
+ long_error_ = long_error;
+ } else {
+ clear_has_long_error();
+ long_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace rpc
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::rpc::RpcMode>() {
+ return ::exec::rpc::RpcMode_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_GeneralRPC_2eproto__INCLUDED
diff --git a/contrib/native/client/src/protobuf/SchemaDef.pb.cc b/contrib/native/client/src/protobuf/SchemaDef.pb.cc
new file mode 100644
index 000000000..40011f8b5
--- /dev/null
+++ b/contrib/native/client/src/protobuf/SchemaDef.pb.cc
@@ -0,0 +1,97 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SchemaDef.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "SchemaDef.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+
+namespace {
+
+const ::google::protobuf::EnumDescriptor* ValueMode_descriptor_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_SchemaDef_2eproto() {
+ protobuf_AddDesc_SchemaDef_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "SchemaDef.proto");
+ GOOGLE_CHECK(file != NULL);
+ ValueMode_descriptor_ = file->enum_type(0);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_SchemaDef_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_SchemaDef_2eproto() {
+}
+
+void protobuf_AddDesc_SchemaDef_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::common::protobuf_AddDesc_Types_2eproto();
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\017SchemaDef.proto\022\004exec\032\013Types.proto*0\n\t"
+ "ValueMode\022\020\n\014VALUE_VECTOR\020\000\022\007\n\003RLE\020\001\022\010\n\004"
+ "DICT\020\002B0\n\033org.apache.drill.exec.protoB\017S"
+ "chemaDefProtosH\001", 136);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "SchemaDef.proto", &protobuf_RegisterTypes);
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_SchemaDef_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_SchemaDef_2eproto {
+ StaticDescriptorInitializer_SchemaDef_2eproto() {
+ protobuf_AddDesc_SchemaDef_2eproto();
+ }
+} static_descriptor_initializer_SchemaDef_2eproto_;
+const ::google::protobuf::EnumDescriptor* ValueMode_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return ValueMode_descriptor_;
+}
+bool ValueMode_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/SchemaDef.pb.h b/contrib/native/client/src/protobuf/SchemaDef.pb.h
new file mode 100644
index 000000000..ee018458a
--- /dev/null
+++ b/contrib/native/client/src/protobuf/SchemaDef.pb.h
@@ -0,0 +1,85 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SchemaDef.proto
+
+#ifndef PROTOBUF_SchemaDef_2eproto__INCLUDED
+#define PROTOBUF_SchemaDef_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include "Types.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_SchemaDef_2eproto();
+void protobuf_AssignDesc_SchemaDef_2eproto();
+void protobuf_ShutdownFile_SchemaDef_2eproto();
+
+
+enum ValueMode {
+ VALUE_VECTOR = 0,
+ RLE = 1,
+ DICT = 2
+};
+bool ValueMode_IsValid(int value);
+const ValueMode ValueMode_MIN = VALUE_VECTOR;
+const ValueMode ValueMode_MAX = DICT;
+const int ValueMode_ARRAYSIZE = ValueMode_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* ValueMode_descriptor();
+inline const ::std::string& ValueMode_Name(ValueMode value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ ValueMode_descriptor(), value);
+}
+inline bool ValueMode_Parse(
+ const ::std::string& name, ValueMode* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<ValueMode>(
+ ValueMode_descriptor(), name, value);
+}
+// ===================================================================
+
+
+// ===================================================================
+
+
+// ===================================================================
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::ValueMode>() {
+ return ::exec::ValueMode_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_SchemaDef_2eproto__INCLUDED
diff --git a/contrib/native/client/src/protobuf/Types.pb.cc b/contrib/native/client/src/protobuf/Types.pb.cc
new file mode 100644
index 000000000..c7fa2eaaf
--- /dev/null
+++ b/contrib/native/client/src/protobuf/Types.pb.cc
@@ -0,0 +1,611 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Types.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "Types.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace common {
+
+namespace {
+
+const ::google::protobuf::Descriptor* MajorType_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ MajorType_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* MinorType_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* DataMode_descriptor_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_Types_2eproto() {
+ protobuf_AddDesc_Types_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "Types.proto");
+ GOOGLE_CHECK(file != NULL);
+ MajorType_descriptor_ = file->message_type(0);
+ static const int MajorType_offsets_[6] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, minor_type_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, mode_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, width_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, precision_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, scale_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, timezone_),
+ };
+ MajorType_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ MajorType_descriptor_,
+ MajorType::default_instance_,
+ MajorType_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(MajorType));
+ MinorType_descriptor_ = file->enum_type(0);
+ DataMode_descriptor_ = file->enum_type(1);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_Types_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ MajorType_descriptor_, &MajorType::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_Types_2eproto() {
+ delete MajorType::default_instance_;
+ delete MajorType_reflection_;
+}
+
+void protobuf_AddDesc_Types_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\013Types.proto\022\006common\"\225\001\n\tMajorType\022%\n\nm"
+ "inor_type\030\001 \001(\0162\021.common.MinorType\022\036\n\004mo"
+ "de\030\002 \001(\0162\020.common.DataMode\022\r\n\005width\030\003 \001("
+ "\005\022\021\n\tprecision\030\004 \001(\005\022\r\n\005scale\030\005 \001(\005\022\020\n\010t"
+ "imeZone\030\006 \001(\005*\374\003\n\tMinorType\022\010\n\004LATE\020\000\022\007\n"
+ "\003MAP\020\001\022\013\n\007TINYINT\020\003\022\014\n\010SMALLINT\020\004\022\007\n\003INT"
+ "\020\005\022\n\n\006BIGINT\020\006\022\014\n\010DECIMAL9\020\007\022\r\n\tDECIMAL1"
+ "8\020\010\022\023\n\017DECIMAL28SPARSE\020\t\022\023\n\017DECIMAL38SPA"
+ "RSE\020\n\022\t\n\005MONEY\020\013\022\010\n\004DATE\020\014\022\010\n\004TIME\020\r\022\n\n\006"
+ "TIMETZ\020\016\022\017\n\013TIMESTAMPTZ\020\017\022\r\n\tTIMESTAMP\020\020"
+ "\022\014\n\010INTERVAL\020\021\022\n\n\006FLOAT4\020\022\022\n\n\006FLOAT8\020\023\022\007"
+ "\n\003BIT\020\024\022\r\n\tFIXEDCHAR\020\025\022\017\n\013FIXED16CHAR\020\026\022"
+ "\017\n\013FIXEDBINARY\020\027\022\013\n\007VARCHAR\020\030\022\r\n\tVAR16CH"
+ "AR\020\031\022\r\n\tVARBINARY\020\032\022\t\n\005UINT1\020\035\022\t\n\005UINT2\020"
+ "\036\022\t\n\005UINT4\020\037\022\t\n\005UINT8\020 \022\022\n\016DECIMAL28DENS"
+ "E\020!\022\022\n\016DECIMAL38DENSE\020\"\022\016\n\nDM_UNKNOWN\020%\022"
+ "\020\n\014INTERVALYEAR\020&\022\017\n\013INTERVALDAY\020\'\022\010\n\004LI"
+ "ST\020(*=\n\010DataMode\022\017\n\013DM_OPTIONAL\020\000\022\017\n\013DM_"
+ "REQUIRED\020\001\022\017\n\013DM_REPEATED\020\002B-\n\035org.apach"
+ "e.drill.common.typesB\nTypeProtosH\001", 794);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "Types.proto", &protobuf_RegisterTypes);
+ MajorType::default_instance_ = new MajorType();
+ MajorType::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Types_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_Types_2eproto {
+ StaticDescriptorInitializer_Types_2eproto() {
+ protobuf_AddDesc_Types_2eproto();
+ }
+} static_descriptor_initializer_Types_2eproto_;
+const ::google::protobuf::EnumDescriptor* MinorType_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return MinorType_descriptor_;
+}
+bool MinorType_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ case 26:
+ case 29:
+ case 30:
+ case 31:
+ case 32:
+ case 33:
+ case 34:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ return true;
+ default:
+ return false;
+ }
+}
+
+const ::google::protobuf::EnumDescriptor* DataMode_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return DataMode_descriptor_;
+}
+bool DataMode_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int MajorType::kMinorTypeFieldNumber;
+const int MajorType::kModeFieldNumber;
+const int MajorType::kWidthFieldNumber;
+const int MajorType::kPrecisionFieldNumber;
+const int MajorType::kScaleFieldNumber;
+const int MajorType::kTimeZoneFieldNumber;
+#endif // !_MSC_VER
+
+MajorType::MajorType()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void MajorType::InitAsDefaultInstance() {
+}
+
+MajorType::MajorType(const MajorType& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void MajorType::SharedCtor() {
+ _cached_size_ = 0;
+ minor_type_ = 0;
+ mode_ = 0;
+ width_ = 0;
+ precision_ = 0;
+ scale_ = 0;
+ timezone_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+MajorType::~MajorType() {
+ SharedDtor();
+}
+
+void MajorType::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void MajorType::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* MajorType::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return MajorType_descriptor_;
+}
+
+const MajorType& MajorType::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_Types_2eproto();
+ return *default_instance_;
+}
+
+MajorType* MajorType::default_instance_ = NULL;
+
+MajorType* MajorType::New() const {
+ return new MajorType;
+}
+
+void MajorType::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ minor_type_ = 0;
+ mode_ = 0;
+ width_ = 0;
+ precision_ = 0;
+ scale_ = 0;
+ timezone_ = 0;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool MajorType::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 .common.MinorType minor_type = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::common::MinorType_IsValid(value)) {
+ set_minor_type(static_cast< ::common::MinorType >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(1, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_mode;
+ break;
+ }
+
+ // optional .common.DataMode mode = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_mode:
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::common::DataMode_IsValid(value)) {
+ set_mode(static_cast< ::common::DataMode >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(2, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_width;
+ break;
+ }
+
+ // optional int32 width = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_width:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &width_)));
+ set_has_width();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(32)) goto parse_precision;
+ break;
+ }
+
+ // optional int32 precision = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_precision:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &precision_)));
+ set_has_precision();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(40)) goto parse_scale;
+ break;
+ }
+
+ // optional int32 scale = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_scale:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &scale_)));
+ set_has_scale();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(48)) goto parse_timeZone;
+ break;
+ }
+
+ // optional int32 timeZone = 6;
+ case 6: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_timeZone:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &timezone_)));
+ set_has_timezone();
+ } 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 MajorType::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .common.MinorType minor_type = 1;
+ if (has_minor_type()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 1, this->minor_type(), output);
+ }
+
+ // optional .common.DataMode mode = 2;
+ if (has_mode()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 2, this->mode(), output);
+ }
+
+ // optional int32 width = 3;
+ if (has_width()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->width(), output);
+ }
+
+ // optional int32 precision = 4;
+ if (has_precision()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->precision(), output);
+ }
+
+ // optional int32 scale = 5;
+ if (has_scale()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->scale(), output);
+ }
+
+ // optional int32 timeZone = 6;
+ if (has_timezone()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->timezone(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* MajorType::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .common.MinorType minor_type = 1;
+ if (has_minor_type()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 1, this->minor_type(), target);
+ }
+
+ // optional .common.DataMode mode = 2;
+ if (has_mode()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 2, this->mode(), target);
+ }
+
+ // optional int32 width = 3;
+ if (has_width()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->width(), target);
+ }
+
+ // optional int32 precision = 4;
+ if (has_precision()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->precision(), target);
+ }
+
+ // optional int32 scale = 5;
+ if (has_scale()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->scale(), target);
+ }
+
+ // optional int32 timeZone = 6;
+ if (has_timezone()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->timezone(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int MajorType::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .common.MinorType minor_type = 1;
+ if (has_minor_type()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->minor_type());
+ }
+
+ // optional .common.DataMode mode = 2;
+ if (has_mode()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->mode());
+ }
+
+ // optional int32 width = 3;
+ if (has_width()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->width());
+ }
+
+ // optional int32 precision = 4;
+ if (has_precision()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->precision());
+ }
+
+ // optional int32 scale = 5;
+ if (has_scale()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->scale());
+ }
+
+ // optional int32 timeZone = 6;
+ if (has_timezone()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->timezone());
+ }
+
+ }
+ 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 MajorType::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const MajorType* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const MajorType*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void MajorType::MergeFrom(const MajorType& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_minor_type()) {
+ set_minor_type(from.minor_type());
+ }
+ if (from.has_mode()) {
+ set_mode(from.mode());
+ }
+ if (from.has_width()) {
+ set_width(from.width());
+ }
+ if (from.has_precision()) {
+ set_precision(from.precision());
+ }
+ if (from.has_scale()) {
+ set_scale(from.scale());
+ }
+ if (from.has_timezone()) {
+ set_timezone(from.timezone());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void MajorType::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void MajorType::CopyFrom(const MajorType& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool MajorType::IsInitialized() const {
+
+ return true;
+}
+
+void MajorType::Swap(MajorType* other) {
+ if (other != this) {
+ std::swap(minor_type_, other->minor_type_);
+ std::swap(mode_, other->mode_);
+ std::swap(width_, other->width_);
+ std::swap(precision_, other->precision_);
+ std::swap(scale_, other->scale_);
+ std::swap(timezone_, other->timezone_);
+ 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 MajorType::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = MajorType_descriptor_;
+ metadata.reflection = MajorType_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace common
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/User.pb.cc b/contrib/native/client/src/protobuf/User.pb.cc
new file mode 100644
index 000000000..d2826ead8
--- /dev/null
+++ b/contrib/native/client/src/protobuf/User.pb.cc
@@ -0,0 +1,2940 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: User.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "User.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace user {
+
+namespace {
+
+const ::google::protobuf::Descriptor* Property_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ Property_reflection_ = NULL;
+const ::google::protobuf::Descriptor* UserProperties_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ UserProperties_reflection_ = NULL;
+const ::google::protobuf::Descriptor* UserToBitHandshake_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ UserToBitHandshake_reflection_ = NULL;
+const ::google::protobuf::Descriptor* RequestResults_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ RequestResults_reflection_ = NULL;
+const ::google::protobuf::Descriptor* RunQuery_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ RunQuery_reflection_ = NULL;
+const ::google::protobuf::Descriptor* BitToUserHandshake_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ BitToUserHandshake_reflection_ = NULL;
+const ::google::protobuf::Descriptor* NodeStatus_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ NodeStatus_reflection_ = NULL;
+const ::google::protobuf::Descriptor* QueryResult_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ QueryResult_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* QueryResult_QueryState_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* QueryType_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* QueryResultsMode_descriptor_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_User_2eproto() {
+ protobuf_AddDesc_User_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "User.proto");
+ GOOGLE_CHECK(file != NULL);
+ Property_descriptor_ = file->message_type(0);
+ static const int Property_offsets_[2] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Property, key_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Property, value_),
+ };
+ Property_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ Property_descriptor_,
+ Property::default_instance_,
+ Property_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Property, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Property, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(Property));
+ UserProperties_descriptor_ = file->message_type(1);
+ static const int UserProperties_offsets_[1] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserProperties, properties_),
+ };
+ UserProperties_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ UserProperties_descriptor_,
+ UserProperties::default_instance_,
+ UserProperties_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserProperties, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserProperties, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(UserProperties));
+ UserToBitHandshake_descriptor_ = file->message_type(2);
+ static const int UserToBitHandshake_offsets_[5] = {
+ 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_),
+ };
+ UserToBitHandshake_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ UserToBitHandshake_descriptor_,
+ UserToBitHandshake::default_instance_,
+ UserToBitHandshake_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserToBitHandshake, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(UserToBitHandshake));
+ RequestResults_descriptor_ = file->message_type(3);
+ static const int RequestResults_offsets_[2] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestResults, query_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestResults, maximum_responses_),
+ };
+ RequestResults_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ RequestResults_descriptor_,
+ RequestResults::default_instance_,
+ RequestResults_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestResults, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestResults, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(RequestResults));
+ RunQuery_descriptor_ = file->message_type(4);
+ static const int RunQuery_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RunQuery, results_mode_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RunQuery, type_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RunQuery, plan_),
+ };
+ RunQuery_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ RunQuery_descriptor_,
+ RunQuery::default_instance_,
+ RunQuery_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RunQuery, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RunQuery, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(RunQuery));
+ BitToUserHandshake_descriptor_ = file->message_type(5);
+ static const int BitToUserHandshake_offsets_[1] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitToUserHandshake, rpc_version_),
+ };
+ BitToUserHandshake_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ BitToUserHandshake_descriptor_,
+ BitToUserHandshake::default_instance_,
+ BitToUserHandshake_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitToUserHandshake, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BitToUserHandshake, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(BitToUserHandshake));
+ NodeStatus_descriptor_ = file->message_type(6);
+ static const int NodeStatus_offsets_[2] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeStatus, node_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeStatus, memory_footprint_),
+ };
+ NodeStatus_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ NodeStatus_descriptor_,
+ NodeStatus::default_instance_,
+ NodeStatus_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeStatus, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeStatus, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(NodeStatus));
+ QueryResult_descriptor_ = file->message_type(7);
+ static const int QueryResult_offsets_[11] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, query_state_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, query_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, is_last_chunk_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, row_count_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, records_scan_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, records_error_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, submission_time_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, node_status_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, error_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, def_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, schema_changed_),
+ };
+ QueryResult_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ QueryResult_descriptor_,
+ QueryResult::default_instance_,
+ QueryResult_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryResult, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(QueryResult));
+ QueryResult_QueryState_descriptor_ = QueryResult_descriptor_->enum_type(0);
+ RpcType_descriptor_ = file->enum_type(0);
+ QueryType_descriptor_ = file->enum_type(1);
+ QueryResultsMode_descriptor_ = file->enum_type(2);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_User_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ Property_descriptor_, &Property::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ UserProperties_descriptor_, &UserProperties::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ UserToBitHandshake_descriptor_, &UserToBitHandshake::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ RequestResults_descriptor_, &RequestResults::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ RunQuery_descriptor_, &RunQuery::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ BitToUserHandshake_descriptor_, &BitToUserHandshake::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ NodeStatus_descriptor_, &NodeStatus::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ QueryResult_descriptor_, &QueryResult::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_User_2eproto() {
+ delete Property::default_instance_;
+ delete Property_reflection_;
+ delete UserProperties::default_instance_;
+ delete UserProperties_reflection_;
+ delete UserToBitHandshake::default_instance_;
+ delete UserToBitHandshake_reflection_;
+ delete RequestResults::default_instance_;
+ delete RequestResults_reflection_;
+ delete RunQuery::default_instance_;
+ delete RunQuery_reflection_;
+ delete BitToUserHandshake::default_instance_;
+ delete BitToUserHandshake_reflection_;
+ delete NodeStatus::default_instance_;
+ delete NodeStatus_reflection_;
+ delete QueryResult::default_instance_;
+ delete QueryResult_reflection_;
+}
+
+void protobuf_AddDesc_User_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::exec::protobuf_AddDesc_SchemaDef_2eproto();
+ ::exec::shared::protobuf_AddDesc_UserBitShared_2eproto();
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\nUser.proto\022\texec.user\032\017SchemaDef.proto"
+ "\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"
+ "\"\326\001\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\"S\n\016RequestResults\022&\n\010q"
+ "uery_id\030\001 \001(\0132\024.exec.shared.QueryId\022\031\n\021m"
+ "aximum_responses\030\002 \001(\005\"o\n\010RunQuery\0221\n\014re"
+ "sults_mode\030\001 \001(\0162\033.exec.user.QueryResult"
+ "sMode\022\"\n\004type\030\002 \001(\0162\024.exec.user.QueryTyp"
+ "e\022\014\n\004plan\030\003 \001(\t\")\n\022BitToUserHandshake\022\023\n"
+ "\013rpc_version\030\002 \001(\005\"7\n\nNodeStatus\022\017\n\007node"
+ "_id\030\001 \001(\005\022\030\n\020memory_footprint\030\002 \001(\003\"\331\003\n\013"
+ "QueryResult\0226\n\013query_state\030\001 \001(\0162!.exec."
+ "user.QueryResult.QueryState\022&\n\010query_id\030"
+ "\002 \001(\0132\024.exec.shared.QueryId\022\025\n\ris_last_c"
+ "hunk\030\003 \001(\010\022\021\n\trow_count\030\004 \001(\005\022\024\n\014records"
+ "_scan\030\005 \001(\003\022\025\n\rrecords_error\030\006 \001(\003\022\027\n\017su"
+ "bmission_time\030\007 \001(\003\022*\n\013node_status\030\010 \003(\013"
+ "2\025.exec.user.NodeStatus\022(\n\005error\030\t \003(\0132\031"
+ ".exec.shared.DrillPBError\022(\n\003def\030\n \001(\0132\033"
+ ".exec.shared.RecordBatchDef\022\026\n\016schema_ch"
+ "anged\030\013 \001(\010\"b\n\nQueryState\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\021\n\rUNKNOWN_QUERY\020\005*\270\001\n\007RpcT"
+ "ype\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\017REQ"
+ "UEST_RESULTS\020\005\022\020\n\014QUERY_RESULT\020\006\022\020\n\014QUER"
+ "Y_HANDLE\020\007\022\026\n\022REQ_META_FUNCTIONS\020\010\022\026\n\022RE"
+ "SP_FUNCTION_LIST\020\t*/\n\tQueryType\022\007\n\003SQL\020\001"
+ "\022\013\n\007LOGICAL\020\002\022\014\n\010PHYSICAL\020\003*#\n\020QueryResu"
+ "ltsMode\022\017\n\013STREAM_FULL\020\001B+\n\033org.apache.d"
+ "rill.exec.protoB\nUserProtosH\001", 1469);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "User.proto", &protobuf_RegisterTypes);
+ Property::default_instance_ = new Property();
+ UserProperties::default_instance_ = new UserProperties();
+ UserToBitHandshake::default_instance_ = new UserToBitHandshake();
+ RequestResults::default_instance_ = new RequestResults();
+ RunQuery::default_instance_ = new RunQuery();
+ BitToUserHandshake::default_instance_ = new BitToUserHandshake();
+ NodeStatus::default_instance_ = new NodeStatus();
+ QueryResult::default_instance_ = new QueryResult();
+ Property::default_instance_->InitAsDefaultInstance();
+ UserProperties::default_instance_->InitAsDefaultInstance();
+ UserToBitHandshake::default_instance_->InitAsDefaultInstance();
+ RequestResults::default_instance_->InitAsDefaultInstance();
+ RunQuery::default_instance_->InitAsDefaultInstance();
+ BitToUserHandshake::default_instance_->InitAsDefaultInstance();
+ NodeStatus::default_instance_->InitAsDefaultInstance();
+ QueryResult::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_User_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_User_2eproto {
+ StaticDescriptorInitializer_User_2eproto() {
+ protobuf_AddDesc_User_2eproto();
+ }
+} static_descriptor_initializer_User_2eproto_;
+const ::google::protobuf::EnumDescriptor* RpcType_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RpcType_descriptor_;
+}
+bool RpcType_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:
+ return true;
+ default:
+ return false;
+ }
+}
+
+const ::google::protobuf::EnumDescriptor* QueryType_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return QueryType_descriptor_;
+}
+bool QueryType_IsValid(int value) {
+ switch(value) {
+ case 1:
+ case 2:
+ case 3:
+ return true;
+ default:
+ return false;
+ }
+}
+
+const ::google::protobuf::EnumDescriptor* QueryResultsMode_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return QueryResultsMode_descriptor_;
+}
+bool QueryResultsMode_IsValid(int value) {
+ switch(value) {
+ case 1:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int Property::kKeyFieldNumber;
+const int Property::kValueFieldNumber;
+#endif // !_MSC_VER
+
+Property::Property()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void Property::InitAsDefaultInstance() {
+}
+
+Property::Property(const Property& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void Property::SharedCtor() {
+ _cached_size_ = 0;
+ key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+Property::~Property() {
+ SharedDtor();
+}
+
+void Property::SharedDtor() {
+ if (key_ != &::google::protobuf::internal::kEmptyString) {
+ delete key_;
+ }
+ if (value_ != &::google::protobuf::internal::kEmptyString) {
+ delete value_;
+ }
+ if (this != default_instance_) {
+ }
+}
+
+void Property::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* Property::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return Property_descriptor_;
+}
+
+const Property& Property::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+Property* Property::default_instance_ = NULL;
+
+Property* Property::New() const {
+ return new Property;
+}
+
+void Property::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_key()) {
+ if (key_ != &::google::protobuf::internal::kEmptyString) {
+ key_->clear();
+ }
+ }
+ if (has_value()) {
+ if (value_ != &::google::protobuf::internal::kEmptyString) {
+ value_->clear();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool Property::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)) {
+ // required string key = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_key()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->key().data(), this->key().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(18)) goto parse_value;
+ break;
+ }
+
+ // required string value = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_value:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_value()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->value().data(), this->value().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 Property::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // required string key = 1;
+ if (has_key()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->key().data(), this->key().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 1, this->key(), output);
+ }
+
+ // required string value = 2;
+ if (has_value()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->value().data(), this->value().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 2, this->value(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* Property::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // required string key = 1;
+ if (has_key()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->key().data(), this->key().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 1, this->key(), target);
+ }
+
+ // required string value = 2;
+ if (has_value()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->value().data(), this->value().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 2, this->value(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int Property::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // required string key = 1;
+ if (has_key()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->key());
+ }
+
+ // required string value = 2;
+ if (has_value()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->value());
+ }
+
+ }
+ 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 Property::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const Property* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const Property*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void Property::MergeFrom(const Property& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_key()) {
+ set_key(from.key());
+ }
+ if (from.has_value()) {
+ set_value(from.value());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void Property::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void Property::CopyFrom(const Property& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool Property::IsInitialized() const {
+ if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
+
+ return true;
+}
+
+void Property::Swap(Property* other) {
+ if (other != this) {
+ std::swap(key_, other->key_);
+ std::swap(value_, other->value_);
+ 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 Property::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = Property_descriptor_;
+ metadata.reflection = Property_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int UserProperties::kPropertiesFieldNumber;
+#endif // !_MSC_VER
+
+UserProperties::UserProperties()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void UserProperties::InitAsDefaultInstance() {
+}
+
+UserProperties::UserProperties(const UserProperties& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void UserProperties::SharedCtor() {
+ _cached_size_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+UserProperties::~UserProperties() {
+ SharedDtor();
+}
+
+void UserProperties::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void UserProperties::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* UserProperties::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return UserProperties_descriptor_;
+}
+
+const UserProperties& UserProperties::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+UserProperties* UserProperties::default_instance_ = NULL;
+
+UserProperties* UserProperties::New() const {
+ return new UserProperties;
+}
+
+void UserProperties::Clear() {
+ properties_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool UserProperties::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)) {
+ // repeated .exec.user.Property properties = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_properties:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_properties()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(10)) goto parse_properties;
+ 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 UserProperties::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // repeated .exec.user.Property properties = 1;
+ for (int i = 0; i < this->properties_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->properties(i), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* UserProperties::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // repeated .exec.user.Property properties = 1;
+ for (int i = 0; i < this->properties_size(); i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->properties(i), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int UserProperties::ByteSize() const {
+ int total_size = 0;
+
+ // repeated .exec.user.Property properties = 1;
+ total_size += 1 * this->properties_size();
+ for (int i = 0; i < this->properties_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->properties(i));
+ }
+
+ 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 UserProperties::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const UserProperties* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const UserProperties*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void UserProperties::MergeFrom(const UserProperties& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ properties_.MergeFrom(from.properties_);
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void UserProperties::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void UserProperties::CopyFrom(const UserProperties& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool UserProperties::IsInitialized() const {
+
+ for (int i = 0; i < properties_size(); i++) {
+ if (!this->properties(i).IsInitialized()) return false;
+ }
+ return true;
+}
+
+void UserProperties::Swap(UserProperties* other) {
+ if (other != this) {
+ properties_.Swap(&other->properties_);
+ 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 UserProperties::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = UserProperties_descriptor_;
+ metadata.reflection = UserProperties_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int UserToBitHandshake::kChannelFieldNumber;
+const int UserToBitHandshake::kSupportListeningFieldNumber;
+const int UserToBitHandshake::kRpcVersionFieldNumber;
+const int UserToBitHandshake::kCredentialsFieldNumber;
+const int UserToBitHandshake::kPropertiesFieldNumber;
+#endif // !_MSC_VER
+
+UserToBitHandshake::UserToBitHandshake()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void UserToBitHandshake::InitAsDefaultInstance() {
+ credentials_ = const_cast< ::exec::shared::UserCredentials*>(&::exec::shared::UserCredentials::default_instance());
+ properties_ = const_cast< ::exec::user::UserProperties*>(&::exec::user::UserProperties::default_instance());
+}
+
+UserToBitHandshake::UserToBitHandshake(const UserToBitHandshake& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void UserToBitHandshake::SharedCtor() {
+ _cached_size_ = 0;
+ channel_ = 2;
+ support_listening_ = false;
+ rpc_version_ = 0;
+ credentials_ = NULL;
+ properties_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+UserToBitHandshake::~UserToBitHandshake() {
+ SharedDtor();
+}
+
+void UserToBitHandshake::SharedDtor() {
+ if (this != default_instance_) {
+ delete credentials_;
+ delete properties_;
+ }
+}
+
+void UserToBitHandshake::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* UserToBitHandshake::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return UserToBitHandshake_descriptor_;
+}
+
+const UserToBitHandshake& UserToBitHandshake::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+UserToBitHandshake* UserToBitHandshake::default_instance_ = NULL;
+
+UserToBitHandshake* UserToBitHandshake::New() const {
+ return new UserToBitHandshake;
+}
+
+void UserToBitHandshake::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ channel_ = 2;
+ support_listening_ = false;
+ rpc_version_ = 0;
+ if (has_credentials()) {
+ if (credentials_ != NULL) credentials_->::exec::shared::UserCredentials::Clear();
+ }
+ if (has_properties()) {
+ if (properties_ != NULL) properties_->::exec::user::UserProperties::Clear();
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool UserToBitHandshake::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 .exec.shared.RpcChannel channel = 1 [default = USER];
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::shared::RpcChannel_IsValid(value)) {
+ set_channel(static_cast< ::exec::shared::RpcChannel >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(1, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_support_listening;
+ break;
+ }
+
+ // optional bool support_listening = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_support_listening:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &support_listening_)));
+ set_has_support_listening();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_rpc_version;
+ break;
+ }
+
+ // optional int32 rpc_version = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_rpc_version:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &rpc_version_)));
+ set_has_rpc_version();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(34)) goto parse_credentials;
+ break;
+ }
+
+ // optional .exec.shared.UserCredentials credentials = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_credentials:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_credentials()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(42)) goto parse_properties;
+ break;
+ }
+
+ // optional .exec.user.UserProperties properties = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_properties:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_properties()));
+ } 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 UserToBitHandshake::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.shared.RpcChannel channel = 1 [default = USER];
+ if (has_channel()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 1, this->channel(), output);
+ }
+
+ // optional bool support_listening = 2;
+ if (has_support_listening()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->support_listening(), output);
+ }
+
+ // optional int32 rpc_version = 3;
+ if (has_rpc_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->rpc_version(), output);
+ }
+
+ // optional .exec.shared.UserCredentials credentials = 4;
+ if (has_credentials()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 4, this->credentials(), output);
+ }
+
+ // optional .exec.user.UserProperties properties = 5;
+ if (has_properties()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 5, this->properties(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* UserToBitHandshake::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.shared.RpcChannel channel = 1 [default = USER];
+ if (has_channel()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 1, this->channel(), target);
+ }
+
+ // optional bool support_listening = 2;
+ if (has_support_listening()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->support_listening(), target);
+ }
+
+ // optional int32 rpc_version = 3;
+ if (has_rpc_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->rpc_version(), target);
+ }
+
+ // optional .exec.shared.UserCredentials credentials = 4;
+ if (has_credentials()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 4, this->credentials(), target);
+ }
+
+ // optional .exec.user.UserProperties properties = 5;
+ if (has_properties()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 5, this->properties(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int UserToBitHandshake::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.shared.RpcChannel channel = 1 [default = USER];
+ if (has_channel()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->channel());
+ }
+
+ // optional bool support_listening = 2;
+ if (has_support_listening()) {
+ total_size += 1 + 1;
+ }
+
+ // optional int32 rpc_version = 3;
+ if (has_rpc_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->rpc_version());
+ }
+
+ // optional .exec.shared.UserCredentials credentials = 4;
+ if (has_credentials()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->credentials());
+ }
+
+ // optional .exec.user.UserProperties properties = 5;
+ if (has_properties()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->properties());
+ }
+
+ }
+ 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 UserToBitHandshake::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const UserToBitHandshake* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const UserToBitHandshake*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void UserToBitHandshake::MergeFrom(const UserToBitHandshake& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_channel()) {
+ set_channel(from.channel());
+ }
+ if (from.has_support_listening()) {
+ set_support_listening(from.support_listening());
+ }
+ if (from.has_rpc_version()) {
+ set_rpc_version(from.rpc_version());
+ }
+ if (from.has_credentials()) {
+ mutable_credentials()->::exec::shared::UserCredentials::MergeFrom(from.credentials());
+ }
+ if (from.has_properties()) {
+ mutable_properties()->::exec::user::UserProperties::MergeFrom(from.properties());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void UserToBitHandshake::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void UserToBitHandshake::CopyFrom(const UserToBitHandshake& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool UserToBitHandshake::IsInitialized() const {
+
+ if (has_properties()) {
+ if (!this->properties().IsInitialized()) return false;
+ }
+ return true;
+}
+
+void UserToBitHandshake::Swap(UserToBitHandshake* other) {
+ if (other != this) {
+ std::swap(channel_, other->channel_);
+ std::swap(support_listening_, other->support_listening_);
+ std::swap(rpc_version_, other->rpc_version_);
+ std::swap(credentials_, other->credentials_);
+ std::swap(properties_, other->properties_);
+ 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 UserToBitHandshake::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = UserToBitHandshake_descriptor_;
+ metadata.reflection = UserToBitHandshake_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int RequestResults::kQueryIdFieldNumber;
+const int RequestResults::kMaximumResponsesFieldNumber;
+#endif // !_MSC_VER
+
+RequestResults::RequestResults()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void RequestResults::InitAsDefaultInstance() {
+ query_id_ = const_cast< ::exec::shared::QueryId*>(&::exec::shared::QueryId::default_instance());
+}
+
+RequestResults::RequestResults(const RequestResults& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void RequestResults::SharedCtor() {
+ _cached_size_ = 0;
+ query_id_ = NULL;
+ maximum_responses_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+RequestResults::~RequestResults() {
+ SharedDtor();
+}
+
+void RequestResults::SharedDtor() {
+ if (this != default_instance_) {
+ delete query_id_;
+ }
+}
+
+void RequestResults::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* RequestResults::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RequestResults_descriptor_;
+}
+
+const RequestResults& RequestResults::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+RequestResults* RequestResults::default_instance_ = NULL;
+
+RequestResults* RequestResults::New() const {
+ return new RequestResults;
+}
+
+void RequestResults::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_query_id()) {
+ if (query_id_ != NULL) query_id_->::exec::shared::QueryId::Clear();
+ }
+ maximum_responses_ = 0;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool RequestResults::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 .exec.shared.QueryId query_id = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_query_id()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_maximum_responses;
+ break;
+ }
+
+ // optional int32 maximum_responses = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_maximum_responses:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &maximum_responses_)));
+ set_has_maximum_responses();
+ } 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 RequestResults::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.shared.QueryId query_id = 1;
+ if (has_query_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->query_id(), output);
+ }
+
+ // optional int32 maximum_responses = 2;
+ if (has_maximum_responses()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->maximum_responses(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* RequestResults::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.shared.QueryId query_id = 1;
+ if (has_query_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->query_id(), target);
+ }
+
+ // optional int32 maximum_responses = 2;
+ if (has_maximum_responses()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->maximum_responses(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int RequestResults::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.shared.QueryId query_id = 1;
+ if (has_query_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->query_id());
+ }
+
+ // optional int32 maximum_responses = 2;
+ if (has_maximum_responses()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->maximum_responses());
+ }
+
+ }
+ 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 RequestResults::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const RequestResults* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const RequestResults*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void RequestResults::MergeFrom(const RequestResults& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_query_id()) {
+ mutable_query_id()->::exec::shared::QueryId::MergeFrom(from.query_id());
+ }
+ if (from.has_maximum_responses()) {
+ set_maximum_responses(from.maximum_responses());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void RequestResults::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void RequestResults::CopyFrom(const RequestResults& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool RequestResults::IsInitialized() const {
+
+ return true;
+}
+
+void RequestResults::Swap(RequestResults* other) {
+ if (other != this) {
+ std::swap(query_id_, other->query_id_);
+ std::swap(maximum_responses_, other->maximum_responses_);
+ 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 RequestResults::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = RequestResults_descriptor_;
+ metadata.reflection = RequestResults_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int RunQuery::kResultsModeFieldNumber;
+const int RunQuery::kTypeFieldNumber;
+const int RunQuery::kPlanFieldNumber;
+#endif // !_MSC_VER
+
+RunQuery::RunQuery()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void RunQuery::InitAsDefaultInstance() {
+}
+
+RunQuery::RunQuery(const RunQuery& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void RunQuery::SharedCtor() {
+ _cached_size_ = 0;
+ results_mode_ = 1;
+ type_ = 1;
+ plan_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+RunQuery::~RunQuery() {
+ SharedDtor();
+}
+
+void RunQuery::SharedDtor() {
+ if (plan_ != &::google::protobuf::internal::kEmptyString) {
+ delete plan_;
+ }
+ if (this != default_instance_) {
+ }
+}
+
+void RunQuery::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* RunQuery::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RunQuery_descriptor_;
+}
+
+const RunQuery& RunQuery::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+RunQuery* RunQuery::default_instance_ = NULL;
+
+RunQuery* RunQuery::New() const {
+ return new RunQuery;
+}
+
+void RunQuery::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ results_mode_ = 1;
+ type_ = 1;
+ if (has_plan()) {
+ if (plan_ != &::google::protobuf::internal::kEmptyString) {
+ plan_->clear();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool RunQuery::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 .exec.user.QueryResultsMode results_mode = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::user::QueryResultsMode_IsValid(value)) {
+ set_results_mode(static_cast< ::exec::user::QueryResultsMode >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(1, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_type;
+ break;
+ }
+
+ // optional .exec.user.QueryType type = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_type:
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::user::QueryType_IsValid(value)) {
+ set_type(static_cast< ::exec::user::QueryType >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(2, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_plan;
+ break;
+ }
+
+ // optional string plan = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_plan:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_plan()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->plan().data(), this->plan().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 RunQuery::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.user.QueryResultsMode results_mode = 1;
+ if (has_results_mode()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 1, this->results_mode(), output);
+ }
+
+ // optional .exec.user.QueryType type = 2;
+ if (has_type()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 2, this->type(), output);
+ }
+
+ // optional string plan = 3;
+ if (has_plan()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->plan().data(), this->plan().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 3, this->plan(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* RunQuery::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.user.QueryResultsMode results_mode = 1;
+ if (has_results_mode()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 1, this->results_mode(), target);
+ }
+
+ // optional .exec.user.QueryType type = 2;
+ if (has_type()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 2, this->type(), target);
+ }
+
+ // optional string plan = 3;
+ if (has_plan()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->plan().data(), this->plan().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 3, this->plan(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int RunQuery::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.user.QueryResultsMode results_mode = 1;
+ if (has_results_mode()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->results_mode());
+ }
+
+ // optional .exec.user.QueryType type = 2;
+ if (has_type()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
+ }
+
+ // optional string plan = 3;
+ if (has_plan()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->plan());
+ }
+
+ }
+ 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 RunQuery::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const RunQuery* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const RunQuery*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void RunQuery::MergeFrom(const RunQuery& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_results_mode()) {
+ set_results_mode(from.results_mode());
+ }
+ if (from.has_type()) {
+ set_type(from.type());
+ }
+ if (from.has_plan()) {
+ set_plan(from.plan());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void RunQuery::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void RunQuery::CopyFrom(const RunQuery& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool RunQuery::IsInitialized() const {
+
+ return true;
+}
+
+void RunQuery::Swap(RunQuery* other) {
+ if (other != this) {
+ std::swap(results_mode_, other->results_mode_);
+ std::swap(type_, other->type_);
+ std::swap(plan_, other->plan_);
+ 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 RunQuery::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = RunQuery_descriptor_;
+ metadata.reflection = RunQuery_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int BitToUserHandshake::kRpcVersionFieldNumber;
+#endif // !_MSC_VER
+
+BitToUserHandshake::BitToUserHandshake()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void BitToUserHandshake::InitAsDefaultInstance() {
+}
+
+BitToUserHandshake::BitToUserHandshake(const BitToUserHandshake& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void BitToUserHandshake::SharedCtor() {
+ _cached_size_ = 0;
+ rpc_version_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+BitToUserHandshake::~BitToUserHandshake() {
+ SharedDtor();
+}
+
+void BitToUserHandshake::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void BitToUserHandshake::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* BitToUserHandshake::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return BitToUserHandshake_descriptor_;
+}
+
+const BitToUserHandshake& BitToUserHandshake::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+BitToUserHandshake* BitToUserHandshake::default_instance_ = NULL;
+
+BitToUserHandshake* BitToUserHandshake::New() const {
+ return new BitToUserHandshake;
+}
+
+void BitToUserHandshake::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ rpc_version_ = 0;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool BitToUserHandshake::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 int32 rpc_version = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &rpc_version_)));
+ set_has_rpc_version();
+ } 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 BitToUserHandshake::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int32 rpc_version = 2;
+ if (has_rpc_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->rpc_version(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* BitToUserHandshake::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 rpc_version = 2;
+ if (has_rpc_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->rpc_version(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int BitToUserHandshake::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int32 rpc_version = 2;
+ if (has_rpc_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->rpc_version());
+ }
+
+ }
+ 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 BitToUserHandshake::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const BitToUserHandshake* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const BitToUserHandshake*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void BitToUserHandshake::MergeFrom(const BitToUserHandshake& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_rpc_version()) {
+ set_rpc_version(from.rpc_version());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void BitToUserHandshake::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void BitToUserHandshake::CopyFrom(const BitToUserHandshake& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool BitToUserHandshake::IsInitialized() const {
+
+ return true;
+}
+
+void BitToUserHandshake::Swap(BitToUserHandshake* other) {
+ if (other != this) {
+ std::swap(rpc_version_, other->rpc_version_);
+ 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 BitToUserHandshake::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = BitToUserHandshake_descriptor_;
+ metadata.reflection = BitToUserHandshake_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int NodeStatus::kNodeIdFieldNumber;
+const int NodeStatus::kMemoryFootprintFieldNumber;
+#endif // !_MSC_VER
+
+NodeStatus::NodeStatus()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void NodeStatus::InitAsDefaultInstance() {
+}
+
+NodeStatus::NodeStatus(const NodeStatus& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void NodeStatus::SharedCtor() {
+ _cached_size_ = 0;
+ node_id_ = 0;
+ memory_footprint_ = GOOGLE_LONGLONG(0);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+NodeStatus::~NodeStatus() {
+ SharedDtor();
+}
+
+void NodeStatus::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void NodeStatus::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* NodeStatus::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return NodeStatus_descriptor_;
+}
+
+const NodeStatus& NodeStatus::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+NodeStatus* NodeStatus::default_instance_ = NULL;
+
+NodeStatus* NodeStatus::New() const {
+ return new NodeStatus;
+}
+
+void NodeStatus::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ node_id_ = 0;
+ memory_footprint_ = GOOGLE_LONGLONG(0);
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool NodeStatus::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 int32 node_id = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &node_id_)));
+ set_has_node_id();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_memory_footprint;
+ break;
+ }
+
+ // optional int64 memory_footprint = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_memory_footprint:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &memory_footprint_)));
+ set_has_memory_footprint();
+ } 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 NodeStatus::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int32 node_id = 1;
+ if (has_node_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->node_id(), output);
+ }
+
+ // optional int64 memory_footprint = 2;
+ if (has_memory_footprint()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->memory_footprint(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* NodeStatus::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 node_id = 1;
+ if (has_node_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->node_id(), target);
+ }
+
+ // optional int64 memory_footprint = 2;
+ if (has_memory_footprint()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->memory_footprint(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int NodeStatus::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int32 node_id = 1;
+ if (has_node_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->node_id());
+ }
+
+ // optional int64 memory_footprint = 2;
+ if (has_memory_footprint()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->memory_footprint());
+ }
+
+ }
+ 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 NodeStatus::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const NodeStatus* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const NodeStatus*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void NodeStatus::MergeFrom(const NodeStatus& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_node_id()) {
+ set_node_id(from.node_id());
+ }
+ if (from.has_memory_footprint()) {
+ set_memory_footprint(from.memory_footprint());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void NodeStatus::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void NodeStatus::CopyFrom(const NodeStatus& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool NodeStatus::IsInitialized() const {
+
+ return true;
+}
+
+void NodeStatus::Swap(NodeStatus* other) {
+ if (other != this) {
+ std::swap(node_id_, other->node_id_);
+ std::swap(memory_footprint_, other->memory_footprint_);
+ 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 NodeStatus::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = NodeStatus_descriptor_;
+ metadata.reflection = NodeStatus_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+const ::google::protobuf::EnumDescriptor* QueryResult_QueryState_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return QueryResult_QueryState_descriptor_;
+}
+bool QueryResult_QueryState_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#ifndef _MSC_VER
+const QueryResult_QueryState QueryResult::PENDING;
+const QueryResult_QueryState QueryResult::RUNNING;
+const QueryResult_QueryState QueryResult::COMPLETED;
+const QueryResult_QueryState QueryResult::CANCELED;
+const QueryResult_QueryState QueryResult::FAILED;
+const QueryResult_QueryState QueryResult::UNKNOWN_QUERY;
+const QueryResult_QueryState QueryResult::QueryState_MIN;
+const QueryResult_QueryState QueryResult::QueryState_MAX;
+const int QueryResult::QueryState_ARRAYSIZE;
+#endif // _MSC_VER
+#ifndef _MSC_VER
+const int QueryResult::kQueryStateFieldNumber;
+const int QueryResult::kQueryIdFieldNumber;
+const int QueryResult::kIsLastChunkFieldNumber;
+const int QueryResult::kRowCountFieldNumber;
+const int QueryResult::kRecordsScanFieldNumber;
+const int QueryResult::kRecordsErrorFieldNumber;
+const int QueryResult::kSubmissionTimeFieldNumber;
+const int QueryResult::kNodeStatusFieldNumber;
+const int QueryResult::kErrorFieldNumber;
+const int QueryResult::kDefFieldNumber;
+const int QueryResult::kSchemaChangedFieldNumber;
+#endif // !_MSC_VER
+
+QueryResult::QueryResult()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void QueryResult::InitAsDefaultInstance() {
+ query_id_ = const_cast< ::exec::shared::QueryId*>(&::exec::shared::QueryId::default_instance());
+ def_ = const_cast< ::exec::shared::RecordBatchDef*>(&::exec::shared::RecordBatchDef::default_instance());
+}
+
+QueryResult::QueryResult(const QueryResult& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void QueryResult::SharedCtor() {
+ _cached_size_ = 0;
+ query_state_ = 0;
+ query_id_ = NULL;
+ is_last_chunk_ = false;
+ row_count_ = 0;
+ records_scan_ = GOOGLE_LONGLONG(0);
+ records_error_ = GOOGLE_LONGLONG(0);
+ submission_time_ = GOOGLE_LONGLONG(0);
+ def_ = NULL;
+ schema_changed_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+QueryResult::~QueryResult() {
+ SharedDtor();
+}
+
+void QueryResult::SharedDtor() {
+ if (this != default_instance_) {
+ delete query_id_;
+ delete def_;
+ }
+}
+
+void QueryResult::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* QueryResult::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return QueryResult_descriptor_;
+}
+
+const QueryResult& QueryResult::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_User_2eproto();
+ return *default_instance_;
+}
+
+QueryResult* QueryResult::default_instance_ = NULL;
+
+QueryResult* QueryResult::New() const {
+ return new QueryResult;
+}
+
+void QueryResult::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ query_state_ = 0;
+ if (has_query_id()) {
+ if (query_id_ != NULL) query_id_->::exec::shared::QueryId::Clear();
+ }
+ is_last_chunk_ = false;
+ row_count_ = 0;
+ records_scan_ = GOOGLE_LONGLONG(0);
+ records_error_ = GOOGLE_LONGLONG(0);
+ submission_time_ = GOOGLE_LONGLONG(0);
+ }
+ if (_has_bits_[9 / 32] & (0xffu << (9 % 32))) {
+ if (has_def()) {
+ if (def_ != NULL) def_->::exec::shared::RecordBatchDef::Clear();
+ }
+ schema_changed_ = false;
+ }
+ node_status_.Clear();
+ error_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool QueryResult::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 .exec.user.QueryResult.QueryState query_state = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::user::QueryResult_QueryState_IsValid(value)) {
+ set_query_state(static_cast< ::exec::user::QueryResult_QueryState >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(1, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(18)) goto parse_query_id;
+ break;
+ }
+
+ // optional .exec.shared.QueryId query_id = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_query_id:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_query_id()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_is_last_chunk;
+ break;
+ }
+
+ // optional bool is_last_chunk = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_is_last_chunk:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &is_last_chunk_)));
+ set_has_is_last_chunk();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(32)) goto parse_row_count;
+ break;
+ }
+
+ // optional int32 row_count = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_row_count:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &row_count_)));
+ set_has_row_count();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(40)) goto parse_records_scan;
+ break;
+ }
+
+ // optional int64 records_scan = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_records_scan:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &records_scan_)));
+ set_has_records_scan();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(48)) goto parse_records_error;
+ break;
+ }
+
+ // optional int64 records_error = 6;
+ case 6: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_records_error:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &records_error_)));
+ set_has_records_error();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(56)) goto parse_submission_time;
+ break;
+ }
+
+ // optional int64 submission_time = 7;
+ case 7: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_submission_time:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &submission_time_)));
+ set_has_submission_time();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(66)) goto parse_node_status;
+ break;
+ }
+
+ // repeated .exec.user.NodeStatus node_status = 8;
+ case 8: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_node_status:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_node_status()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(66)) goto parse_node_status;
+ if (input->ExpectTag(74)) goto parse_error;
+ break;
+ }
+
+ // repeated .exec.shared.DrillPBError error = 9;
+ case 9: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_error:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_error()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(74)) goto parse_error;
+ if (input->ExpectTag(82)) goto parse_def;
+ break;
+ }
+
+ // optional .exec.shared.RecordBatchDef def = 10;
+ case 10: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_def:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_def()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(88)) goto parse_schema_changed;
+ break;
+ }
+
+ // optional bool schema_changed = 11;
+ case 11: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_schema_changed:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &schema_changed_)));
+ set_has_schema_changed();
+ } 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 QueryResult::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.user.QueryResult.QueryState query_state = 1;
+ if (has_query_state()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 1, this->query_state(), output);
+ }
+
+ // optional .exec.shared.QueryId query_id = 2;
+ if (has_query_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, this->query_id(), output);
+ }
+
+ // optional bool is_last_chunk = 3;
+ if (has_is_last_chunk()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->is_last_chunk(), output);
+ }
+
+ // optional int32 row_count = 4;
+ if (has_row_count()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->row_count(), output);
+ }
+
+ // optional int64 records_scan = 5;
+ if (has_records_scan()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->records_scan(), output);
+ }
+
+ // optional int64 records_error = 6;
+ if (has_records_error()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->records_error(), output);
+ }
+
+ // optional int64 submission_time = 7;
+ if (has_submission_time()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(7, this->submission_time(), output);
+ }
+
+ // repeated .exec.user.NodeStatus node_status = 8;
+ for (int i = 0; i < this->node_status_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 8, this->node_status(i), output);
+ }
+
+ // repeated .exec.shared.DrillPBError error = 9;
+ for (int i = 0; i < this->error_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 9, this->error(i), output);
+ }
+
+ // optional .exec.shared.RecordBatchDef def = 10;
+ if (has_def()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 10, this->def(), output);
+ }
+
+ // optional bool schema_changed = 11;
+ if (has_schema_changed()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(11, this->schema_changed(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* QueryResult::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.user.QueryResult.QueryState query_state = 1;
+ if (has_query_state()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 1, this->query_state(), target);
+ }
+
+ // optional .exec.shared.QueryId query_id = 2;
+ if (has_query_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 2, this->query_id(), target);
+ }
+
+ // optional bool is_last_chunk = 3;
+ if (has_is_last_chunk()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->is_last_chunk(), target);
+ }
+
+ // optional int32 row_count = 4;
+ if (has_row_count()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->row_count(), target);
+ }
+
+ // optional int64 records_scan = 5;
+ if (has_records_scan()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->records_scan(), target);
+ }
+
+ // optional int64 records_error = 6;
+ if (has_records_error()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->records_error(), target);
+ }
+
+ // optional int64 submission_time = 7;
+ if (has_submission_time()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(7, this->submission_time(), target);
+ }
+
+ // repeated .exec.user.NodeStatus node_status = 8;
+ for (int i = 0; i < this->node_status_size(); i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 8, this->node_status(i), target);
+ }
+
+ // repeated .exec.shared.DrillPBError error = 9;
+ for (int i = 0; i < this->error_size(); i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 9, this->error(i), target);
+ }
+
+ // optional .exec.shared.RecordBatchDef def = 10;
+ if (has_def()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 10, this->def(), target);
+ }
+
+ // optional bool schema_changed = 11;
+ if (has_schema_changed()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(11, this->schema_changed(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int QueryResult::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.user.QueryResult.QueryState query_state = 1;
+ if (has_query_state()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->query_state());
+ }
+
+ // optional .exec.shared.QueryId query_id = 2;
+ if (has_query_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->query_id());
+ }
+
+ // optional bool is_last_chunk = 3;
+ if (has_is_last_chunk()) {
+ total_size += 1 + 1;
+ }
+
+ // optional int32 row_count = 4;
+ if (has_row_count()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->row_count());
+ }
+
+ // optional int64 records_scan = 5;
+ if (has_records_scan()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->records_scan());
+ }
+
+ // optional int64 records_error = 6;
+ if (has_records_error()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->records_error());
+ }
+
+ // optional int64 submission_time = 7;
+ if (has_submission_time()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->submission_time());
+ }
+
+ }
+ if (_has_bits_[9 / 32] & (0xffu << (9 % 32))) {
+ // optional .exec.shared.RecordBatchDef def = 10;
+ if (has_def()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->def());
+ }
+
+ // optional bool schema_changed = 11;
+ if (has_schema_changed()) {
+ total_size += 1 + 1;
+ }
+
+ }
+ // repeated .exec.user.NodeStatus node_status = 8;
+ total_size += 1 * this->node_status_size();
+ for (int i = 0; i < this->node_status_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->node_status(i));
+ }
+
+ // repeated .exec.shared.DrillPBError error = 9;
+ total_size += 1 * this->error_size();
+ for (int i = 0; i < this->error_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->error(i));
+ }
+
+ 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 QueryResult::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const QueryResult* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const QueryResult*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void QueryResult::MergeFrom(const QueryResult& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ node_status_.MergeFrom(from.node_status_);
+ error_.MergeFrom(from.error_);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_query_state()) {
+ set_query_state(from.query_state());
+ }
+ if (from.has_query_id()) {
+ mutable_query_id()->::exec::shared::QueryId::MergeFrom(from.query_id());
+ }
+ if (from.has_is_last_chunk()) {
+ set_is_last_chunk(from.is_last_chunk());
+ }
+ if (from.has_row_count()) {
+ set_row_count(from.row_count());
+ }
+ if (from.has_records_scan()) {
+ set_records_scan(from.records_scan());
+ }
+ if (from.has_records_error()) {
+ set_records_error(from.records_error());
+ }
+ if (from.has_submission_time()) {
+ set_submission_time(from.submission_time());
+ }
+ }
+ if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
+ if (from.has_def()) {
+ mutable_def()->::exec::shared::RecordBatchDef::MergeFrom(from.def());
+ }
+ if (from.has_schema_changed()) {
+ set_schema_changed(from.schema_changed());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void QueryResult::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void QueryResult::CopyFrom(const QueryResult& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool QueryResult::IsInitialized() const {
+
+ return true;
+}
+
+void QueryResult::Swap(QueryResult* other) {
+ if (other != this) {
+ std::swap(query_state_, other->query_state_);
+ std::swap(query_id_, other->query_id_);
+ std::swap(is_last_chunk_, other->is_last_chunk_);
+ std::swap(row_count_, other->row_count_);
+ std::swap(records_scan_, other->records_scan_);
+ std::swap(records_error_, other->records_error_);
+ std::swap(submission_time_, other->submission_time_);
+ node_status_.Swap(&other->node_status_);
+ error_.Swap(&other->error_);
+ std::swap(def_, other->def_);
+ std::swap(schema_changed_, other->schema_changed_);
+ 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 QueryResult::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = QueryResult_descriptor_;
+ metadata.reflection = QueryResult_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace user
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/UserBitShared.pb.cc b/contrib/native/client/src/protobuf/UserBitShared.pb.cc
new file mode 100644
index 000000000..1a0b634a8
--- /dev/null
+++ b/contrib/native/client/src/protobuf/UserBitShared.pb.cc
@@ -0,0 +1,2596 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: UserBitShared.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "UserBitShared.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace shared {
+
+namespace {
+
+const ::google::protobuf::Descriptor* UserCredentials_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ UserCredentials_reflection_ = NULL;
+const ::google::protobuf::Descriptor* QueryId_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ QueryId_reflection_ = NULL;
+const ::google::protobuf::Descriptor* DrillPBError_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ DrillPBError_reflection_ = NULL;
+const ::google::protobuf::Descriptor* ParsingError_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ ParsingError_reflection_ = NULL;
+const ::google::protobuf::Descriptor* RecordBatchDef_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ RecordBatchDef_reflection_ = NULL;
+const ::google::protobuf::Descriptor* NamePart_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ NamePart_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* NamePart_Type_descriptor_ = NULL;
+const ::google::protobuf::Descriptor* SerializedField_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ SerializedField_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* RpcChannel_descriptor_ = NULL;
+
+} // namespace
+
+
+void protobuf_AssignDesc_UserBitShared_2eproto() {
+ protobuf_AddDesc_UserBitShared_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "UserBitShared.proto");
+ GOOGLE_CHECK(file != NULL);
+ UserCredentials_descriptor_ = file->message_type(0);
+ static const int UserCredentials_offsets_[1] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserCredentials, user_name_),
+ };
+ UserCredentials_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ UserCredentials_descriptor_,
+ UserCredentials::default_instance_,
+ UserCredentials_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserCredentials, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserCredentials, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(UserCredentials));
+ QueryId_descriptor_ = file->message_type(1);
+ static const int QueryId_offsets_[2] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryId, part1_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryId, part2_),
+ };
+ QueryId_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ QueryId_descriptor_,
+ QueryId::default_instance_,
+ QueryId_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryId, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryId, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(QueryId));
+ DrillPBError_descriptor_ = file->message_type(2);
+ static const int DrillPBError_offsets_[5] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillPBError, error_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillPBError, endpoint_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillPBError, error_type_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillPBError, message_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillPBError, parsing_error_),
+ };
+ DrillPBError_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ DrillPBError_descriptor_,
+ DrillPBError::default_instance_,
+ DrillPBError_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillPBError, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DrillPBError, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(DrillPBError));
+ ParsingError_descriptor_ = file->message_type(3);
+ static const int ParsingError_offsets_[4] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParsingError, start_column_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParsingError, start_row_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParsingError, end_column_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParsingError, end_row_),
+ };
+ ParsingError_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ ParsingError_descriptor_,
+ ParsingError::default_instance_,
+ ParsingError_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParsingError, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParsingError, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(ParsingError));
+ RecordBatchDef_descriptor_ = file->message_type(4);
+ static const int RecordBatchDef_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RecordBatchDef, record_count_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RecordBatchDef, field_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RecordBatchDef, is_selection_vector_2_),
+ };
+ RecordBatchDef_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ RecordBatchDef_descriptor_,
+ RecordBatchDef::default_instance_,
+ RecordBatchDef_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RecordBatchDef, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RecordBatchDef, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(RecordBatchDef));
+ NamePart_descriptor_ = file->message_type(5);
+ static const int NamePart_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NamePart, type_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NamePart, name_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NamePart, child_),
+ };
+ NamePart_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ NamePart_descriptor_,
+ NamePart::default_instance_,
+ NamePart_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NamePart, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NamePart, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(NamePart));
+ NamePart_Type_descriptor_ = NamePart_descriptor_->enum_type(0);
+ SerializedField_descriptor_ = file->message_type(6);
+ static const int SerializedField_offsets_[7] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, major_type_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, name_part_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, child_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, value_count_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, var_byte_length_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, group_count_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, buffer_length_),
+ };
+ SerializedField_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ SerializedField_descriptor_,
+ SerializedField::default_instance_,
+ SerializedField_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SerializedField, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(SerializedField));
+ RpcChannel_descriptor_ = file->enum_type(0);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_UserBitShared_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ UserCredentials_descriptor_, &UserCredentials::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ QueryId_descriptor_, &QueryId::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ DrillPBError_descriptor_, &DrillPBError::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ ParsingError_descriptor_, &ParsingError::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ RecordBatchDef_descriptor_, &RecordBatchDef::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ NamePart_descriptor_, &NamePart::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ SerializedField_descriptor_, &SerializedField::default_instance());
+}
+
+} // namespace
+
+void protobuf_ShutdownFile_UserBitShared_2eproto() {
+ delete UserCredentials::default_instance_;
+ delete UserCredentials_reflection_;
+ delete QueryId::default_instance_;
+ delete QueryId_reflection_;
+ delete DrillPBError::default_instance_;
+ delete DrillPBError_reflection_;
+ delete ParsingError::default_instance_;
+ delete ParsingError_reflection_;
+ delete RecordBatchDef::default_instance_;
+ delete RecordBatchDef_reflection_;
+ delete NamePart::default_instance_;
+ delete NamePart_reflection_;
+ delete SerializedField::default_instance_;
+ delete SerializedField_reflection_;
+}
+
+void protobuf_AddDesc_UserBitShared_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ ::common::protobuf_AddDesc_Types_2eproto();
+ ::exec::protobuf_AddDesc_Coordination_2eproto();
+ ::exec::protobuf_AddDesc_SchemaDef_2eproto();
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ "\n\023UserBitShared.proto\022\013exec.shared\032\013Type"
+ "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\"\241\001\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"
+ "\rparsing_error\030\005 \003(\0132\031.exec.shared.Parsi"
+ "ngError\"\\\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\"r\n\016RecordBatchDef\022"
+ "\024\n\014record_count\030\001 \001(\005\022+\n\005field\030\002 \003(\0132\034.e"
+ "xec.shared.SerializedField\022\035\n\025is_selecti"
+ "on_vector_2\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.shared.Name"
+ "Part\"\033\n\004Type\022\010\n\004NAME\020\000\022\t\n\005ARRAY\020\001\"\351\001\n\017Se"
+ "rializedField\022%\n\nmajor_type\030\001 \001(\0132\021.comm"
+ "on.MajorType\022(\n\tname_part\030\002 \001(\0132\025.exec.s"
+ "hared.NamePart\022+\n\005child\030\003 \003(\0132\034.exec.sha"
+ "red.SerializedField\022\023\n\013value_count\030\004 \001(\005"
+ "\022\027\n\017var_byte_length\030\005 \001(\005\022\023\n\013group_count"
+ "\030\006 \001(\005\022\025\n\rbuffer_length\030\007 \001(\005*5\n\nRpcChan"
+ "nel\022\017\n\013BIT_CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004US"
+ "ER\020\002B.\n\033org.apache.drill.exec.protoB\rUse"
+ "rBitSharedH\001", 1012);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "UserBitShared.proto", &protobuf_RegisterTypes);
+ UserCredentials::default_instance_ = new UserCredentials();
+ QueryId::default_instance_ = new QueryId();
+ DrillPBError::default_instance_ = new DrillPBError();
+ ParsingError::default_instance_ = new ParsingError();
+ RecordBatchDef::default_instance_ = new RecordBatchDef();
+ NamePart::default_instance_ = new NamePart();
+ SerializedField::default_instance_ = new SerializedField();
+ UserCredentials::default_instance_->InitAsDefaultInstance();
+ QueryId::default_instance_->InitAsDefaultInstance();
+ DrillPBError::default_instance_->InitAsDefaultInstance();
+ ParsingError::default_instance_->InitAsDefaultInstance();
+ RecordBatchDef::default_instance_->InitAsDefaultInstance();
+ NamePart::default_instance_->InitAsDefaultInstance();
+ SerializedField::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_UserBitShared_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_UserBitShared_2eproto {
+ StaticDescriptorInitializer_UserBitShared_2eproto() {
+ protobuf_AddDesc_UserBitShared_2eproto();
+ }
+} static_descriptor_initializer_UserBitShared_2eproto_;
+const ::google::protobuf::EnumDescriptor* RpcChannel_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RpcChannel_descriptor_;
+}
+bool RpcChannel_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int UserCredentials::kUserNameFieldNumber;
+#endif // !_MSC_VER
+
+UserCredentials::UserCredentials()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void UserCredentials::InitAsDefaultInstance() {
+}
+
+UserCredentials::UserCredentials(const UserCredentials& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void UserCredentials::SharedCtor() {
+ _cached_size_ = 0;
+ user_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+UserCredentials::~UserCredentials() {
+ SharedDtor();
+}
+
+void UserCredentials::SharedDtor() {
+ if (user_name_ != &::google::protobuf::internal::kEmptyString) {
+ delete user_name_;
+ }
+ if (this != default_instance_) {
+ }
+}
+
+void UserCredentials::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* UserCredentials::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return UserCredentials_descriptor_;
+}
+
+const UserCredentials& UserCredentials::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_UserBitShared_2eproto();
+ return *default_instance_;
+}
+
+UserCredentials* UserCredentials::default_instance_ = NULL;
+
+UserCredentials* UserCredentials::New() const {
+ return new UserCredentials;
+}
+
+void UserCredentials::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_user_name()) {
+ if (user_name_ != &::google::protobuf::internal::kEmptyString) {
+ user_name_->clear();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool UserCredentials::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 string user_name = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_user_name()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->user_name().data(), this->user_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 UserCredentials::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional string user_name = 1;
+ if (has_user_name()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->user_name().data(), this->user_name().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 1, this->user_name(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* UserCredentials::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string user_name = 1;
+ if (has_user_name()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->user_name().data(), this->user_name().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 1, this->user_name(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int UserCredentials::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional string user_name = 1;
+ if (has_user_name()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->user_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 UserCredentials::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const UserCredentials* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const UserCredentials*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void UserCredentials::MergeFrom(const UserCredentials& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_user_name()) {
+ set_user_name(from.user_name());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void UserCredentials::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void UserCredentials::CopyFrom(const UserCredentials& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool UserCredentials::IsInitialized() const {
+
+ return true;
+}
+
+void UserCredentials::Swap(UserCredentials* other) {
+ if (other != this) {
+ std::swap(user_name_, other->user_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 UserCredentials::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = UserCredentials_descriptor_;
+ metadata.reflection = UserCredentials_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int QueryId::kPart1FieldNumber;
+const int QueryId::kPart2FieldNumber;
+#endif // !_MSC_VER
+
+QueryId::QueryId()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void QueryId::InitAsDefaultInstance() {
+}
+
+QueryId::QueryId(const QueryId& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void QueryId::SharedCtor() {
+ _cached_size_ = 0;
+ part1_ = GOOGLE_LONGLONG(0);
+ part2_ = GOOGLE_LONGLONG(0);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+QueryId::~QueryId() {
+ SharedDtor();
+}
+
+void QueryId::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void QueryId::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* QueryId::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return QueryId_descriptor_;
+}
+
+const QueryId& QueryId::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_UserBitShared_2eproto();
+ return *default_instance_;
+}
+
+QueryId* QueryId::default_instance_ = NULL;
+
+QueryId* QueryId::New() const {
+ return new QueryId;
+}
+
+void QueryId::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ part1_ = GOOGLE_LONGLONG(0);
+ part2_ = GOOGLE_LONGLONG(0);
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool QueryId::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 sfixed64 part1 = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
+ input, &part1_)));
+ set_has_part1();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(17)) goto parse_part2;
+ break;
+ }
+
+ // optional sfixed64 part2 = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
+ parse_part2:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
+ input, &part2_)));
+ set_has_part2();
+ } 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 QueryId::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional sfixed64 part1 = 1;
+ if (has_part1()) {
+ ::google::protobuf::internal::WireFormatLite::WriteSFixed64(1, this->part1(), output);
+ }
+
+ // optional sfixed64 part2 = 2;
+ if (has_part2()) {
+ ::google::protobuf::internal::WireFormatLite::WriteSFixed64(2, this->part2(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* QueryId::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional sfixed64 part1 = 1;
+ if (has_part1()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(1, this->part1(), target);
+ }
+
+ // optional sfixed64 part2 = 2;
+ if (has_part2()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(2, this->part2(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int QueryId::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional sfixed64 part1 = 1;
+ if (has_part1()) {
+ total_size += 1 + 8;
+ }
+
+ // optional sfixed64 part2 = 2;
+ if (has_part2()) {
+ total_size += 1 + 8;
+ }
+
+ }
+ 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 QueryId::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const QueryId* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const QueryId*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void QueryId::MergeFrom(const QueryId& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_part1()) {
+ set_part1(from.part1());
+ }
+ if (from.has_part2()) {
+ set_part2(from.part2());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void QueryId::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void QueryId::CopyFrom(const QueryId& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool QueryId::IsInitialized() const {
+
+ return true;
+}
+
+void QueryId::Swap(QueryId* other) {
+ if (other != this) {
+ std::swap(part1_, other->part1_);
+ std::swap(part2_, other->part2_);
+ 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 QueryId::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = QueryId_descriptor_;
+ metadata.reflection = QueryId_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int DrillPBError::kErrorIdFieldNumber;
+const int DrillPBError::kEndpointFieldNumber;
+const int DrillPBError::kErrorTypeFieldNumber;
+const int DrillPBError::kMessageFieldNumber;
+const int DrillPBError::kParsingErrorFieldNumber;
+#endif // !_MSC_VER
+
+DrillPBError::DrillPBError()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void DrillPBError::InitAsDefaultInstance() {
+ endpoint_ = const_cast< ::exec::DrillbitEndpoint*>(&::exec::DrillbitEndpoint::default_instance());
+}
+
+DrillPBError::DrillPBError(const DrillPBError& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void DrillPBError::SharedCtor() {
+ _cached_size_ = 0;
+ error_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ endpoint_ = NULL;
+ error_type_ = 0;
+ message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+DrillPBError::~DrillPBError() {
+ SharedDtor();
+}
+
+void DrillPBError::SharedDtor() {
+ if (error_id_ != &::google::protobuf::internal::kEmptyString) {
+ delete error_id_;
+ }
+ if (message_ != &::google::protobuf::internal::kEmptyString) {
+ delete message_;
+ }
+ if (this != default_instance_) {
+ delete endpoint_;
+ }
+}
+
+void DrillPBError::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* DrillPBError::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return DrillPBError_descriptor_;
+}
+
+const DrillPBError& DrillPBError::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_UserBitShared_2eproto();
+ return *default_instance_;
+}
+
+DrillPBError* DrillPBError::default_instance_ = NULL;
+
+DrillPBError* DrillPBError::New() const {
+ return new DrillPBError;
+}
+
+void DrillPBError::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_error_id()) {
+ if (error_id_ != &::google::protobuf::internal::kEmptyString) {
+ error_id_->clear();
+ }
+ }
+ if (has_endpoint()) {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ }
+ error_type_ = 0;
+ if (has_message()) {
+ if (message_ != &::google::protobuf::internal::kEmptyString) {
+ message_->clear();
+ }
+ }
+ }
+ parsing_error_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool DrillPBError::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 string error_id = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ 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(18)) goto parse_endpoint;
+ break;
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_endpoint:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_endpoint()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_error_type;
+ break;
+ }
+
+ // optional int32 error_type = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_error_type:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &error_type_)));
+ set_has_error_type();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(34)) goto parse_message;
+ break;
+ }
+
+ // optional string message = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_message:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_message()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->message().data(), this->message().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(42)) goto parse_parsing_error;
+ break;
+ }
+
+ // repeated .exec.shared.ParsingError parsing_error = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_parsing_error:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_parsing_error()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(42)) goto parse_parsing_error;
+ 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 DrillPBError::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional string error_id = 1;
+ 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(
+ 1, this->error_id(), output);
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 2;
+ if (has_endpoint()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, this->endpoint(), output);
+ }
+
+ // optional int32 error_type = 3;
+ if (has_error_type()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->error_type(), output);
+ }
+
+ // optional string message = 4;
+ if (has_message()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->message().data(), this->message().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 4, this->message(), output);
+ }
+
+ // repeated .exec.shared.ParsingError parsing_error = 5;
+ for (int i = 0; i < this->parsing_error_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 5, this->parsing_error(i), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* DrillPBError::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string error_id = 1;
+ 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(
+ 1, this->error_id(), target);
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 2;
+ if (has_endpoint()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 2, this->endpoint(), target);
+ }
+
+ // optional int32 error_type = 3;
+ if (has_error_type()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->error_type(), target);
+ }
+
+ // optional string message = 4;
+ if (has_message()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->message().data(), this->message().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 4, this->message(), target);
+ }
+
+ // repeated .exec.shared.ParsingError parsing_error = 5;
+ for (int i = 0; i < this->parsing_error_size(); i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 5, this->parsing_error(i), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int DrillPBError::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional string error_id = 1;
+ if (has_error_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->error_id());
+ }
+
+ // optional .exec.DrillbitEndpoint endpoint = 2;
+ if (has_endpoint()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->endpoint());
+ }
+
+ // optional int32 error_type = 3;
+ if (has_error_type()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->error_type());
+ }
+
+ // optional string message = 4;
+ if (has_message()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->message());
+ }
+
+ }
+ // repeated .exec.shared.ParsingError parsing_error = 5;
+ total_size += 1 * this->parsing_error_size();
+ for (int i = 0; i < this->parsing_error_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->parsing_error(i));
+ }
+
+ 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 DrillPBError::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const DrillPBError* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const DrillPBError*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void DrillPBError::MergeFrom(const DrillPBError& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ parsing_error_.MergeFrom(from.parsing_error_);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_error_id()) {
+ set_error_id(from.error_id());
+ }
+ if (from.has_endpoint()) {
+ mutable_endpoint()->::exec::DrillbitEndpoint::MergeFrom(from.endpoint());
+ }
+ if (from.has_error_type()) {
+ set_error_type(from.error_type());
+ }
+ if (from.has_message()) {
+ set_message(from.message());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void DrillPBError::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void DrillPBError::CopyFrom(const DrillPBError& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool DrillPBError::IsInitialized() const {
+
+ return true;
+}
+
+void DrillPBError::Swap(DrillPBError* other) {
+ if (other != this) {
+ std::swap(error_id_, other->error_id_);
+ std::swap(endpoint_, other->endpoint_);
+ std::swap(error_type_, other->error_type_);
+ std::swap(message_, other->message_);
+ parsing_error_.Swap(&other->parsing_error_);
+ 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 DrillPBError::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = DrillPBError_descriptor_;
+ metadata.reflection = DrillPBError_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int ParsingError::kStartColumnFieldNumber;
+const int ParsingError::kStartRowFieldNumber;
+const int ParsingError::kEndColumnFieldNumber;
+const int ParsingError::kEndRowFieldNumber;
+#endif // !_MSC_VER
+
+ParsingError::ParsingError()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void ParsingError::InitAsDefaultInstance() {
+}
+
+ParsingError::ParsingError(const ParsingError& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void ParsingError::SharedCtor() {
+ _cached_size_ = 0;
+ start_column_ = 0;
+ start_row_ = 0;
+ end_column_ = 0;
+ end_row_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+ParsingError::~ParsingError() {
+ SharedDtor();
+}
+
+void ParsingError::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void ParsingError::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* ParsingError::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return ParsingError_descriptor_;
+}
+
+const ParsingError& ParsingError::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_UserBitShared_2eproto();
+ return *default_instance_;
+}
+
+ParsingError* ParsingError::default_instance_ = NULL;
+
+ParsingError* ParsingError::New() const {
+ return new ParsingError;
+}
+
+void ParsingError::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ start_column_ = 0;
+ start_row_ = 0;
+ end_column_ = 0;
+ end_row_ = 0;
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool ParsingError::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 int32 start_column = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &start_column_)));
+ set_has_start_column();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_start_row;
+ break;
+ }
+
+ // optional int32 start_row = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_start_row:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &start_row_)));
+ set_has_start_row();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(32)) goto parse_end_column;
+ break;
+ }
+
+ // optional int32 end_column = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_end_column:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &end_column_)));
+ set_has_end_column();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(40)) goto parse_end_row;
+ break;
+ }
+
+ // optional int32 end_row = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_end_row:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &end_row_)));
+ set_has_end_row();
+ } 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 ParsingError::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int32 start_column = 2;
+ if (has_start_column()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->start_column(), output);
+ }
+
+ // optional int32 start_row = 3;
+ if (has_start_row()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->start_row(), output);
+ }
+
+ // optional int32 end_column = 4;
+ if (has_end_column()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->end_column(), output);
+ }
+
+ // optional int32 end_row = 5;
+ if (has_end_row()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->end_row(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* ParsingError::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 start_column = 2;
+ if (has_start_column()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->start_column(), target);
+ }
+
+ // optional int32 start_row = 3;
+ if (has_start_row()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->start_row(), target);
+ }
+
+ // optional int32 end_column = 4;
+ if (has_end_column()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->end_column(), target);
+ }
+
+ // optional int32 end_row = 5;
+ if (has_end_row()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->end_row(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int ParsingError::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int32 start_column = 2;
+ if (has_start_column()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->start_column());
+ }
+
+ // optional int32 start_row = 3;
+ if (has_start_row()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->start_row());
+ }
+
+ // optional int32 end_column = 4;
+ if (has_end_column()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->end_column());
+ }
+
+ // optional int32 end_row = 5;
+ if (has_end_row()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->end_row());
+ }
+
+ }
+ 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 ParsingError::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const ParsingError* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const ParsingError*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void ParsingError::MergeFrom(const ParsingError& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_start_column()) {
+ set_start_column(from.start_column());
+ }
+ if (from.has_start_row()) {
+ set_start_row(from.start_row());
+ }
+ if (from.has_end_column()) {
+ set_end_column(from.end_column());
+ }
+ if (from.has_end_row()) {
+ set_end_row(from.end_row());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void ParsingError::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void ParsingError::CopyFrom(const ParsingError& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool ParsingError::IsInitialized() const {
+
+ return true;
+}
+
+void ParsingError::Swap(ParsingError* other) {
+ if (other != this) {
+ std::swap(start_column_, other->start_column_);
+ std::swap(start_row_, other->start_row_);
+ std::swap(end_column_, other->end_column_);
+ std::swap(end_row_, other->end_row_);
+ 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 ParsingError::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = ParsingError_descriptor_;
+ metadata.reflection = ParsingError_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int RecordBatchDef::kRecordCountFieldNumber;
+const int RecordBatchDef::kFieldFieldNumber;
+const int RecordBatchDef::kIsSelectionVector2FieldNumber;
+#endif // !_MSC_VER
+
+RecordBatchDef::RecordBatchDef()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void RecordBatchDef::InitAsDefaultInstance() {
+}
+
+RecordBatchDef::RecordBatchDef(const RecordBatchDef& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void RecordBatchDef::SharedCtor() {
+ _cached_size_ = 0;
+ record_count_ = 0;
+ is_selection_vector_2_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+RecordBatchDef::~RecordBatchDef() {
+ SharedDtor();
+}
+
+void RecordBatchDef::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void RecordBatchDef::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* RecordBatchDef::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return RecordBatchDef_descriptor_;
+}
+
+const RecordBatchDef& RecordBatchDef::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_UserBitShared_2eproto();
+ return *default_instance_;
+}
+
+RecordBatchDef* RecordBatchDef::default_instance_ = NULL;
+
+RecordBatchDef* RecordBatchDef::New() const {
+ return new RecordBatchDef;
+}
+
+void RecordBatchDef::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ record_count_ = 0;
+ is_selection_vector_2_ = false;
+ }
+ field_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool RecordBatchDef::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 int32 record_count = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &record_count_)));
+ set_has_record_count();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(18)) goto parse_field;
+ break;
+ }
+
+ // repeated .exec.shared.SerializedField field = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_field:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_field()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(18)) goto parse_field;
+ if (input->ExpectTag(24)) goto parse_is_selection_vector_2;
+ break;
+ }
+
+ // optional bool is_selection_vector_2 = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_is_selection_vector_2:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &is_selection_vector_2_)));
+ set_has_is_selection_vector_2();
+ } 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 RecordBatchDef::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional int32 record_count = 1;
+ if (has_record_count()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->record_count(), output);
+ }
+
+ // repeated .exec.shared.SerializedField field = 2;
+ for (int i = 0; i < this->field_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, this->field(i), output);
+ }
+
+ // optional bool is_selection_vector_2 = 3;
+ if (has_is_selection_vector_2()) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->is_selection_vector_2(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* RecordBatchDef::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional int32 record_count = 1;
+ if (has_record_count()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->record_count(), target);
+ }
+
+ // repeated .exec.shared.SerializedField field = 2;
+ for (int i = 0; i < this->field_size(); i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 2, this->field(i), target);
+ }
+
+ // optional bool is_selection_vector_2 = 3;
+ if (has_is_selection_vector_2()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->is_selection_vector_2(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int RecordBatchDef::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional int32 record_count = 1;
+ if (has_record_count()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->record_count());
+ }
+
+ // optional bool is_selection_vector_2 = 3;
+ if (has_is_selection_vector_2()) {
+ total_size += 1 + 1;
+ }
+
+ }
+ // repeated .exec.shared.SerializedField field = 2;
+ total_size += 1 * this->field_size();
+ for (int i = 0; i < this->field_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->field(i));
+ }
+
+ 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 RecordBatchDef::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const RecordBatchDef* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const RecordBatchDef*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void RecordBatchDef::MergeFrom(const RecordBatchDef& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ field_.MergeFrom(from.field_);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_record_count()) {
+ set_record_count(from.record_count());
+ }
+ if (from.has_is_selection_vector_2()) {
+ set_is_selection_vector_2(from.is_selection_vector_2());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void RecordBatchDef::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void RecordBatchDef::CopyFrom(const RecordBatchDef& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool RecordBatchDef::IsInitialized() const {
+
+ return true;
+}
+
+void RecordBatchDef::Swap(RecordBatchDef* other) {
+ if (other != this) {
+ std::swap(record_count_, other->record_count_);
+ field_.Swap(&other->field_);
+ std::swap(is_selection_vector_2_, other->is_selection_vector_2_);
+ 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 RecordBatchDef::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = RecordBatchDef_descriptor_;
+ metadata.reflection = RecordBatchDef_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+const ::google::protobuf::EnumDescriptor* NamePart_Type_descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return NamePart_Type_descriptor_;
+}
+bool NamePart_Type_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#ifndef _MSC_VER
+const NamePart_Type NamePart::NAME;
+const NamePart_Type NamePart::ARRAY;
+const NamePart_Type NamePart::Type_MIN;
+const NamePart_Type NamePart::Type_MAX;
+const int NamePart::Type_ARRAYSIZE;
+#endif // _MSC_VER
+#ifndef _MSC_VER
+const int NamePart::kTypeFieldNumber;
+const int NamePart::kNameFieldNumber;
+const int NamePart::kChildFieldNumber;
+#endif // !_MSC_VER
+
+NamePart::NamePart()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void NamePart::InitAsDefaultInstance() {
+ child_ = const_cast< ::exec::shared::NamePart*>(&::exec::shared::NamePart::default_instance());
+}
+
+NamePart::NamePart(const NamePart& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void NamePart::SharedCtor() {
+ _cached_size_ = 0;
+ type_ = 0;
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ child_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+NamePart::~NamePart() {
+ SharedDtor();
+}
+
+void NamePart::SharedDtor() {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
+ delete name_;
+ }
+ if (this != default_instance_) {
+ delete child_;
+ }
+}
+
+void NamePart::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* NamePart::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return NamePart_descriptor_;
+}
+
+const NamePart& NamePart::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_UserBitShared_2eproto();
+ return *default_instance_;
+}
+
+NamePart* NamePart::default_instance_ = NULL;
+
+NamePart* NamePart::New() const {
+ return new NamePart;
+}
+
+void NamePart::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ type_ = 0;
+ if (has_name()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
+ name_->clear();
+ }
+ }
+ if (has_child()) {
+ if (child_ != NULL) child_->::exec::shared::NamePart::Clear();
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool NamePart::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 .exec.shared.NamePart.Type type = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::exec::shared::NamePart_Type_IsValid(value)) {
+ set_type(static_cast< ::exec::shared::NamePart_Type >(value));
+ } else {
+ mutable_unknown_fields()->AddVarint(1, value);
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(18)) goto parse_name;
+ break;
+ }
+
+ // optional string name = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_name:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_name()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->name().data(), this->name().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_child;
+ break;
+ }
+
+ // optional .exec.shared.NamePart child = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_child:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_child()));
+ } 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 NamePart::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .exec.shared.NamePart.Type type = 1;
+ if (has_type()) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 1, this->type(), output);
+ }
+
+ // optional string name = 2;
+ if (has_name()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->name().data(), this->name().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 2, this->name(), output);
+ }
+
+ // optional .exec.shared.NamePart child = 3;
+ if (has_child()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, this->child(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* NamePart::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .exec.shared.NamePart.Type type = 1;
+ if (has_type()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+ 1, this->type(), target);
+ }
+
+ // optional string name = 2;
+ if (has_name()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->name().data(), this->name().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 2, this->name(), target);
+ }
+
+ // optional .exec.shared.NamePart child = 3;
+ if (has_child()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 3, this->child(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int NamePart::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .exec.shared.NamePart.Type type = 1;
+ if (has_type()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
+ }
+
+ // optional string name = 2;
+ if (has_name()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->name());
+ }
+
+ // optional .exec.shared.NamePart child = 3;
+ if (has_child()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->child());
+ }
+
+ }
+ 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 NamePart::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const NamePart* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const NamePart*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void NamePart::MergeFrom(const NamePart& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_type()) {
+ set_type(from.type());
+ }
+ if (from.has_name()) {
+ set_name(from.name());
+ }
+ if (from.has_child()) {
+ mutable_child()->::exec::shared::NamePart::MergeFrom(from.child());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void NamePart::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void NamePart::CopyFrom(const NamePart& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool NamePart::IsInitialized() const {
+
+ return true;
+}
+
+void NamePart::Swap(NamePart* other) {
+ if (other != this) {
+ std::swap(type_, other->type_);
+ std::swap(name_, other->name_);
+ std::swap(child_, other->child_);
+ 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 NamePart::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = NamePart_descriptor_;
+ metadata.reflection = NamePart_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int SerializedField::kMajorTypeFieldNumber;
+const int SerializedField::kNamePartFieldNumber;
+const int SerializedField::kChildFieldNumber;
+const int SerializedField::kValueCountFieldNumber;
+const int SerializedField::kVarByteLengthFieldNumber;
+const int SerializedField::kGroupCountFieldNumber;
+const int SerializedField::kBufferLengthFieldNumber;
+#endif // !_MSC_VER
+
+SerializedField::SerializedField()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void SerializedField::InitAsDefaultInstance() {
+ major_type_ = const_cast< ::common::MajorType*>(&::common::MajorType::default_instance());
+ name_part_ = const_cast< ::exec::shared::NamePart*>(&::exec::shared::NamePart::default_instance());
+}
+
+SerializedField::SerializedField(const SerializedField& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void SerializedField::SharedCtor() {
+ _cached_size_ = 0;
+ major_type_ = NULL;
+ name_part_ = NULL;
+ value_count_ = 0;
+ var_byte_length_ = 0;
+ group_count_ = 0;
+ buffer_length_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+SerializedField::~SerializedField() {
+ SharedDtor();
+}
+
+void SerializedField::SharedDtor() {
+ if (this != default_instance_) {
+ delete major_type_;
+ delete name_part_;
+ }
+}
+
+void SerializedField::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* SerializedField::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return SerializedField_descriptor_;
+}
+
+const SerializedField& SerializedField::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_UserBitShared_2eproto();
+ return *default_instance_;
+}
+
+SerializedField* SerializedField::default_instance_ = NULL;
+
+SerializedField* SerializedField::New() const {
+ return new SerializedField;
+}
+
+void SerializedField::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_major_type()) {
+ if (major_type_ != NULL) major_type_->::common::MajorType::Clear();
+ }
+ if (has_name_part()) {
+ if (name_part_ != NULL) name_part_->::exec::shared::NamePart::Clear();
+ }
+ value_count_ = 0;
+ var_byte_length_ = 0;
+ group_count_ = 0;
+ buffer_length_ = 0;
+ }
+ child_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool SerializedField::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 .common.MajorType major_type = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_major_type()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(18)) goto parse_name_part;
+ break;
+ }
+
+ // optional .exec.shared.NamePart name_part = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_name_part:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_name_part()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_child;
+ break;
+ }
+
+ // repeated .exec.shared.SerializedField child = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_child:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_child()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_child;
+ if (input->ExpectTag(32)) goto parse_value_count;
+ break;
+ }
+
+ // optional int32 value_count = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_value_count:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &value_count_)));
+ set_has_value_count();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(40)) goto parse_var_byte_length;
+ break;
+ }
+
+ // optional int32 var_byte_length = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_var_byte_length:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &var_byte_length_)));
+ set_has_var_byte_length();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(48)) goto parse_group_count;
+ break;
+ }
+
+ // optional int32 group_count = 6;
+ case 6: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_group_count:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &group_count_)));
+ set_has_group_count();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(56)) goto parse_buffer_length;
+ break;
+ }
+
+ // optional int32 buffer_length = 7;
+ case 7: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_buffer_length:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &buffer_length_)));
+ set_has_buffer_length();
+ } 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 SerializedField::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional .common.MajorType major_type = 1;
+ if (has_major_type()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, this->major_type(), output);
+ }
+
+ // optional .exec.shared.NamePart name_part = 2;
+ if (has_name_part()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, this->name_part(), output);
+ }
+
+ // repeated .exec.shared.SerializedField child = 3;
+ for (int i = 0; i < this->child_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, this->child(i), output);
+ }
+
+ // optional int32 value_count = 4;
+ if (has_value_count()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->value_count(), output);
+ }
+
+ // optional int32 var_byte_length = 5;
+ if (has_var_byte_length()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->var_byte_length(), output);
+ }
+
+ // optional int32 group_count = 6;
+ if (has_group_count()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->group_count(), output);
+ }
+
+ // optional int32 buffer_length = 7;
+ if (has_buffer_length()) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->buffer_length(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* SerializedField::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional .common.MajorType major_type = 1;
+ if (has_major_type()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 1, this->major_type(), target);
+ }
+
+ // optional .exec.shared.NamePart name_part = 2;
+ if (has_name_part()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 2, this->name_part(), target);
+ }
+
+ // repeated .exec.shared.SerializedField child = 3;
+ for (int i = 0; i < this->child_size(); i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 3, this->child(i), target);
+ }
+
+ // optional int32 value_count = 4;
+ if (has_value_count()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->value_count(), target);
+ }
+
+ // optional int32 var_byte_length = 5;
+ if (has_var_byte_length()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->var_byte_length(), target);
+ }
+
+ // optional int32 group_count = 6;
+ if (has_group_count()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->group_count(), target);
+ }
+
+ // optional int32 buffer_length = 7;
+ if (has_buffer_length()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->buffer_length(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int SerializedField::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional .common.MajorType major_type = 1;
+ if (has_major_type()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->major_type());
+ }
+
+ // optional .exec.shared.NamePart name_part = 2;
+ if (has_name_part()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->name_part());
+ }
+
+ // optional int32 value_count = 4;
+ if (has_value_count()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->value_count());
+ }
+
+ // optional int32 var_byte_length = 5;
+ if (has_var_byte_length()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->var_byte_length());
+ }
+
+ // optional int32 group_count = 6;
+ if (has_group_count()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->group_count());
+ }
+
+ // optional int32 buffer_length = 7;
+ if (has_buffer_length()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->buffer_length());
+ }
+
+ }
+ // repeated .exec.shared.SerializedField child = 3;
+ total_size += 1 * this->child_size();
+ for (int i = 0; i < this->child_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->child(i));
+ }
+
+ 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 SerializedField::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const SerializedField* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const SerializedField*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void SerializedField::MergeFrom(const SerializedField& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ child_.MergeFrom(from.child_);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_major_type()) {
+ mutable_major_type()->::common::MajorType::MergeFrom(from.major_type());
+ }
+ if (from.has_name_part()) {
+ mutable_name_part()->::exec::shared::NamePart::MergeFrom(from.name_part());
+ }
+ if (from.has_value_count()) {
+ set_value_count(from.value_count());
+ }
+ if (from.has_var_byte_length()) {
+ set_var_byte_length(from.var_byte_length());
+ }
+ if (from.has_group_count()) {
+ set_group_count(from.group_count());
+ }
+ if (from.has_buffer_length()) {
+ set_buffer_length(from.buffer_length());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void SerializedField::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void SerializedField::CopyFrom(const SerializedField& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool SerializedField::IsInitialized() const {
+
+ return true;
+}
+
+void SerializedField::Swap(SerializedField* other) {
+ if (other != this) {
+ std::swap(major_type_, other->major_type_);
+ std::swap(name_part_, other->name_part_);
+ child_.Swap(&other->child_);
+ std::swap(value_count_, other->value_count_);
+ std::swap(var_byte_length_, other->var_byte_length_);
+ std::swap(group_count_, other->group_count_);
+ std::swap(buffer_length_, other->buffer_length_);
+ 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 SerializedField::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = SerializedField_descriptor_;
+ metadata.reflection = SerializedField_reflection_;
+ return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace shared
+} // namespace exec
+
+// @@protoc_insertion_point(global_scope)
diff --git a/contrib/native/client/src/protobuf/UserBitShared.pb.h b/contrib/native/client/src/protobuf/UserBitShared.pb.h
new file mode 100644
index 000000000..fb7890442
--- /dev/null
+++ b/contrib/native/client/src/protobuf/UserBitShared.pb.h
@@ -0,0 +1,1775 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: UserBitShared.proto
+
+#ifndef PROTOBUF_UserBitShared_2eproto__INCLUDED
+#define PROTOBUF_UserBitShared_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "Types.pb.h"
+#include "Coordination.pb.h"
+#include "SchemaDef.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+namespace shared {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_UserBitShared_2eproto();
+void protobuf_AssignDesc_UserBitShared_2eproto();
+void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+class UserCredentials;
+class QueryId;
+class DrillPBError;
+class ParsingError;
+class RecordBatchDef;
+class NamePart;
+class SerializedField;
+
+enum NamePart_Type {
+ NamePart_Type_NAME = 0,
+ NamePart_Type_ARRAY = 1
+};
+bool NamePart_Type_IsValid(int value);
+const NamePart_Type NamePart_Type_Type_MIN = NamePart_Type_NAME;
+const NamePart_Type NamePart_Type_Type_MAX = NamePart_Type_ARRAY;
+const int NamePart_Type_Type_ARRAYSIZE = NamePart_Type_Type_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* NamePart_Type_descriptor();
+inline const ::std::string& NamePart_Type_Name(NamePart_Type value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ NamePart_Type_descriptor(), value);
+}
+inline bool NamePart_Type_Parse(
+ const ::std::string& name, NamePart_Type* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<NamePart_Type>(
+ NamePart_Type_descriptor(), name, value);
+}
+enum RpcChannel {
+ BIT_CONTROL = 0,
+ BIT_DATA = 1,
+ USER = 2
+};
+bool RpcChannel_IsValid(int value);
+const RpcChannel RpcChannel_MIN = BIT_CONTROL;
+const RpcChannel RpcChannel_MAX = USER;
+const int RpcChannel_ARRAYSIZE = RpcChannel_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* RpcChannel_descriptor();
+inline const ::std::string& RpcChannel_Name(RpcChannel value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ RpcChannel_descriptor(), value);
+}
+inline bool RpcChannel_Parse(
+ const ::std::string& name, RpcChannel* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<RpcChannel>(
+ RpcChannel_descriptor(), name, value);
+}
+// ===================================================================
+
+class UserCredentials : public ::google::protobuf::Message {
+ public:
+ UserCredentials();
+ virtual ~UserCredentials();
+
+ UserCredentials(const UserCredentials& from);
+
+ inline UserCredentials& operator=(const UserCredentials& 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 UserCredentials& default_instance();
+
+ void Swap(UserCredentials* other);
+
+ // implements Message ----------------------------------------------
+
+ UserCredentials* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const UserCredentials& from);
+ void MergeFrom(const UserCredentials& 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 string user_name = 1;
+ inline bool has_user_name() const;
+ inline void clear_user_name();
+ static const int kUserNameFieldNumber = 1;
+ inline const ::std::string& user_name() const;
+ inline void set_user_name(const ::std::string& value);
+ inline void set_user_name(const char* value);
+ inline void set_user_name(const char* value, size_t size);
+ inline ::std::string* mutable_user_name();
+ inline ::std::string* release_user_name();
+ inline void set_allocated_user_name(::std::string* user_name);
+
+ // @@protoc_insertion_point(class_scope:exec.shared.UserCredentials)
+ private:
+ inline void set_has_user_name();
+ inline void clear_has_user_name();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::std::string* user_name_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+ friend void protobuf_AddDesc_UserBitShared_2eproto();
+ friend void protobuf_AssignDesc_UserBitShared_2eproto();
+ friend void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+ void InitAsDefaultInstance();
+ static UserCredentials* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class QueryId : public ::google::protobuf::Message {
+ public:
+ QueryId();
+ virtual ~QueryId();
+
+ QueryId(const QueryId& from);
+
+ inline QueryId& operator=(const QueryId& 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 QueryId& default_instance();
+
+ void Swap(QueryId* other);
+
+ // implements Message ----------------------------------------------
+
+ QueryId* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const QueryId& from);
+ void MergeFrom(const QueryId& 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 sfixed64 part1 = 1;
+ inline bool has_part1() const;
+ inline void clear_part1();
+ static const int kPart1FieldNumber = 1;
+ inline ::google::protobuf::int64 part1() const;
+ inline void set_part1(::google::protobuf::int64 value);
+
+ // optional sfixed64 part2 = 2;
+ inline bool has_part2() const;
+ inline void clear_part2();
+ static const int kPart2FieldNumber = 2;
+ inline ::google::protobuf::int64 part2() const;
+ inline void set_part2(::google::protobuf::int64 value);
+
+ // @@protoc_insertion_point(class_scope:exec.shared.QueryId)
+ private:
+ inline void set_has_part1();
+ inline void clear_has_part1();
+ inline void set_has_part2();
+ inline void clear_has_part2();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int64 part1_;
+ ::google::protobuf::int64 part2_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+ friend void protobuf_AddDesc_UserBitShared_2eproto();
+ friend void protobuf_AssignDesc_UserBitShared_2eproto();
+ friend void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+ void InitAsDefaultInstance();
+ static QueryId* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class DrillPBError : public ::google::protobuf::Message {
+ public:
+ DrillPBError();
+ virtual ~DrillPBError();
+
+ DrillPBError(const DrillPBError& from);
+
+ inline DrillPBError& operator=(const DrillPBError& 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 DrillPBError& default_instance();
+
+ void Swap(DrillPBError* other);
+
+ // implements Message ----------------------------------------------
+
+ DrillPBError* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const DrillPBError& from);
+ void MergeFrom(const DrillPBError& 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 string error_id = 1;
+ inline bool has_error_id() const;
+ inline void clear_error_id();
+ static const int kErrorIdFieldNumber = 1;
+ 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 .exec.DrillbitEndpoint endpoint = 2;
+ inline bool has_endpoint() const;
+ inline void clear_endpoint();
+ static const int kEndpointFieldNumber = 2;
+ inline const ::exec::DrillbitEndpoint& endpoint() const;
+ inline ::exec::DrillbitEndpoint* mutable_endpoint();
+ inline ::exec::DrillbitEndpoint* release_endpoint();
+ inline void set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint);
+
+ // optional int32 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);
+
+ // optional string message = 4;
+ inline bool has_message() const;
+ inline void clear_message();
+ static const int kMessageFieldNumber = 4;
+ inline const ::std::string& message() const;
+ inline void set_message(const ::std::string& value);
+ inline void set_message(const char* value);
+ inline void set_message(const char* value, size_t size);
+ inline ::std::string* mutable_message();
+ inline ::std::string* release_message();
+ inline void set_allocated_message(::std::string* message);
+
+ // repeated .exec.shared.ParsingError parsing_error = 5;
+ inline int parsing_error_size() const;
+ inline void clear_parsing_error();
+ static const int kParsingErrorFieldNumber = 5;
+ inline const ::exec::shared::ParsingError& parsing_error(int index) const;
+ inline ::exec::shared::ParsingError* mutable_parsing_error(int index);
+ inline ::exec::shared::ParsingError* add_parsing_error();
+ inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::ParsingError >&
+ parsing_error() const;
+ inline ::google::protobuf::RepeatedPtrField< ::exec::shared::ParsingError >*
+ mutable_parsing_error();
+
+ // @@protoc_insertion_point(class_scope:exec.shared.DrillPBError)
+ private:
+ inline void set_has_error_id();
+ inline void clear_has_error_id();
+ inline void set_has_endpoint();
+ inline void clear_has_endpoint();
+ inline void set_has_error_type();
+ inline void clear_has_error_type();
+ inline void set_has_message();
+ inline void clear_has_message();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::std::string* error_id_;
+ ::exec::DrillbitEndpoint* endpoint_;
+ ::std::string* message_;
+ ::google::protobuf::RepeatedPtrField< ::exec::shared::ParsingError > parsing_error_;
+ ::google::protobuf::int32 error_type_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
+
+ friend void protobuf_AddDesc_UserBitShared_2eproto();
+ friend void protobuf_AssignDesc_UserBitShared_2eproto();
+ friend void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+ void InitAsDefaultInstance();
+ static DrillPBError* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class ParsingError : public ::google::protobuf::Message {
+ public:
+ ParsingError();
+ virtual ~ParsingError();
+
+ ParsingError(const ParsingError& from);
+
+ inline ParsingError& operator=(const ParsingError& 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 ParsingError& default_instance();
+
+ void Swap(ParsingError* other);
+
+ // implements Message ----------------------------------------------
+
+ ParsingError* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ParsingError& from);
+ void MergeFrom(const ParsingError& 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 int32 start_column = 2;
+ inline bool has_start_column() const;
+ inline void clear_start_column();
+ static const int kStartColumnFieldNumber = 2;
+ inline ::google::protobuf::int32 start_column() const;
+ inline void set_start_column(::google::protobuf::int32 value);
+
+ // optional int32 start_row = 3;
+ inline bool has_start_row() const;
+ inline void clear_start_row();
+ static const int kStartRowFieldNumber = 3;
+ inline ::google::protobuf::int32 start_row() const;
+ inline void set_start_row(::google::protobuf::int32 value);
+
+ // optional int32 end_column = 4;
+ inline bool has_end_column() const;
+ inline void clear_end_column();
+ static const int kEndColumnFieldNumber = 4;
+ inline ::google::protobuf::int32 end_column() const;
+ inline void set_end_column(::google::protobuf::int32 value);
+
+ // optional int32 end_row = 5;
+ inline bool has_end_row() const;
+ inline void clear_end_row();
+ static const int kEndRowFieldNumber = 5;
+ inline ::google::protobuf::int32 end_row() const;
+ inline void set_end_row(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:exec.shared.ParsingError)
+ private:
+ inline void set_has_start_column();
+ inline void clear_has_start_column();
+ inline void set_has_start_row();
+ inline void clear_has_start_row();
+ inline void set_has_end_column();
+ inline void clear_has_end_column();
+ inline void set_has_end_row();
+ inline void clear_has_end_row();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::int32 start_column_;
+ ::google::protobuf::int32 start_row_;
+ ::google::protobuf::int32 end_column_;
+ ::google::protobuf::int32 end_row_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
+
+ friend void protobuf_AddDesc_UserBitShared_2eproto();
+ friend void protobuf_AssignDesc_UserBitShared_2eproto();
+ friend void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+ void InitAsDefaultInstance();
+ static ParsingError* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class RecordBatchDef : public ::google::protobuf::Message {
+ public:
+ RecordBatchDef();
+ virtual ~RecordBatchDef();
+
+ RecordBatchDef(const RecordBatchDef& from);
+
+ inline RecordBatchDef& operator=(const RecordBatchDef& 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 RecordBatchDef& default_instance();
+
+ void Swap(RecordBatchDef* other);
+
+ // implements Message ----------------------------------------------
+
+ RecordBatchDef* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const RecordBatchDef& from);
+ void MergeFrom(const RecordBatchDef& 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 int32 record_count = 1;
+ inline bool has_record_count() const;
+ inline void clear_record_count();
+ static const int kRecordCountFieldNumber = 1;
+ inline ::google::protobuf::int32 record_count() const;
+ inline void set_record_count(::google::protobuf::int32 value);
+
+ // repeated .exec.shared.SerializedField field = 2;
+ inline int field_size() const;
+ inline void clear_field();
+ static const int kFieldFieldNumber = 2;
+ inline const ::exec::shared::SerializedField& field(int index) const;
+ inline ::exec::shared::SerializedField* mutable_field(int index);
+ inline ::exec::shared::SerializedField* add_field();
+ inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >&
+ field() const;
+ inline ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >*
+ mutable_field();
+
+ // optional bool is_selection_vector_2 = 3;
+ inline bool has_is_selection_vector_2() const;
+ inline void clear_is_selection_vector_2();
+ static const int kIsSelectionVector2FieldNumber = 3;
+ inline bool is_selection_vector_2() const;
+ inline void set_is_selection_vector_2(bool value);
+
+ // @@protoc_insertion_point(class_scope:exec.shared.RecordBatchDef)
+ private:
+ inline void set_has_record_count();
+ inline void clear_has_record_count();
+ inline void set_has_is_selection_vector_2();
+ inline void clear_has_is_selection_vector_2();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField > field_;
+ ::google::protobuf::int32 record_count_;
+ bool is_selection_vector_2_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_UserBitShared_2eproto();
+ friend void protobuf_AssignDesc_UserBitShared_2eproto();
+ friend void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+ void InitAsDefaultInstance();
+ static RecordBatchDef* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class NamePart : public ::google::protobuf::Message {
+ public:
+ NamePart();
+ virtual ~NamePart();
+
+ NamePart(const NamePart& from);
+
+ inline NamePart& operator=(const NamePart& 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 NamePart& default_instance();
+
+ void Swap(NamePart* other);
+
+ // implements Message ----------------------------------------------
+
+ NamePart* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const NamePart& from);
+ void MergeFrom(const NamePart& 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 ----------------------------------------------------
+
+ typedef NamePart_Type Type;
+ static const Type NAME = NamePart_Type_NAME;
+ static const Type ARRAY = NamePart_Type_ARRAY;
+ static inline bool Type_IsValid(int value) {
+ return NamePart_Type_IsValid(value);
+ }
+ static const Type Type_MIN =
+ NamePart_Type_Type_MIN;
+ static const Type Type_MAX =
+ NamePart_Type_Type_MAX;
+ static const int Type_ARRAYSIZE =
+ NamePart_Type_Type_ARRAYSIZE;
+ static inline const ::google::protobuf::EnumDescriptor*
+ Type_descriptor() {
+ return NamePart_Type_descriptor();
+ }
+ static inline const ::std::string& Type_Name(Type value) {
+ return NamePart_Type_Name(value);
+ }
+ static inline bool Type_Parse(const ::std::string& name,
+ Type* value) {
+ return NamePart_Type_Parse(name, value);
+ }
+
+ // accessors -------------------------------------------------------
+
+ // optional .exec.shared.NamePart.Type type = 1;
+ inline bool has_type() const;
+ inline void clear_type();
+ static const int kTypeFieldNumber = 1;
+ inline ::exec::shared::NamePart_Type type() const;
+ inline void set_type(::exec::shared::NamePart_Type value);
+
+ // optional string name = 2;
+ inline bool has_name() const;
+ inline void clear_name();
+ static const int kNameFieldNumber = 2;
+ inline const ::std::string& name() const;
+ inline void set_name(const ::std::string& value);
+ inline void set_name(const char* value);
+ inline void set_name(const char* value, size_t size);
+ inline ::std::string* mutable_name();
+ inline ::std::string* release_name();
+ inline void set_allocated_name(::std::string* name);
+
+ // optional .exec.shared.NamePart child = 3;
+ inline bool has_child() const;
+ inline void clear_child();
+ static const int kChildFieldNumber = 3;
+ inline const ::exec::shared::NamePart& child() const;
+ inline ::exec::shared::NamePart* mutable_child();
+ inline ::exec::shared::NamePart* release_child();
+ inline void set_allocated_child(::exec::shared::NamePart* child);
+
+ // @@protoc_insertion_point(class_scope:exec.shared.NamePart)
+ private:
+ inline void set_has_type();
+ inline void clear_has_type();
+ inline void set_has_name();
+ inline void clear_has_name();
+ inline void set_has_child();
+ inline void clear_has_child();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::std::string* name_;
+ ::exec::shared::NamePart* child_;
+ int type_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ friend void protobuf_AddDesc_UserBitShared_2eproto();
+ friend void protobuf_AssignDesc_UserBitShared_2eproto();
+ friend void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+ void InitAsDefaultInstance();
+ static NamePart* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class SerializedField : public ::google::protobuf::Message {
+ public:
+ SerializedField();
+ virtual ~SerializedField();
+
+ SerializedField(const SerializedField& from);
+
+ inline SerializedField& operator=(const SerializedField& 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 SerializedField& default_instance();
+
+ void Swap(SerializedField* other);
+
+ // implements Message ----------------------------------------------
+
+ SerializedField* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const SerializedField& from);
+ void MergeFrom(const SerializedField& 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 .common.MajorType major_type = 1;
+ inline bool has_major_type() const;
+ inline void clear_major_type();
+ static const int kMajorTypeFieldNumber = 1;
+ inline const ::common::MajorType& major_type() const;
+ inline ::common::MajorType* mutable_major_type();
+ inline ::common::MajorType* release_major_type();
+ inline void set_allocated_major_type(::common::MajorType* major_type);
+
+ // optional .exec.shared.NamePart name_part = 2;
+ inline bool has_name_part() const;
+ inline void clear_name_part();
+ static const int kNamePartFieldNumber = 2;
+ inline const ::exec::shared::NamePart& name_part() const;
+ inline ::exec::shared::NamePart* mutable_name_part();
+ inline ::exec::shared::NamePart* release_name_part();
+ inline void set_allocated_name_part(::exec::shared::NamePart* name_part);
+
+ // repeated .exec.shared.SerializedField child = 3;
+ inline int child_size() const;
+ inline void clear_child();
+ static const int kChildFieldNumber = 3;
+ inline const ::exec::shared::SerializedField& child(int index) const;
+ inline ::exec::shared::SerializedField* mutable_child(int index);
+ inline ::exec::shared::SerializedField* add_child();
+ inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >&
+ child() const;
+ inline ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >*
+ mutable_child();
+
+ // optional int32 value_count = 4;
+ inline bool has_value_count() const;
+ inline void clear_value_count();
+ static const int kValueCountFieldNumber = 4;
+ inline ::google::protobuf::int32 value_count() const;
+ inline void set_value_count(::google::protobuf::int32 value);
+
+ // optional int32 var_byte_length = 5;
+ inline bool has_var_byte_length() const;
+ inline void clear_var_byte_length();
+ static const int kVarByteLengthFieldNumber = 5;
+ inline ::google::protobuf::int32 var_byte_length() const;
+ inline void set_var_byte_length(::google::protobuf::int32 value);
+
+ // optional int32 group_count = 6;
+ inline bool has_group_count() const;
+ inline void clear_group_count();
+ static const int kGroupCountFieldNumber = 6;
+ inline ::google::protobuf::int32 group_count() const;
+ inline void set_group_count(::google::protobuf::int32 value);
+
+ // optional int32 buffer_length = 7;
+ inline bool has_buffer_length() const;
+ inline void clear_buffer_length();
+ static const int kBufferLengthFieldNumber = 7;
+ inline ::google::protobuf::int32 buffer_length() const;
+ inline void set_buffer_length(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:exec.shared.SerializedField)
+ private:
+ inline void set_has_major_type();
+ inline void clear_has_major_type();
+ inline void set_has_name_part();
+ inline void clear_has_name_part();
+ inline void set_has_value_count();
+ inline void clear_has_value_count();
+ inline void set_has_var_byte_length();
+ inline void clear_has_var_byte_length();
+ inline void set_has_group_count();
+ inline void clear_has_group_count();
+ inline void set_has_buffer_length();
+ inline void clear_has_buffer_length();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::common::MajorType* major_type_;
+ ::exec::shared::NamePart* name_part_;
+ ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField > child_;
+ ::google::protobuf::int32 value_count_;
+ ::google::protobuf::int32 var_byte_length_;
+ ::google::protobuf::int32 group_count_;
+ ::google::protobuf::int32 buffer_length_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
+
+ friend void protobuf_AddDesc_UserBitShared_2eproto();
+ friend void protobuf_AssignDesc_UserBitShared_2eproto();
+ friend void protobuf_ShutdownFile_UserBitShared_2eproto();
+
+ void InitAsDefaultInstance();
+ static SerializedField* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// UserCredentials
+
+// optional string user_name = 1;
+inline bool UserCredentials::has_user_name() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void UserCredentials::set_has_user_name() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void UserCredentials::clear_has_user_name() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void UserCredentials::clear_user_name() {
+ if (user_name_ != &::google::protobuf::internal::kEmptyString) {
+ user_name_->clear();
+ }
+ clear_has_user_name();
+}
+inline const ::std::string& UserCredentials::user_name() const {
+ return *user_name_;
+}
+inline void UserCredentials::set_user_name(const ::std::string& value) {
+ set_has_user_name();
+ if (user_name_ == &::google::protobuf::internal::kEmptyString) {
+ user_name_ = new ::std::string;
+ }
+ user_name_->assign(value);
+}
+inline void UserCredentials::set_user_name(const char* value) {
+ set_has_user_name();
+ if (user_name_ == &::google::protobuf::internal::kEmptyString) {
+ user_name_ = new ::std::string;
+ }
+ user_name_->assign(value);
+}
+inline void UserCredentials::set_user_name(const char* value, size_t size) {
+ set_has_user_name();
+ if (user_name_ == &::google::protobuf::internal::kEmptyString) {
+ user_name_ = new ::std::string;
+ }
+ user_name_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* UserCredentials::mutable_user_name() {
+ set_has_user_name();
+ if (user_name_ == &::google::protobuf::internal::kEmptyString) {
+ user_name_ = new ::std::string;
+ }
+ return user_name_;
+}
+inline ::std::string* UserCredentials::release_user_name() {
+ clear_has_user_name();
+ if (user_name_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = user_name_;
+ user_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void UserCredentials::set_allocated_user_name(::std::string* user_name) {
+ if (user_name_ != &::google::protobuf::internal::kEmptyString) {
+ delete user_name_;
+ }
+ if (user_name) {
+ set_has_user_name();
+ user_name_ = user_name;
+ } else {
+ clear_has_user_name();
+ user_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// -------------------------------------------------------------------
+
+// QueryId
+
+// optional sfixed64 part1 = 1;
+inline bool QueryId::has_part1() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void QueryId::set_has_part1() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void QueryId::clear_has_part1() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void QueryId::clear_part1() {
+ part1_ = GOOGLE_LONGLONG(0);
+ clear_has_part1();
+}
+inline ::google::protobuf::int64 QueryId::part1() const {
+ return part1_;
+}
+inline void QueryId::set_part1(::google::protobuf::int64 value) {
+ set_has_part1();
+ part1_ = value;
+}
+
+// optional sfixed64 part2 = 2;
+inline bool QueryId::has_part2() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void QueryId::set_has_part2() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void QueryId::clear_has_part2() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void QueryId::clear_part2() {
+ part2_ = GOOGLE_LONGLONG(0);
+ clear_has_part2();
+}
+inline ::google::protobuf::int64 QueryId::part2() const {
+ return part2_;
+}
+inline void QueryId::set_part2(::google::protobuf::int64 value) {
+ set_has_part2();
+ part2_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// DrillPBError
+
+// optional string error_id = 1;
+inline bool DrillPBError::has_error_id() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void DrillPBError::set_has_error_id() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void DrillPBError::clear_has_error_id() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void DrillPBError::clear_error_id() {
+ if (error_id_ != &::google::protobuf::internal::kEmptyString) {
+ error_id_->clear();
+ }
+ clear_has_error_id();
+}
+inline const ::std::string& DrillPBError::error_id() const {
+ return *error_id_;
+}
+inline void DrillPBError::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 DrillPBError::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 DrillPBError::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* DrillPBError::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* DrillPBError::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 DrillPBError::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 .exec.DrillbitEndpoint endpoint = 2;
+inline bool DrillPBError::has_endpoint() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void DrillPBError::set_has_endpoint() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void DrillPBError::clear_has_endpoint() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void DrillPBError::clear_endpoint() {
+ if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
+ clear_has_endpoint();
+}
+inline const ::exec::DrillbitEndpoint& DrillPBError::endpoint() const {
+ return endpoint_ != NULL ? *endpoint_ : *default_instance_->endpoint_;
+}
+inline ::exec::DrillbitEndpoint* DrillPBError::mutable_endpoint() {
+ set_has_endpoint();
+ if (endpoint_ == NULL) endpoint_ = new ::exec::DrillbitEndpoint;
+ return endpoint_;
+}
+inline ::exec::DrillbitEndpoint* DrillPBError::release_endpoint() {
+ clear_has_endpoint();
+ ::exec::DrillbitEndpoint* temp = endpoint_;
+ endpoint_ = NULL;
+ return temp;
+}
+inline void DrillPBError::set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint) {
+ delete endpoint_;
+ endpoint_ = endpoint;
+ if (endpoint) {
+ set_has_endpoint();
+ } else {
+ clear_has_endpoint();
+ }
+}
+
+// optional int32 error_type = 3;
+inline bool DrillPBError::has_error_type() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void DrillPBError::set_has_error_type() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void DrillPBError::clear_has_error_type() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+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 void DrillPBError::set_error_type(::google::protobuf::int32 value) {
+ set_has_error_type();
+ error_type_ = value;
+}
+
+// optional string message = 4;
+inline bool DrillPBError::has_message() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void DrillPBError::set_has_message() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void DrillPBError::clear_has_message() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void DrillPBError::clear_message() {
+ if (message_ != &::google::protobuf::internal::kEmptyString) {
+ message_->clear();
+ }
+ clear_has_message();
+}
+inline const ::std::string& DrillPBError::message() const {
+ return *message_;
+}
+inline void DrillPBError::set_message(const ::std::string& value) {
+ set_has_message();
+ if (message_ == &::google::protobuf::internal::kEmptyString) {
+ message_ = new ::std::string;
+ }
+ message_->assign(value);
+}
+inline void DrillPBError::set_message(const char* value) {
+ set_has_message();
+ if (message_ == &::google::protobuf::internal::kEmptyString) {
+ message_ = new ::std::string;
+ }
+ message_->assign(value);
+}
+inline void DrillPBError::set_message(const char* value, size_t size) {
+ set_has_message();
+ if (message_ == &::google::protobuf::internal::kEmptyString) {
+ message_ = new ::std::string;
+ }
+ message_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* DrillPBError::mutable_message() {
+ set_has_message();
+ if (message_ == &::google::protobuf::internal::kEmptyString) {
+ message_ = new ::std::string;
+ }
+ return message_;
+}
+inline ::std::string* DrillPBError::release_message() {
+ clear_has_message();
+ if (message_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = message_;
+ message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void DrillPBError::set_allocated_message(::std::string* message) {
+ if (message_ != &::google::protobuf::internal::kEmptyString) {
+ delete message_;
+ }
+ if (message) {
+ set_has_message();
+ message_ = message;
+ } else {
+ clear_has_message();
+ message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// repeated .exec.shared.ParsingError parsing_error = 5;
+inline int DrillPBError::parsing_error_size() const {
+ return parsing_error_.size();
+}
+inline void DrillPBError::clear_parsing_error() {
+ parsing_error_.Clear();
+}
+inline const ::exec::shared::ParsingError& DrillPBError::parsing_error(int index) const {
+ return parsing_error_.Get(index);
+}
+inline ::exec::shared::ParsingError* DrillPBError::mutable_parsing_error(int index) {
+ return parsing_error_.Mutable(index);
+}
+inline ::exec::shared::ParsingError* DrillPBError::add_parsing_error() {
+ return parsing_error_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::ParsingError >&
+DrillPBError::parsing_error() const {
+ return parsing_error_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::exec::shared::ParsingError >*
+DrillPBError::mutable_parsing_error() {
+ return &parsing_error_;
+}
+
+// -------------------------------------------------------------------
+
+// ParsingError
+
+// optional int32 start_column = 2;
+inline bool ParsingError::has_start_column() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void ParsingError::set_has_start_column() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void ParsingError::clear_has_start_column() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void ParsingError::clear_start_column() {
+ start_column_ = 0;
+ clear_has_start_column();
+}
+inline ::google::protobuf::int32 ParsingError::start_column() const {
+ return start_column_;
+}
+inline void ParsingError::set_start_column(::google::protobuf::int32 value) {
+ set_has_start_column();
+ start_column_ = value;
+}
+
+// optional int32 start_row = 3;
+inline bool ParsingError::has_start_row() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void ParsingError::set_has_start_row() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void ParsingError::clear_has_start_row() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void ParsingError::clear_start_row() {
+ start_row_ = 0;
+ clear_has_start_row();
+}
+inline ::google::protobuf::int32 ParsingError::start_row() const {
+ return start_row_;
+}
+inline void ParsingError::set_start_row(::google::protobuf::int32 value) {
+ set_has_start_row();
+ start_row_ = value;
+}
+
+// optional int32 end_column = 4;
+inline bool ParsingError::has_end_column() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void ParsingError::set_has_end_column() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void ParsingError::clear_has_end_column() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void ParsingError::clear_end_column() {
+ end_column_ = 0;
+ clear_has_end_column();
+}
+inline ::google::protobuf::int32 ParsingError::end_column() const {
+ return end_column_;
+}
+inline void ParsingError::set_end_column(::google::protobuf::int32 value) {
+ set_has_end_column();
+ end_column_ = value;
+}
+
+// optional int32 end_row = 5;
+inline bool ParsingError::has_end_row() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void ParsingError::set_has_end_row() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void ParsingError::clear_has_end_row() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void ParsingError::clear_end_row() {
+ end_row_ = 0;
+ clear_has_end_row();
+}
+inline ::google::protobuf::int32 ParsingError::end_row() const {
+ return end_row_;
+}
+inline void ParsingError::set_end_row(::google::protobuf::int32 value) {
+ set_has_end_row();
+ end_row_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// RecordBatchDef
+
+// optional int32 record_count = 1;
+inline bool RecordBatchDef::has_record_count() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void RecordBatchDef::set_has_record_count() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void RecordBatchDef::clear_has_record_count() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void RecordBatchDef::clear_record_count() {
+ record_count_ = 0;
+ clear_has_record_count();
+}
+inline ::google::protobuf::int32 RecordBatchDef::record_count() const {
+ return record_count_;
+}
+inline void RecordBatchDef::set_record_count(::google::protobuf::int32 value) {
+ set_has_record_count();
+ record_count_ = value;
+}
+
+// repeated .exec.shared.SerializedField field = 2;
+inline int RecordBatchDef::field_size() const {
+ return field_.size();
+}
+inline void RecordBatchDef::clear_field() {
+ field_.Clear();
+}
+inline const ::exec::shared::SerializedField& RecordBatchDef::field(int index) const {
+ return field_.Get(index);
+}
+inline ::exec::shared::SerializedField* RecordBatchDef::mutable_field(int index) {
+ return field_.Mutable(index);
+}
+inline ::exec::shared::SerializedField* RecordBatchDef::add_field() {
+ return field_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >&
+RecordBatchDef::field() const {
+ return field_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >*
+RecordBatchDef::mutable_field() {
+ return &field_;
+}
+
+// optional bool is_selection_vector_2 = 3;
+inline bool RecordBatchDef::has_is_selection_vector_2() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void RecordBatchDef::set_has_is_selection_vector_2() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void RecordBatchDef::clear_has_is_selection_vector_2() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void RecordBatchDef::clear_is_selection_vector_2() {
+ is_selection_vector_2_ = false;
+ clear_has_is_selection_vector_2();
+}
+inline bool RecordBatchDef::is_selection_vector_2() const {
+ return is_selection_vector_2_;
+}
+inline void RecordBatchDef::set_is_selection_vector_2(bool value) {
+ set_has_is_selection_vector_2();
+ is_selection_vector_2_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// NamePart
+
+// optional .exec.shared.NamePart.Type type = 1;
+inline bool NamePart::has_type() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void NamePart::set_has_type() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void NamePart::clear_has_type() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void NamePart::clear_type() {
+ type_ = 0;
+ clear_has_type();
+}
+inline ::exec::shared::NamePart_Type NamePart::type() const {
+ return static_cast< ::exec::shared::NamePart_Type >(type_);
+}
+inline void NamePart::set_type(::exec::shared::NamePart_Type value) {
+ assert(::exec::shared::NamePart_Type_IsValid(value));
+ set_has_type();
+ type_ = value;
+}
+
+// optional string name = 2;
+inline bool NamePart::has_name() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void NamePart::set_has_name() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void NamePart::clear_has_name() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void NamePart::clear_name() {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
+ name_->clear();
+ }
+ clear_has_name();
+}
+inline const ::std::string& NamePart::name() const {
+ return *name_;
+}
+inline void NamePart::set_name(const ::std::string& value) {
+ set_has_name();
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
+ name_ = new ::std::string;
+ }
+ name_->assign(value);
+}
+inline void NamePart::set_name(const char* value) {
+ set_has_name();
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
+ name_ = new ::std::string;
+ }
+ name_->assign(value);
+}
+inline void NamePart::set_name(const char* value, size_t size) {
+ set_has_name();
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
+ name_ = new ::std::string;
+ }
+ name_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* NamePart::mutable_name() {
+ set_has_name();
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
+ name_ = new ::std::string;
+ }
+ return name_;
+}
+inline ::std::string* NamePart::release_name() {
+ clear_has_name();
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = name_;
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void NamePart::set_allocated_name(::std::string* name) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
+ delete name_;
+ }
+ if (name) {
+ set_has_name();
+ name_ = name;
+ } else {
+ clear_has_name();
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
+// optional .exec.shared.NamePart child = 3;
+inline bool NamePart::has_child() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void NamePart::set_has_child() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void NamePart::clear_has_child() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void NamePart::clear_child() {
+ if (child_ != NULL) child_->::exec::shared::NamePart::Clear();
+ clear_has_child();
+}
+inline const ::exec::shared::NamePart& NamePart::child() const {
+ return child_ != NULL ? *child_ : *default_instance_->child_;
+}
+inline ::exec::shared::NamePart* NamePart::mutable_child() {
+ set_has_child();
+ if (child_ == NULL) child_ = new ::exec::shared::NamePart;
+ return child_;
+}
+inline ::exec::shared::NamePart* NamePart::release_child() {
+ clear_has_child();
+ ::exec::shared::NamePart* temp = child_;
+ child_ = NULL;
+ return temp;
+}
+inline void NamePart::set_allocated_child(::exec::shared::NamePart* child) {
+ delete child_;
+ child_ = child;
+ if (child) {
+ set_has_child();
+ } else {
+ clear_has_child();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// SerializedField
+
+// optional .common.MajorType major_type = 1;
+inline bool SerializedField::has_major_type() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void SerializedField::set_has_major_type() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void SerializedField::clear_has_major_type() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void SerializedField::clear_major_type() {
+ if (major_type_ != NULL) major_type_->::common::MajorType::Clear();
+ clear_has_major_type();
+}
+inline const ::common::MajorType& SerializedField::major_type() const {
+ return major_type_ != NULL ? *major_type_ : *default_instance_->major_type_;
+}
+inline ::common::MajorType* SerializedField::mutable_major_type() {
+ set_has_major_type();
+ if (major_type_ == NULL) major_type_ = new ::common::MajorType;
+ return major_type_;
+}
+inline ::common::MajorType* SerializedField::release_major_type() {
+ clear_has_major_type();
+ ::common::MajorType* temp = major_type_;
+ major_type_ = NULL;
+ return temp;
+}
+inline void SerializedField::set_allocated_major_type(::common::MajorType* major_type) {
+ delete major_type_;
+ major_type_ = major_type;
+ if (major_type) {
+ set_has_major_type();
+ } else {
+ clear_has_major_type();
+ }
+}
+
+// optional .exec.shared.NamePart name_part = 2;
+inline bool SerializedField::has_name_part() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void SerializedField::set_has_name_part() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void SerializedField::clear_has_name_part() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void SerializedField::clear_name_part() {
+ if (name_part_ != NULL) name_part_->::exec::shared::NamePart::Clear();
+ clear_has_name_part();
+}
+inline const ::exec::shared::NamePart& SerializedField::name_part() const {
+ return name_part_ != NULL ? *name_part_ : *default_instance_->name_part_;
+}
+inline ::exec::shared::NamePart* SerializedField::mutable_name_part() {
+ set_has_name_part();
+ if (name_part_ == NULL) name_part_ = new ::exec::shared::NamePart;
+ return name_part_;
+}
+inline ::exec::shared::NamePart* SerializedField::release_name_part() {
+ clear_has_name_part();
+ ::exec::shared::NamePart* temp = name_part_;
+ name_part_ = NULL;
+ return temp;
+}
+inline void SerializedField::set_allocated_name_part(::exec::shared::NamePart* name_part) {
+ delete name_part_;
+ name_part_ = name_part;
+ if (name_part) {
+ set_has_name_part();
+ } else {
+ clear_has_name_part();
+ }
+}
+
+// repeated .exec.shared.SerializedField child = 3;
+inline int SerializedField::child_size() const {
+ return child_.size();
+}
+inline void SerializedField::clear_child() {
+ child_.Clear();
+}
+inline const ::exec::shared::SerializedField& SerializedField::child(int index) const {
+ return child_.Get(index);
+}
+inline ::exec::shared::SerializedField* SerializedField::mutable_child(int index) {
+ return child_.Mutable(index);
+}
+inline ::exec::shared::SerializedField* SerializedField::add_child() {
+ return child_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >&
+SerializedField::child() const {
+ return child_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::exec::shared::SerializedField >*
+SerializedField::mutable_child() {
+ return &child_;
+}
+
+// optional int32 value_count = 4;
+inline bool SerializedField::has_value_count() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void SerializedField::set_has_value_count() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void SerializedField::clear_has_value_count() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void SerializedField::clear_value_count() {
+ value_count_ = 0;
+ clear_has_value_count();
+}
+inline ::google::protobuf::int32 SerializedField::value_count() const {
+ return value_count_;
+}
+inline void SerializedField::set_value_count(::google::protobuf::int32 value) {
+ set_has_value_count();
+ value_count_ = value;
+}
+
+// optional int32 var_byte_length = 5;
+inline bool SerializedField::has_var_byte_length() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void SerializedField::set_has_var_byte_length() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void SerializedField::clear_has_var_byte_length() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void SerializedField::clear_var_byte_length() {
+ var_byte_length_ = 0;
+ clear_has_var_byte_length();
+}
+inline ::google::protobuf::int32 SerializedField::var_byte_length() const {
+ return var_byte_length_;
+}
+inline void SerializedField::set_var_byte_length(::google::protobuf::int32 value) {
+ set_has_var_byte_length();
+ var_byte_length_ = value;
+}
+
+// optional int32 group_count = 6;
+inline bool SerializedField::has_group_count() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void SerializedField::set_has_group_count() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void SerializedField::clear_has_group_count() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void SerializedField::clear_group_count() {
+ group_count_ = 0;
+ clear_has_group_count();
+}
+inline ::google::protobuf::int32 SerializedField::group_count() const {
+ return group_count_;
+}
+inline void SerializedField::set_group_count(::google::protobuf::int32 value) {
+ set_has_group_count();
+ group_count_ = value;
+}
+
+// optional int32 buffer_length = 7;
+inline bool SerializedField::has_buffer_length() const {
+ return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void SerializedField::set_has_buffer_length() {
+ _has_bits_[0] |= 0x00000040u;
+}
+inline void SerializedField::clear_has_buffer_length() {
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline void SerializedField::clear_buffer_length() {
+ buffer_length_ = 0;
+ clear_has_buffer_length();
+}
+inline ::google::protobuf::int32 SerializedField::buffer_length() const {
+ return buffer_length_;
+}
+inline void SerializedField::set_buffer_length(::google::protobuf::int32 value) {
+ set_has_buffer_length();
+ buffer_length_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace shared
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::shared::NamePart_Type>() {
+ return ::exec::shared::NamePart_Type_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::shared::RpcChannel>() {
+ return ::exec::shared::RpcChannel_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_UserBitShared_2eproto__INCLUDED